feat: require-unicode-regexp support v flag#17402
Conversation
|
Hi @sosukesuzuki!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
✅ Deploy Preview for docs-eslint canceled.
|
requiredUnicodeFlag option to require-unicode-regexp and support v flagrequiredUnicodeFlag option to require-unicode-regexp and support v flag
|
Hi @sosukesuzuki!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
requiredUnicodeFlag option to require-unicode-regexp and support v flagrequire-unicode-regexp support v flag
|
I've edited the original post to change |
| re.test('\u2028'); // → false | ||
| ``` | ||
|
|
||
| Please see <https://github.com/tc39/proposal-regexp-v-flag> and <https://v8.dev/features/regexp-v-flag> for more details. |
There was a problem hiding this comment.
These links should go in a "Further Reading" section at the bottom of the page instead of here. See the semi rule as an example: https://eslint.org/docs/latest/rules/semi#further-reading
|
Changes in the code LGTM. If review comments aren't addressed in time for today's release, I'm fine with merging this as-is to complete #17223, and addressing reviews later in a follow-up. |
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
nzakas
left a comment
There was a problem hiding this comment.
Approving for this release even though we need to clean up the documentation a bit later.
* docs: add `further_reading` links * docs: mention about `v` * Update docs/src/rules/require-unicode-regexp.md --------- Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[x] Documentation update
[x] Changes an existing rule (template)
[x] Add autofix to a rule
What changes did you make? (Give an overview)
Refs #17223
require-unicode-regexpwarns if there's nouflag, but we have updated it to also allow thevflag.requiredUnicodeFlag: "u" | "v". When this option is specified, a warning is issued if the designated flag is not included.Is there anything you'd like reviewers to focus on?
Option interface.