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
Chore: refactor regex in config comment parser #12662
Conversation
Was there a recent release that broke this? If so, could we lock it at an old version? Looks like it's breaking our CI builds. |
It's happening with Would it be possible to lock it at the previous version? It seems to be a deep dependency. Looks like this chore PR fixed the problem (this build is passing). On the other hand, refactoring a core feat because of the demo build doesn't look nice, although it's a very small change. |
@eslint/eslint-team Can we get some other opinions on this? This is currently making CI fail in |
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.
Might as well put this in. The regexes should be equivalent (-
does not need to be escaped at the beginning or end of a character class, but does need to be escaped elsewhere, and order of characters in a character class shouldn't matter).
It may be good if we update |
I don't think we support IE 11 on the site anymore anyway. |
Right. The demo of our site doesn't support IE11 while a time. Since jviereck/regjsparser#98 doesn't have positive reaction, I think better that we update our build to stop using |
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.
I think it would be prudent to land this to fix CI ASAP and to follow up with @mysticatea's suggestion.
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.
👍 to this as a temporary solution until @mysticatea's suggestion is implemented.
Thanks for contributing! |
Sorry, meant to mark this as accepted before merging since it had three approvals from TSC members in addition to being proposed by a team member. |
What is the purpose of this pull request? (put an "X" next to item)
[X] Other, please explain:
A chore to avoid an error that occurs while bundling linter for the online demo.
regjsparser treats escaped
-
in character classes in a regex with theu
flag as invalid syntax.E.g.,
/[\-]/u
ref: jviereck/regjsparser#98
What changes did you make? (Give an overview)
Modified one regex in
linter/config-comment-parser.js
to avoid escaping-
.Is there anything you'd like reviewers to focus on?
Are the new and the old regexes equivalent.