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: nested indenting for offsetTernaryExpressions: true (fixes #13971) #13972
Fix: nested indenting for offsetTernaryExpressions: true (fixes #13971) #13972
Conversation
Hi @brodybits!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
Read more about contributing to ESLint here |
looks good :) |
Hi @brodybits!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
Read more about contributing to ESLint here |
1 similar comment
Hi @brodybits!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
Read more about contributing to ESLint here |
Co-authored-by: Adam Stankiewicz <sheerun@sher.pl>
02e0133
to
8ed37bb
Compare
I have rebased and updated the title again to fit within the 72 characters, hope it is good to go. I will not likely be active on GitHub for the next 25-30 hours. Thanks! |
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, thanks @brodybits! Glad to see this could be fixed with a single condition.
Much appreciated, this will unblock issues on "Standard JS" and |
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
resolves #13971
This update applies one more condition for the consequent to avoid extra indenting in a nested ternary expression like this:
Note that the condition was mostly copied from the condition that @sheerun had included for the alternate in PR #12556 (bb6cf50).
Is there anything you'd like reviewers to focus on?
I hope there is enough information in issue #13971 to explain the issue and in this PR to understand the solution. I would be happy to add some more test cases and documentation updates if needed.
This PR can help unblock the following issues and updates in some other projects: