Prettier complains that @discourseComputed cannot be used to decorate literal properties

I don’t understand why prettier is unhappy with the following code. Error is SyntaxError: Decorators cannot be used to decorate object literal properties. (9:3)

I have the same construction in other places that look, to me, to be exactly the same. :crying_cat_face:

EDIT: this seems to have started working for reasons completely unclear. I’ll delete this next. Except I can’t.

5 Likes

I’m getting this same error again on a different plugin on @action, @on, and @discourseComputed. I thought maybe it was something with the prettier config, but I just copied it from discourse-plugin-skeleton.

1 Like

Does the plugin still use the legacy .extend({}) syntax?

3 Likes

YESSSSS!

Thanks! I just figured it out and now am trying to get all of the stuff switched over . . . oh, wait. . .

No. Way.

I’ve been trying to get mass-pr to help, but it’s not been very . . .helpful. I guess I’ll need to try that some more.

Thanks very much!!

I thought I’d been paying attention to those topics, but I guess I missed or didn’t understand that one.

3 Likes