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

Docs: clarify no-mixed-operators (fixes #8051) #9404

Merged
merged 1 commit into from Oct 11, 2017

Conversation

ruxandrafed
Copy link
Contributor

Update docs for no-mixed-operators to clarify that a pair of errors will be triggered for each pair of mixed consecutive operators used. Fixes #8051.

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

[x] Documentation update
[ ] 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)
Just an update to the documentation for the no-mixed-operators rule.

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

@eslintbot
Copy link

LGTM

@eslintbot
Copy link

LGTM

@@ -9,6 +9,21 @@ var foo = (a && b) || c || d; /*GOOD*/
var foo = a && (b || c || d); /*GOOD*/
```

**Note:**
It is expected for this rule to emit one error for each mixed operator in a pair. As a result, for each two consecutive mixed operators used, a distinct error will be displayed, pointing to the where the specific operator that breaks the rule is used:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits: pointing to the where...

"the" should be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Thanks @aladdin-add, I removed it.

Update docs for `no-mixed-operators` to clarify that a pair of errors will be triggered for each pair of mixed consecutive operators used. Fixes eslint#8051.
@eslintbot
Copy link

LGTM

Copy link
Member

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. thanks!

@kaicataldo
Copy link
Member

LGTM. Thanks for contributing to ESLint!

@kaicataldo kaicataldo changed the title Docs: Clarify expected behavior of no-mixed-operators rule Docs: Clarify no-mixed-operators (fixes #8051) Oct 11, 2017
@kaicataldo kaicataldo changed the title Docs: Clarify no-mixed-operators (fixes #8051) Docs: clarify no-mixed-operators (fixes #8051) Oct 11, 2017
@kaicataldo kaicataldo merged commit e835dd1 into eslint:master Oct 11, 2017
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Apr 10, 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 Apr 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"no-mixed-operators" always outputs errors in pairs of two
4 participants