Bug: allowConstructorFlags
option of no-invalid-regexp
allows duplicate strings #18755
Open
Description
opened on Aug 6, 2024
Environment
Node version: latest
npm version: latest
Local ESLint version: latest
Global ESLint version: no
Operating System: windows
What parser are you using?
Default (Espree)
What did you do?
/*eslint no-invalid-regexp: ["error", { "allowConstructorFlags": ["a", "a"] }]*/
new RegExp('.', 'a');
What did you expect to happen?
eslint will report duplicate flag passed to allowConstructorFlags
.
What actually happened?
eslint doesn't report it
Link to Minimal Reproducible Example
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response
Metadata
Assignees
Labels
Type
Projects
Status
Blocked
Activity