-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix unambiguous regex #654
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well this is good news. I'm happy it was just silly mistakes rather than very hard performance problems :D
I just noticed a typo, but feel free to dismiss the request for changes when you've fixed that.
To be on the safe side, and since it doesn't cost much, I think eslint-module-utils
should be bumped by a major version. In both cases, there may not be a lot of things affected, but you never know, and this is the right thing to do IMO when you know it's a breaking change.
@@ -344,4 +345,23 @@ describe('ExportMap', function () { | |||
|
|||
}) | |||
|
|||
// todo: move to utils | |||
describe('unambigous regex', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unambiguous
@jfmengels I agree about bumping |
Just tested v2.2.0 out on my codebase, and performance now appears to be comparable to v1.16.0. Thanks so much! (Details in #649) |
Key notes:
&&
instead of||
for the auto-ignore (fail) so it wasn't even used unless the file is ignored anyway, and then it would ignore the ignore if the regex passedmultiline
mode, so it would fail on files unlessimport
/export
is the first line (double fail)I also had to comment out a parser error test for CoffeeScript that should never have passed in v2 if I had implemented this correctly to begin with.
To publish this, need to bump+publish
eslint-module-utils
, then bump the dep in the plugin and publish it too.I'm thinking this should be semver-minor since it's a large enough fix that it's nearly a feature.
Technically a breaking change to
eslint-module-utils
, but that's not a big deal.fixes #615
fixes #634
fixes #649