-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
decorators-style conflicts with Prettier #27
Comments
eslint-plugin-decorator-position had the same bug: NullVoxPopuli/eslint-plugin-decorator-position#289. They fixed it in NullVoxPopuli/eslint-plugin-decorator-position@b86643a. I hope that can be of some help. |
Chiming in that my CI is now broken because of this incompatibility between stencil.js and prettier. After reading the above, I've become frustrated because I have no idea how to make my CI tools get along with each other. Edit: I had to add this line to
I also had to add this to
|
I guess this issue can be closed, since Prettier does not change decorators anymore (see here). Furthermore, you're still able to configure Stencil's ESlint plugin according to your needs, i.e. set all Decorator-Styles to {
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": ["plugin:@stencil/recommended"],
"rules": {
"@stencil/decorators-style": [
"error",
{
"prop": "multiline",
"state": "multiline",
"element": "multiline",
"event": "multiline",
"method": "multiline",
"watch": "multiline",
"listen": "multiline"
}
]
}
} |
@EvgenyOrekhov Your example is a bit missleading since Prettier doesn't reformat the line based on the set decorator, but because the
If you set the I can understand your proposal, but since you can configure it to your needs if you use Stencil's ESlint Plugin and Prettier at the same time, I do not see a reason why the opinionated default of Stencil should be changed... In the end of the day, this is of course the decision of the maintainers. I just wanted to show the possibility based on already implemented features, how to get it up and running in case somebody stumbles upon this issue... |
We're using default Prettier options and default
@stencil/decorators-style
options.Prettier formats code like this:
but
@stencil/decorators-style
saysThe @Event decorator can only be applied as inline
.I expect
@stencil/decorators-style
to work with Prettier and to not cause warnings.The text was updated successfully, but these errors were encountered: