-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
The no-unsafe-regex
rule is annoying
#153
Comments
// @bdougherty |
The For this plugin to be useful it needs to pinpoint exactly where in the regex the problem lies, and suggest how it could be fixed, ideally with It could maybe use |
Based on what I was reading about the regexes that it's looking for (primarily http://www.regular-expressions.info/catastrophic.html), I'm not sure that there is an automated way to fix them. But I agree that it should give some indication of what the issue is, I'm just not sure how to do that exactly. I'll mess around with it and see if I can come up with anything. |
See sindresorhus/eslint-plugin-unicorn#153 – Unicorn itself will anyways include it if they find a better way to do it
@IssueHunt has funded $60.00 to this issue.
|
Even a trivial regular expression like Arguably this regexp does not need |
safe-regex readme now says
Discussion on using this here: I wonder if it's possible for one eslint plugin to pull in just one rule from another plugin |
Interestingly,
|
- sindresorhus/eslint-plugin-unicorn#153 Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
@sindresorhus has rewarded $54.00 to @fisker. See it on IssueHunt
|
It matches way too many regexes to be useful. And it's unclear what's wrong with the regexes and how to fix it.
It matches simple regex like:
https://github.com/xojs/stylelint-config-xo/blob/9c49d0bbf96a433ec6b2eef83875acadd26ba78f/index.js#L4
eslint-plugin-unicorn/rules/throw-new-error.js
Line 4 in d04af50
eslint-plugin-unicorn/rules/no-abusive-eslint-disable.js
Line 4 in d04af50
And many many more.
IssueHunt Summary
fisker has been rewarded.
Backers (Total: $60.00)
Submitted pull Requests
no-unsafe-regex
ruleTips
The text was updated successfully, but these errors were encountered: