Skip to content
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: fix indent bug with binary operators/ignoredNodes (fixes #9882) #9951

Merged
merged 1 commit into from Feb 16, 2018

Conversation

@not-an-aardvark
Copy link
Member

not-an-aardvark commented Feb 6, 2018

What is the purpose of this pull request? (put an "X" next to item)

[x] Bug fix (#9882)

What changes did you make? (Give an overview)

This updates the indent rule to avoid setting the offset of the right-hand side of a BinaryExpression to depend on the token after the operator, which was unnecessary and could cause problems when the right-hand side of the expression was ignored.

Is there anything you'd like reviewers to focus on?

Nothing in particular

@platinumazure

This comment has been minimized.

Copy link
Member

platinumazure commented Feb 6, 2018

For the test case you've added-- what does indent currently do, and how does your change fix it? Is there an invalid case that could be added based on this change?

@not-an-aardvark

This comment has been minimized.

Copy link
Member Author

not-an-aardvark commented Feb 6, 2018

The current behavior can be viewed here (for posterity, it reports errors on the last two lines). I don't think there are any invalid cases that would make sense here, since this bug seems to only affect cases where the node is supposed to be ignored.

@kaicataldo kaicataldo merged commit 0e4ae22 into master Feb 16, 2018
5 checks passed
5 checks passed
commit-message Commit message follows guidelines
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details
@kaicataldo

This comment has been minimized.

Copy link
Member

kaicataldo commented Feb 16, 2018

Thanks for contributing!

This was referenced Mar 22, 2018
@renovate renovate bot mentioned this pull request Mar 23, 2018
@eslint eslint bot locked and limited conversation to collaborators Aug 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.