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
Update: add autofix to rule multiline-ternary #13958
Merged
mdjermanovic
merged 9 commits into
eslint:master
from
aladdin-add:feat/multiline-ternary-autofix
Dec 31, 2020
Merged
Update: add autofix to rule multiline-ternary #13958
mdjermanovic
merged 9 commits into
eslint:master
from
aladdin-add:feat/multiline-ternary-autofix
Dec 31, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I noticed unfixed warnings from this ESLint rule and wanted to auto-fix them. While it may seem like doing `'\n? '` is opinionated, I did have changed to make this take a new option and either put the `?` on the previous line or next line. This is actually unnecessary because `operator-linebreak` handles it for you.
mdjermanovic
reviewed
Dec 27, 2020
Looks good, I only have questions about whether the autofixing should make fewer changes in the code, though I don't have a strong opinion.
mdjermanovic
reviewed
Dec 28, 2020
mdjermanovic
reviewed
Dec 29, 2020
@mdjermanovic thank you so much for reviewing!! |
Changed the title as it seems that all "add fixer" commits had |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
autofix
This change is related to ESLint's autofixing capabilities
feature
This change adds a new feature to ESLint
rule
Relates to ESLint's core rules
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ x] 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)
it added autofix to rule multiline-ternary
Is there anything you'd like reviewers to focus on?
it was based on PR #12982, thanks to @Sawtaytoes great working!
and surely if this PR get merged, that one can be closed!