-
Notifications
You must be signed in to change notification settings - Fork 26.6k
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
eslint + prettier produces non-viable code #1987
Comments
Which paren is it missing? The "after" example looks correct to me. |
missing the |
ahh i see it. Can you reproduce the issue without prettier? |
Okay when running simply eslint with --fix and removing the "plugin:prettier/recommended" from the plugins it produces this code: const foo = (paramA, paramB, paramC) => Object.keys(paramB.prop.nestedProp[0])
.filter(attribute => paramC.includes(attribute))
.map(attribute => Object.keys(paramB.prop.nestedProp[0][attribute]).map(
attributeKey => ({
key: `${paramA.name} ${paramB.type} ${attribute} ${attributeKey}`,
value: paramB.prop.nestedProp[0][attribute][attributeKey],
}),
));
export default foo; which is valid so the conflict seems to be with the prettier/recommended plugin! |
Please file an issue on prettier for that, and link it here :-) |
@maloguertin and other's who run into this problem, it's a conflict between our So a workaround is adding It's also worth noting that the Prettier output and the |
@sharmilajesupaul thanks I'll try that!
|
Shouldn't that be part of |
@brodybits @maloguertin yup, my guess is there's some configuration of the rule that does work with Prettier and the config we use in the style guide doesn't. I made an issue on |
I think this is another manifestation of prettier/eslint-plugin-prettier#65 |
when extending airbnb's eslint plugin along with prettier eslint and running it on this code:
which is ugly but working
I obtain this code:
which is missing a
)
at the end.my eslint config is this
Now this may have nothing to do with airbnb (if so feel free to close) but I thought this would be of interest to you.
The text was updated successfully, but these errors were encountered: