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: add ignoreNonDeclaration to no-multi-assign rule (fixes #12545) #14185

Merged
merged 4 commits into from Apr 3, 2021

Conversation

t-mangoe
Copy link
Contributor

@t-mangoe t-mangoe commented Mar 6, 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:

#12545

What changes did you make? (Give an overview)

I added an option, ignoreNonDeclaration.
This option ignores multi-assign when the variable is being declared.

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

Nothing in particular.

@eslint-github-bot eslint-github-bot bot added the triage An ESLint team member will look at this issue soon label Mar 6, 2021
@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Mar 8, 2021
@mdjermanovic mdjermanovic linked an issue Mar 8, 2021 that may be closed by this pull request
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

Hi @t-mangoe, thanks for the PR!

Can you also update documentation for this rule?

@t-mangoe
Copy link
Contributor Author

@mdjermanovic
Thank you for your comment!!
I will update the documentation.

@t-mangoe
Copy link
Contributor Author

t-mangoe commented Mar 20, 2021

Hi @t-mangoe, thanks for the PR!

Can you also update documentation for this rule?

@mdjermanovic
I have updated the documentation.
If you have time, please check out my changes.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

Thanks! The code looks good, I left only a minor suggestion, and a few comments about the documentation and the tests.

docs/rules/no-multi-assign.md Outdated Show resolved Hide resolved
docs/rules/no-multi-assign.md Show resolved Hide resolved
docs/rules/no-multi-assign.md Outdated Show resolved Hide resolved
docs/rules/no-multi-assign.md Show resolved Hide resolved
tests/lib/rules/no-multi-assign.js Outdated Show resolved Hide resolved
tests/lib/rules/no-multi-assign.js Outdated Show resolved Hide resolved
tests/lib/rules/no-multi-assign.js Show resolved Hide resolved
lib/rules/no-multi-assign.js Outdated Show resolved Hide resolved
@mdjermanovic mdjermanovic changed the title Update: add an option to ignore non declaration (refs #12545) Update: add ignoreNonDeclaration to no-multi-assign rule (fixes #12545) Mar 22, 2021
@t-mangoe
Copy link
Contributor Author

@mdjermanovic
Thank you for your suggestion!
I reflected your comments. If you have time, please confirm my modification.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

Thanks for the changes! I have just two minor suggestions, and then LGTM.

docs/rules/no-multi-assign.md Outdated Show resolved Hide resolved
docs/rules/no-multi-assign.md Outdated Show resolved Hide resolved
@t-mangoe
Copy link
Contributor Author

t-mangoe commented Apr 3, 2021

@mdjermanovic
Thank you for comments! I fixed the doc and reflected your comments.

Copy link
Member

@mdjermanovic mdjermanovic 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!

@mdjermanovic
Copy link
Member

I'm not sure what's happening with the CLA check, will close/reopen to see if it will fix the check.

@mdjermanovic mdjermanovic reopened this Apr 3, 2021
@mdjermanovic
Copy link
Member

All checks are green now. Thanks for contributing!

@mdjermanovic mdjermanovic merged commit b51d077 into eslint:master Apr 3, 2021
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Oct 1, 2021
@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 Oct 1, 2021
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 enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no-multi-assign option only when declaring variables.
2 participants