Skip to content

Commit 47a0859

Browse files
SUZUKI Sosukenzakas
andauthored
docs: update require-unicode-regexp.md as following up #17402 (#17441)
* docs: add `further_reading` links * docs: mention about `v` * Update docs/src/rules/require-unicode-regexp.md --------- Co-authored-by: Nicholas C. Zakas <[email protected]>
1 parent 53d7508 commit 47a0859

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

docs/src/_data/further_reading_links.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,5 +726,19 @@
726726
"logo": "https://v8.dev/favicon.ico",
727727
"title": "Faster async functions and promises · V8",
728728
"description": "Faster and easier-to-debug async functions and promises are coming to V8 v7.2 / Chrome 72."
729+
},
730+
"https://github.com/tc39/proposal-regexp-v-flag": {
731+
"domain": "github.com",
732+
"url": "https://github.com/tc39/proposal-regexp-v-flag",
733+
"logo": "https://github.com/fluidicon.png",
734+
"title": "GitHub - tc39/proposal-regexp-v-flag: UTS18 set notation in regular expressions",
735+
"description": "UTS18 set notation in regular expressions. Contribute to tc39/proposal-regexp-v-flag development by creating an account on GitHub."
736+
},
737+
"https://v8.dev/features/regexp-v-flag": {
738+
"domain": "v8.dev",
739+
"url": "https://v8.dev/features/regexp-v-flag",
740+
"logo": "https://v8.dev/favicon.ico",
741+
"title": "RegExp v flag with set notation and properties of strings · V8",
742+
"description": "The new RegExp `v` flag enables `unicodeSets` mode, unlocking support for extended character classes, including Unicode properties of strings, set notation, and improved case-insensitive matching."
729743
}
730744
}

docs/src/rules/require-unicode-regexp.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: require-unicode-regexp
33
rule_type: suggestion
4+
further_reading:
5+
- https://github.com/tc39/proposal-regexp-v-flag
6+
- https://v8.dev/features/regexp-v-flag
47
---
58

69

@@ -49,13 +52,11 @@ The RegExp `v` flag, introduced in ECMAScript 2024, is a superset of the `u` fla
4952
re.test('\u2028'); // → false
5053
```
5154
52-
Please see <https://github.com/tc39/proposal-regexp-v-flag> and <https://v8.dev/features/regexp-v-flag> for more details.
53-
5455
Therefore, the `u` and `v` flags let us work better with regular expressions.
5556
5657
## Rule Details
5758
58-
This rule aims to enforce the use of `u` flag on regular expressions.
59+
This rule aims to enforce the use of `u` or `v` flag on regular expressions.
5960
6061
Examples of **incorrect** code for this rule:
6162
@@ -99,4 +100,4 @@ function f(flags) {
99100
100101
## When Not To Use It
101102
102-
If you don't want to notify regular expressions with no `u` flag, then it's safe to disable this rule.
103+
If you don't want to warn on regular expressions without either a `u` or a `v` flag, then it's safe to disable this rule.

0 commit comments

Comments
 (0)