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 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
Copy link
Member

@platinumazure 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
Copy link
Member Author

@not-an-aardvark 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
@kaicataldo
Copy link
Member

@kaicataldo kaicataldo commented Feb 16, 2018

Thanks for contributing!

@ilyavolodin ilyavolodin deleted the indent-binary-expression-ignored branch Feb 18, 2018
@eslint-deprecated eslint-deprecated 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