Possible FAQ needed, correct combination of importOrderParserPlugins for Angular parameter decorators #122
Unanswered
adam-marshall
asked this question in
Q&A
Replies: 3 comments 2 replies
|
actually, it looks like this isn't covered in https://github.com/trivago/prettier-plugin-sort-imports/blob/master/tests/Angular/imports-with-decorators.js so it might be worth being an actual issue to capture that. |
1 reply
|
I've had better results in angular using the decorators-legacy plugin instead. Maybe I'm missing something but I think this config should work Please tell me if that solves your issue. Regardless, this is not the first time people report issues with angular projects. So the doc might need some update 😅 |
1 reply
|
+1, I'm having the exact same issue as @Sebastian-G and @adam-marshall, which effectively renders this plugin unusable to me. I'm on a NestJS project, though, so using Angular doesn't seem to be the issue. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
If I use parameter decorators e.g. https://angular.io/api/core/Self#usage-notes
I receive the following error
SyntaxError: Decorators cannot be used to decorate parameters.I saw similar closed issues but it is still not clear to me today what the correct configuration would be to allow this, I currently use:
"importOrderParserPlugins" : [ "typescript", "classProperties", "[\"decorators\", { \"decoratorsBeforeExport\": true }]"]I tried a few things but no joy yet.
All reactions