Rule Change: require-unicode-regexp
supports v
flag #17199
Closed
Description
opened on May 19, 2023
What rule do you want to change?
require-unicode-regexp
What change to do you want to make?
Generate more warnings
How do you think the change should be implemented?
A new option
Example code
/^[👍]$/v.test("👍")
What does the rule currently do for this code?
Cannot parse. And even if it could be parsed, it would probably generate a warning.
What will the rule do after it's changed?
There are two change requests:
v
flag is a superset ofu
flag so that this rule will not warn ifv
flag is enabled- Add an option like
requireVFlag
. When this option is enabled, ESLint warns ifv
flag is disabled, even ifu
flag is enabled.
Participation
- I am willing to submit a pull request to implement this change.
Additional comments
- RegExp v flag is a Stage 4 proposal( https://github.com/tc39/proposal-regexp-v-flag ).
- We need to wait feat: add support v flag eslint-community/regexpp#82 for this.
Metadata
Assignees
Labels
Type
Projects
Status
Complete
Activity