-
-
Notifications
You must be signed in to change notification settings - Fork 5k
RegExp parse errors in regexpp are not tolerated and crash eslint #12169
Copy link
Copy link
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlyruleRelates to ESLint's core rulesRelates to ESLint's core rules
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlyruleRelates to ESLint's core rulesRelates to ESLint's core rules
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
@typescript-eslint/parser, but the crash is in theregexppinstance used by theno-misleading-character-classrule.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.
/{/uIt happens on the command line as well but this is particularly bothersome with editor plugins (e.g. vscode integration), as you get plugin crash messages while typing up regexps.
What did you expect to happen?
No crash, at worst just an "invalid regexp" lint.
What actually happened? Please include the actual, raw output from ESLint.
To be clear, this is indeed a syntax error, it's not a false positive on my input code; rather, it's an unhandled error happening inside the rule when a regexp is invalid.
Are you willing to submit a pull request to fix this bug?
Maybe, I don't know how this should be handled.