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: Improving no-mixed-operators to clarify what changes need to be made. #14765

Merged
merged 1 commit into from Jul 9, 2021

Conversation

paulsmithkc
Copy link
Contributor

@paulsmithkc paulsmithkc commented Jul 2, 2021

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)
[x] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What rule do you want to change?

no-mixed-operators

Does this change cause the rule to produce more or fewer warnings?

no

How will the change be implemented? (New option, new default behavior, etc.)?

new default behavior

Please provide some example code that this change will affect:

const result = investment * rate / 100;

What does the rule currently do for this code?

Current error message: "Unexpected mix of '*' and '/'."

What will the rule do after it's changed?

New error message: "Unexpected mix of '*' and '/'. Use parentheses to clarify the intended order of operations."

What changes did you make? (Give an overview)

Updated the error message for no-mixed-operators to clarify what changes need to made.

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

Is there anything else that would make this error message clearer?

@eslint-github-bot eslint-github-bot bot added the triage An ESLint team member will look at this issue soon label Jul 2, 2021
@snitin315 snitin315 added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Jul 4, 2021
Copy link
Contributor

@snitin315 snitin315 left a comment

I'm okay with change, it makes sense to me to provide a more helpful message. Let's wait for other team members to review this change.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Makes sense to me, LGTM!

@mdjermanovic mdjermanovic added the enhancement This change enhances an existing feature of ESLint label Jul 4, 2021
@nzakas nzakas merged commit bba714c into eslint:master Jul 9, 2021
14 checks passed
@paulsmithkc paulsmithkc deleted the no-mixed-operators branch Jul 11, 2021
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jan 6, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jan 6, 2022
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 enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants