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 fixer for no-div-regex rule (fixes #11355) #11744

Merged
merged 1 commit into from May 25, 2019

Conversation

joe-re
Copy link
Contributor

@joe-re joe-re commented May 19, 2019

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

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[] Changes an existing rule (template)
[x] 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)
fixes: #11355
Adding fixer for no-div-regex-rule and use [=] instead of \= as suggestion to avoid conflicting with no-useless-escape error.

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

@jsf-clabot
Copy link

jsf-clabot commented May 19, 2019

CLA assistant check
All committers have signed the CLA.

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label May 19, 2019
Adding fixer for no-div-regex-rule and use [=] instead of \= as suggestion to avoid conflicting with no-useless-escape error.
@joe-re joe-re changed the title add fixer for no-div-regex rule Update: add fixer for no-div-regex rule May 19, 2019
Copy link
Member

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

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

LGTM, nice work! Thanks for contributing!

@platinumazure platinumazure added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly rule Relates to ESLint's core rules enhancement This change enhances an existing feature of ESLint and removed triage An ESLint team member will look at this issue soon bug ESLint is working incorrectly labels May 19, 2019
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.

could you please add a test like:

/foo=bar/; // => /foo[=]bar/;

thanks!

@platinumazure
Copy link
Member

@aladdin-add I think your example should be a "valid" case as the rule only flags an equal sign at the beginning of a regular expression literal.

@aladdin-add
Copy link
Member

oops, I missed it, thanks for pointing out! 😄

@kaicataldo kaicataldo changed the title Update: add fixer for no-div-regex rule Update: add fixer for no-div-regex rule (fixes #11355) May 25, 2019
@kaicataldo kaicataldo merged commit 71716eb into eslint:master May 25, 2019
@joe-re joe-re deleted the autofix-no-div-regex branch May 28, 2019 15:47
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Nov 22, 2019
@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 Nov 22, 2019
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.

Suggested fix for no-div-regex trips no-useless-escape
7 participants