Skip to content

Commit

Permalink
7.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Jul 1, 2024
1 parent 5b9a5a0 commit b988f26
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/rules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ There is a config that enables the rules in this category: [`no-new-in-esnext`]

| Rule ID | Description | |
|:--------|:------------|:--:|
| [es-x/no-regexp-duplicate-named-capturing-groups](./no-regexp-duplicate-named-capturing-groups.md) | disallow RegExp duplicate named capturing groups. | |
| [es-x/no-set-prototype-difference](./no-set-prototype-difference.md) | disallow the `Set.prototype.difference` method. | |
| [es-x/no-set-prototype-intersection](./no-set-prototype-intersection.md) | disallow the `Set.prototype.intersection` method. | |
| [es-x/no-set-prototype-isdisjointfrom](./no-set-prototype-isdisjointfrom.md) | disallow the `Set.prototype.isDisjointFrom` method. | |
Expand Down
9 changes: 8 additions & 1 deletion docs/rules/no-regexp-duplicate-named-capturing-groups.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
title: "es-x/no-regexp-duplicate-named-capturing-groups"
description: "disallow RegExp duplicate named capturing groups"
since: "v7.8.0"
---

# es-x/no-regexp-duplicate-named-capturing-groups
> disallow RegExp duplicate named capturing groups
- ❗ <badge text="This rule has not been released yet." vertical="middle" type="error"> ***This rule has not been released yet.*** </badge>
- ✅ The following configurations enable this rule: [no-new-in-esnext]

This rule reports ES2025 [RegExp duplicate named capture groups](https://github.com/tc39/proposal-duplicate-named-capturing-groups) as errors.

Expand All @@ -24,7 +25,13 @@ const r2 = /(?<x>a)|(?<x>b)/

</eslint-playground>

## 🚀 Version

This rule was introduced in v7.8.0.

## 📚 References

- [Rule source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-regexp-duplicate-named-capturing-groups.js)
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-regexp-duplicate-named-capturing-groups.js)

[no-new-in-esnext]: ../configs/index.md#no-new-in-esnext
1 change: 1 addition & 0 deletions lib/configs/flat/no-new-in-esnext.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
},
},
rules: {
"es-x/no-regexp-duplicate-named-capturing-groups": "error",
"es-x/no-set-prototype-difference": "error",
"es-x/no-set-prototype-intersection": "error",
"es-x/no-set-prototype-isdisjointfrom": "error",
Expand Down
1 change: 1 addition & 0 deletions lib/configs/no-new-in-esnext.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
module.exports = {
plugins: ["es-x"],
rules: {
"es-x/no-regexp-duplicate-named-capturing-groups": "error",
"es-x/no-set-prototype-difference": "error",
"es-x/no-set-prototype-intersection": "error",
"es-x/no-set-prototype-isdisjointfrom": "error",
Expand Down
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ module.exports = {
"no-proxy": require("./rules/no-proxy"),
"no-reflect": require("./rules/no-reflect"),
"no-regexp-d-flag": require("./rules/no-regexp-d-flag"),
"no-regexp-duplicate-named-capturing-groups": require("./rules/no-regexp-duplicate-named-capturing-groups"),
"no-regexp-lookbehind-assertions": require("./rules/no-regexp-lookbehind-assertions"),
"no-regexp-named-capture-groups": require("./rules/no-regexp-named-capture-groups"),
"no-regexp-prototype-compile": require("./rules/no-regexp-prototype-compile"),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-es-x",
"version": "7.7.0",
"version": "7.8.0",
"description": "ESLint plugin about ECMAScript syntactic features.",
"engines": {
"node": "^14.18.0 || >=16.0.0"
Expand Down
2 changes: 1 addition & 1 deletion scripts/fetch-lines.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
module.exports = { fetchLines }

async function* fetchLines(url) {
const response = await fetch(url) // eslint-disable-line n/no-unsupported-features/node-builtins -- non-production code
const response = await fetch(url)

Check failure on line 6 in scripts/fetch-lines.js

View workflow job for this annotation

GitHub Actions / Lint

The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '^14.18.0 || >=16.0.0'
yield* (await response.text()).split("\n")
}

0 comments on commit b988f26

Please sign in to comment.