-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
fix: Don't specify any jsxBracketSameLine parameter if none is specified #430
Conversation
By removing the default value for jsx-bracket-same-line (which is just `undefined` anyway), no option value at all for jsxBracketSameLine will be generated if none is specified. Then if a recent version of prettier is in use for which that option is deprecated, it won't complain. Resolves prettier#428.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
🎉 This PR is included in version 6.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hmm, I'm still seeing
with 6.0.1, and I find that I don't get that output if I remove the lines corresponding to these in my |
Ah, here's what I think is happening.
"react/jsx-closing-bracket-location": [
"error",
"line-aligned"
],
In fact, for my specific choice of Should |
@chrisbobbe I'm thinking we use their proposed solution of |
Great, that sounds good to me! Shall I make a PR? |
@chrisbobbe That would be wonderful! |
…meLine prettier/prettier@4992d9720, released in 2.4.0, deprecated the `jsxBracketSameLine` option in favor of a new, more generic option, `bracketSameLine`. See docs: https://prettier.io/docs/en/options.html#bracket-line This has caused a warning jsxBracketSameLine is deprecated. for people using Prettier 2.4.0+, if their ESLint config leads us to infer and use a value for jsxBracketSameLine. So, instead of inferring and using a value for jsxBracketSameLine, do so for the new bracketSameLine. In d8bf1e3, which we released in 14.0.0, we stopped supporting Prettier versions older than 2.5.1. That means we don't need to maintain backward-compatible code for users with Prettier <2.4.0, which doesn't have bracketSameLine. See discussion: prettier/prettier-eslint-cli#430 (comment)
Just sent prettier/prettier-eslint#749 🙂 |
By removing the default value for jsx-bracket-same-line (which is just
undefined
anyway), no option value at all for jsxBracketSameLine willbe generated if none is specified. Then if a recent version of prettier
is in use for which that option is deprecated, it won't complain.
Resolves #428.