File tree Expand file tree Collapse file tree 7 files changed +14
-3
lines changed
Expand file tree Collapse file tree 7 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ There is a config that enables the rules in this category: [`no-new-in-esnext`]
1010
1111| Rule ID | Description | |
1212| :--------| :------------| :--:|
13+ | [ es-x/no-regexp-duplicate-named-capturing-groups] ( ./no-regexp-duplicate-named-capturing-groups.md ) | disallow RegExp duplicate named capturing groups. | |
1314| [ es-x/no-set-prototype-difference] ( ./no-set-prototype-difference.md ) | disallow the ` Set.prototype.difference ` method. | |
1415| [ es-x/no-set-prototype-intersection] ( ./no-set-prototype-intersection.md ) | disallow the ` Set.prototype.intersection ` method. | |
1516| [ es-x/no-set-prototype-isdisjointfrom] ( ./no-set-prototype-isdisjointfrom.md ) | disallow the ` Set.prototype.isDisjointFrom ` method. | |
Original file line number Diff line number Diff line change 11---
22title : " es-x/no-regexp-duplicate-named-capturing-groups"
33description : " disallow RegExp duplicate named capturing groups"
4+ since : " v7.8.0"
45---
56
67# es-x/no-regexp-duplicate-named-capturing-groups
78> disallow RegExp duplicate named capturing groups
89
9- - ❗ < badge text = " This rule has not been released yet. " vertical = " middle " type = " error " > *** This rule has not been released yet. *** </ badge >
10+ - ✅ The following configurations enable this rule: [ no-new-in-esnext ]
1011
1112This rule reports ES2025 [ RegExp duplicate named capture groups] ( https://github.com/tc39/proposal-duplicate-named-capturing-groups ) as errors.
1213
@@ -24,7 +25,13 @@ const r2 = /(?<x>a)|(?<x>b)/
2425
2526</eslint-playground >
2627
28+ ## 🚀 Version
29+
30+ This rule was introduced in v7.8.0.
31+
2732## 📚 References
2833
2934- [ Rule source] ( https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-regexp-duplicate-named-capturing-groups.js )
3035- [ Test source] ( https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-regexp-duplicate-named-capturing-groups.js )
36+
37+ [ no-new-in-esnext ] : ../configs/index.md#no-new-in-esnext
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ module.exports = {
1111 } ,
1212 } ,
1313 rules : {
14+ "es-x/no-regexp-duplicate-named-capturing-groups" : "error" ,
1415 "es-x/no-set-prototype-difference" : "error" ,
1516 "es-x/no-set-prototype-intersection" : "error" ,
1617 "es-x/no-set-prototype-isdisjointfrom" : "error" ,
Original file line number Diff line number Diff line change 77module . exports = {
88 plugins : [ "es-x" ] ,
99 rules : {
10+ "es-x/no-regexp-duplicate-named-capturing-groups" : "error" ,
1011 "es-x/no-set-prototype-difference" : "error" ,
1112 "es-x/no-set-prototype-intersection" : "error" ,
1213 "es-x/no-set-prototype-isdisjointfrom" : "error" ,
Original file line number Diff line number Diff line change @@ -268,6 +268,7 @@ module.exports = {
268268 "no-proxy" : require ( "./rules/no-proxy" ) ,
269269 "no-reflect" : require ( "./rules/no-reflect" ) ,
270270 "no-regexp-d-flag" : require ( "./rules/no-regexp-d-flag" ) ,
271+ "no-regexp-duplicate-named-capturing-groups" : require ( "./rules/no-regexp-duplicate-named-capturing-groups" ) ,
271272 "no-regexp-lookbehind-assertions" : require ( "./rules/no-regexp-lookbehind-assertions" ) ,
272273 "no-regexp-named-capture-groups" : require ( "./rules/no-regexp-named-capture-groups" ) ,
273274 "no-regexp-prototype-compile" : require ( "./rules/no-regexp-prototype-compile" ) ,
Original file line number Diff line number Diff line change 11{
22 "name" : " eslint-plugin-es-x" ,
3- "version" : " 7.7 .0" ,
3+ "version" : " 7.8 .0" ,
44 "description" : " ESLint plugin about ECMAScript syntactic features." ,
55 "engines" : {
66 "node" : " ^14.18.0 || >=16.0.0"
Original file line number Diff line number Diff line change 33module . exports = { fetchLines }
44
55async function * fetchLines ( url ) {
6- const response = await fetch ( url ) // eslint-disable-line n/no-unsupported-features/node-builtins -- non-production code
6+ const response = await fetch ( url )
77 yield * ( await response . text ( ) ) . split ( "\n" )
88}
You can’t perform that action at this time.
0 commit comments