-
-
Notifications
You must be signed in to change notification settings - Fork 92
Decorator output is inconsistent #250
Comments
Thanks for the report. Typescript also allows decorators on method parameters but should still be using the same node type in all cases. |
Thanks for being super responsive! |
Nice to see you over this side @vjeux 😉 Just FYI I'll submit a PR for this tomorrow. |
We're running prettier on all the typescript tests and looking at where it crashes. So expect a lot of crazy edge cases uncovered! |
vscode uses a lot of decorators and right now prettier is crashing because of the inconsistency fyi. |
See this issue for creating the same decorators as babylon ( eslint/typescript-eslint-parser#250 ), in the meantime, this is making a ton of files in vscode crash. So we can just support both :)
See this issue for creating the same decorators as babylon ( eslint/typescript-eslint-parser#250 ), in the meantime, this is making a ton of files in vscode crash. So we can just support both :)
See this issue for creating the same decorators as babylon ( eslint/typescript-eslint-parser#250 ), in the meantime, this is making a ton of files in vscode crash. So we can just support both :)
Nice! Thanks. I added a workaround inside of prettier for now, but i'd love to get rid of it :) |
In this example, the decorator is not wrapped in a
Decorator
node:In this example, it is wrapped in a
TSDecorator
node, instead ofDecorator
node:It would be nice if decorators arrays was always wrapped in a
Decorator
node (withoutTS
prefix). This way it would work out of the box with babylon decorators.I have a workaround in prettier, but I'd rather it be fixed inside of this project: prettier/prettier#1509
The text was updated successfully, but these errors were encountered: