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

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

@not-an-aardvark not-an-aardvark added bug ESLint is working incorrectly rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion indent Relates to the `indent` rule labels Feb 6, 2018
@platinumazure
Copy link
Member

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

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

Thanks for contributing!

@ilyavolodin ilyavolodin deleted the indent-binary-expression-ignored branch February 18, 2018 14:10
This was referenced Mar 19, 2018
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Aug 16, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Aug 16, 2018
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 bug ESLint is working incorrectly indent Relates to the `indent` rule rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants