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
Suggested fix for no-div-regex
trips no-useless-escape
#11355
Suggested fix for no-div-regex
trips no-useless-escape
#11355
Comments
name = name.replace(/[\[\]]/g, "\\$&"); |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
Oops, this slipped through the cracks. Sorry about that. I think this is a bug and I think the best option is to have @coreyfarrell Would you be willing to submit a PR? If not, no worries, just wanted to see if you were still interested! |
@platinumazure thanks for responding. Unfortunately I don't currently have time to work on this and since |
No worries, thanks for getting back to me so fast! |
I can work on this one, Is it available? |
Hi @SalsabeelQandeel, feel free to work on this. Thanks! |
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
What did you expect to happen?
no-div-regex
should suggest replacing/=foo/
with/[=]foo/
to avoidno-useless-escape
error. Alternativelyno-useless-escape
could accept anignoreDivRegex
boolean option to allow/\=foo/
.Are you willing to submit a pull request to fix this bug?
I'm sure I can handle the documentation approach of suggesting
/[=]foo/
. I'm not confident I can create theno-useless-escape
option to ignore div regex.The text was updated successfully, but these errors were encountered: