Repository: eslint-community/eslint-plugin-es-x
Pull request #48 (2023-01-20 06:51:36)

chore: refactor auto-generation scripts
This PR refactors the auto-generation script to prepare it for later generation of shareable configs for Intl API.

related to #45


Patch:
diff --git a/.github/workflows/GHPages.yml b/.github/workflows/GHPages.yml
index 058fc3c..04f4745 100644
--- a/.github/workflows/GHPages.yml
+++ b/.github/workflows/GHPages.yml
@@ -32,7 +32,7 @@ jobs:
         run: |+
           npm run docs:build
       - name: Setup Pages
-        uses: actions/configure-pages@v2
+        uses: actions/configure-pages@v3
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v1
         with:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0abf7c4..f338e07 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,8 +16,6 @@ jobs:
         uses: actions/checkout@v3
       - name: Install Node.js
         uses: actions/setup-node@v3
-        with:
-          node-version: 14
       - name: Install Packages
         run: npm install
       - name: Lint
@@ -28,43 +26,37 @@ jobs:
 
     strategy:
       matrix:
-        eslint: [8]
-        node: [16]
-        os: [ubuntu-latest]
         include:
+          - eslint: 8
+            node: 18
+            os: ubuntu-latest
           # On other platforms
           - eslint: 8
-            node: 16
+            node: 18
             os: windows-latest
           - eslint: 8
-            node: 16
+            node: 18
             os: macos-latest
-          # On old Node.js versions
+          # On other Node.js versions
           - eslint: 8
-            node: 14
+            node: 19
             os: ubuntu-latest
-          - eslint: 7
-            node: 12
-            os: ubuntu-latest
-          - eslint: 7
-            node: 10
-            os: ubuntu-latest
-          # On old ESLint versions
-          - eslint: 7
+          - eslint: 8
             node: 16
             os: ubuntu-latest
-          - eslint: 6
-            node: 16
+          - eslint: 8
+            node: 17
             os: ubuntu-latest
-          - eslint: 5
-            node: 16
+          - eslint: 8
+            node: 14
             os: ubuntu-latest
-          - eslint: 4
-            node: 16
+          # On old ESLint versions
+          - eslint: 8.0.0
+            node: 18
             os: ubuntu-latest
           # On the minimum supported ESLint/Node.js version
-          - eslint: 4
-            node: "8.10"
+          - eslint: 8.0.0
+            node: 14.18.0
             os: ubuntu-latest
 
     runs-on: ${{ matrix.os }}
@@ -78,31 +70,11 @@ jobs:
       - name: Uninstall Packages
         run: |+
             npm r -D vuepress eslint-plugin-eslint-plugin eslint-plugin-prettier vue-eslint-parser eslint-plugin-vue
-      - name: Install for Node v8
-        run: |+
-            npm i -D @typescript-eslint/parser@3 mocha@7
-        if: "matrix.node == '8.10'"
-      - name: Install for Node v10
-        run: |+
-            npm i -D mocha@9
-        if: "matrix.node == 10"
-      - name: Install for ESLint v4
-        run: |+
-            npm i -D eslint-utils@2 --legacy-peer-deps
-        if: "matrix.eslint == 4"
-      - name: Install for ESLint v5
-        run: |+
-            npm i -D @typescript-eslint/parser@4 --legacy-peer-deps
-        if: "matrix.eslint == 5"
       - name: Install ESLint ${{ matrix.eslint }}
         run: |+
             npm install -D eslint@${{ matrix.eslint }}
             npx rimraf node_modules
       - name: Install Packages
         run: npm install
-        if: "matrix.eslint != 4 || matrix.node == '8.10'"
-      - name: Install Packages --legacy-peer-deps
-        run: npm install --legacy-peer-deps
-        if: "matrix.eslint == 4 && matrix.node != '8.10'"
       - name: Test
         run: npm run -s test:mocha
diff --git a/docs/README.md b/docs/README.md
index caa240e..ffc43eb 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -25,8 +25,8 @@ npm install --save-dev eslint eslint-plugin-es-x
 ```
 
 ::: tip Requirements
-- Node.js `8.10.0` or newer.
-- ESLint `4.19.1` or newer.
+- Node.js `14.18.0` or newer, except `15.x`.
+- ESLint `8.x` or newer.
 :::
 
 ## 📖 Usage
diff --git a/docs/rules/README.md b/docs/rules/README.md
index e5b6e70..8b835ad 100644
--- a/docs/rules/README.md
+++ b/docs/rules/README.md
@@ -23,6 +23,7 @@ There are multiple configs that enable all rules in this category: `plugin:es-x/
 | [es-x/no-array-string-prototype-at](./no-array-string-prototype-at.md) | disallow the `{Array,String}.prototype.at()` methods. |  |
 | [es-x/no-class-fields](./no-class-fields.md) | disallow class fields. |  |
 | [es-x/no-class-static-block](./no-class-static-block.md) | disallow class static block. |  |
+| [es-x/no-error-cause](./no-error-cause.md) | disallow Error Cause. |  |
 | [es-x/no-object-hasown](./no-object-hasown.md) | disallow the `Object.hasOwn` method. |  |
 | [es-x/no-private-in](./no-private-in.md) | disallow `#x in obj`. |  |
 | [es-x/no-regexp-d-flag](./no-regexp-d-flag.md) | disallow RegExp `d` flag. |  |
@@ -234,8 +235,8 @@ There are multiple configs that enable all rules in this category: `plugin:es-x/
 
 ## Legacy
 
-Rules in this category disallow the syntax contained in [Annex B](https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html) or Legacy.  
-The rules are not included in any preset.
+Rules in this category disallow the syntax contained in [Annex B](https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html) or Legacy. \
+Rules in this category are not included in any preset.
 
 | Rule ID | Description |    |
 |:--------|:------------|:--:|
diff --git a/docs/rules/no-error-cause.md b/docs/rules/no-error-cause.md
new file mode 100644
index 0000000..992816b
--- /dev/null
+++ b/docs/rules/no-error-cause.md
@@ -0,0 +1,30 @@
+---
+title: "es-x/no-error-cause"
+description: "disallow Error Cause"
+---
+
+# es-x/no-error-cause
+> disallow Error Cause
+
+- ❗ <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: `plugin:es-x/no-new-in-es2022`, `plugin:es-x/restrict-to-es3`, `plugin:es-x/restrict-to-es5`, `plugin:es-x/restrict-to-es2015`, `plugin:es-x/restrict-to-es2016`, `plugin:es-x/restrict-to-es2017`, `plugin:es-x/restrict-to-es2018`, `plugin:es-x/restrict-to-es2019`, `plugin:es-x/restrict-to-es2020`, and `plugin:es-x/restrict-to-es2021`
+
+This rule reports ES2022 [Error Cause](https://github.com/tc39/proposal-error-cause).
+
+## 💡 Examples
+
+⛔ Examples of **incorrect** code for this rule:
+
+<eslint-playground type="bad">
+
+```js
+/*eslint es-x/no-error-cause: error */
+throw new Error('failed', { cause: err });
+```
+
+</eslint-playground>
+
+## 📚 References
+
+- [Rule source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-error-cause.js)
+- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-error-cause.js)
diff --git a/lib/configs/no-new-in-es2022.js b/lib/configs/no-new-in-es2022.js
index 4e78303..27d020e 100644
--- a/lib/configs/no-new-in-es2022.js
+++ b/lib/configs/no-new-in-es2022.js
@@ -11,6 +11,7 @@ module.exports = {
         "es-x/no-array-string-prototype-at": "error",
         "es-x/no-class-fields": "error",
         "es-x/no-class-static-block": "error",
+        "es-x/no-error-cause": "error",
         "es-x/no-object-hasown": "error",
         "es-x/no-private-in": "error",
         "es-x/no-regexp-d-flag": "error",
diff --git a/lib/index.js b/lib/index.js
index 8dfdcc5..09db08b 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -96,6 +96,7 @@ module.exports = {
         "no-default-parameters": require("./rules/no-default-parameters"),
         "no-destructuring": require("./rules/no-destructuring"),
         "no-dynamic-import": require("./rules/no-dynamic-import"),
+        "no-error-cause": require("./rules/no-error-cause"),
         "no-escape-unescape": require("./rules/no-escape-unescape"),
         "no-exponential-operators": require("./rules/no-exponential-operators"),
         "no-export-ns-from": require("./rules/no-export-ns-from"),
diff --git a/lib/rules/no-array-from.js b/lib/rules/no-array-from.js
index 0306388..ccc64c6 100644
--- a/lib/rules/no-array-from.js
+++ b/lib/rules/no-array-from.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-array-isarray.js b/lib/rules/no-array-isarray.js
index 47832f4..de927d5 100644
--- a/lib/rules/no-array-isarray.js
+++ b/lib/rules/no-array-isarray.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-array-of.js b/lib/rules/no-array-of.js
index 712514f..ac38285 100644
--- a/lib/rules/no-array-of.js
+++ b/lib/rules/no-array-of.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-arrow-functions.js b/lib/rules/no-arrow-functions.js
index e652a87..7383e8d 100644
--- a/lib/rules/no-arrow-functions.js
+++ b/lib/rules/no-arrow-functions.js
@@ -4,7 +4,10 @@
  */
 "use strict"
 
-const { isArrowToken, isParenthesized } = require("eslint-utils")
+const {
+    isArrowToken,
+    isParenthesized,
+} = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-atomics.js b/lib/rules/no-atomics.js
index 1daa92e..dbae839 100644
--- a/lib/rules/no-atomics.js
+++ b/lib/rules/no-atomics.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-bigint.js b/lib/rules/no-bigint.js
index 577a2f2..4615124 100644
--- a/lib/rules/no-bigint.js
+++ b/lib/rules/no-bigint.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { ReferenceTracker } = require("eslint-utils")
+const { ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-class-fields.js b/lib/rules/no-class-fields.js
index 08c4937..e753b35 100644
--- a/lib/rules/no-class-fields.js
+++ b/lib/rules/no-class-fields.js
@@ -4,7 +4,10 @@
  */
 "use strict"
 
-const { getFunctionNameWithKind, getPropertyName } = require("eslint-utils")
+const {
+    getFunctionNameWithKind,
+    getPropertyName,
+} = require("@eslint-community/eslint-utils")
 
 /**
  * Get the name and kind of the given PropertyDefinition node.
diff --git a/lib/rules/no-date-now.js b/lib/rules/no-date-now.js
index 8138937..5a6ab16 100644
--- a/lib/rules/no-date-now.js
+++ b/lib/rules/no-date-now.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-error-cause.js b/lib/rules/no-error-cause.js
new file mode 100644
index 0000000..1302789
--- /dev/null
+++ b/lib/rules/no-error-cause.js
@@ -0,0 +1,186 @@
+/**
+ * @author Sosuke Suzuki <https://github.com/sosukesuzuki>
+ * See LICENSE file in root directory for full license.
+ */
+
+"use strict"
+
+const {
+    CONSTRUCT,
+    READ,
+    ReferenceTracker,
+    getPropertyName,
+} = require("@eslint-community/eslint-utils")
+
+/**
+ * @typedef {import("estree").Node} Node
+ * @typedef {import("estree").ClassExpression | import("estree").ClassDeclaration} ClassNode
+ * @typedef {import("estree").CallExpression} CallExpression
+ */
+
+const errorConstructorNames = [
+    "Error",
+    "EvalError",
+    "RangeError",
+    "ReferenceError",
+    "SyntaxError",
+    "TypeError",
+    "URIError",
+    "AggregateError",
+]
+const errorsTraceMap = {}
+for (const errorConstructorName of errorConstructorNames) {
+    errorsTraceMap[errorConstructorName] = { [CONSTRUCT]: true, [READ]: true }
+}
+
+/**
+ * @param {Node} node
+ * @returns {boolean}
+ */
+function isSuperCall(node) {
+    return node.type === "CallExpression" && node.callee.type === "Super"
+}
+
+/**
+ * @param {Node|undefined} node
+ * @returns {boolean}
+ */
+function isSpreadElement(node) {
+    return node && node.type === "SpreadElement"
+}
+
+/**
+ * @param {Node} node
+ * @returns {ClassNode | null}
+ */
+function findClassFromAncestors(node) {
+    if (node.type !== "ClassExpression" && node.type !== "ClassDeclaration") {
+        return findClassFromAncestors(node.parent)
+    }
+    if (!node) {
+        return null
+    }
+    return node
+}
+
+module.exports = {
+    meta: {
+        docs: {
+            description: "disallow Error Cause.",
+            category: "ES2022",
+            recommended: false,
+            url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-error-cause.html",
+        },
+        fixable: null,
+        messages: {
+            forbidden: "ES2022 Error Cause is forbidden.",
+        },
+        schema: [],
+        type: "problem",
+    },
+    create(context) {
+        /** @type {Array<{ classNode: ClassNode, superCallNode: CallExpression }>} */
+        const maybeErrorSubclasses = []
+
+        /** @type {Array<{ classNode: ClassNode, superCallNode: CallExpression }>} */
+        const maybeAggregateErrorSubclasses = []
+
+        /**
+         * Checks if the received node is a constructor call with cause option.
+         * e.g. `new Error("message", { cause: foo })`, `super("message", { cause: foo })`
+         *
+         * @param {Node} node
+         * @param {boolean} isAggregateError
+         * @returns {boolean}
+         */
+        function isConstructCallWithCauseOption(node, isAggregateError) {
+            if (node.type !== "NewExpression" && !isSuperCall(node)) {
+                return false
+            }
+            const optionsArgIndex = isAggregateError ? 2 : 1
+            for (let index = 0; index < optionsArgIndex; index++) {
+                if (isSpreadElement(node.arguments[index])) {
+                    return false
+                }
+            }
+            const optionsArg = node.arguments[optionsArgIndex]
+            if (!optionsArg || optionsArg.type !== "ObjectExpression") {
+                return false
+            }
+            return optionsArg.properties.some((property) => {
+                if (property.type !== "Property") {
+                    return false
+                }
+                // new Error("msg", { cause: foo })
+                return getPropertyName(property, context.getScope()) === "cause"
+            })
+        }
+
+        /**
+         * @param {Node} node
+         * @param {isAggregateError} boolean
+         * @return {Node | null}
+         */
+        function getReportedNode(node, isAggregateError) {
+            const errorSubclasses = isAggregateError
+                ? maybeAggregateErrorSubclasses
+                : maybeErrorSubclasses
+
+            if (errorSubclasses.length > 0) {
+                for (const { classNode, superCallNode } of errorSubclasses) {
+                    if (classNode.superClass === node) {
+                        return superCallNode
+                    }
+                }
+            }
+            if (isConstructCallWithCauseOption(node, isAggregateError)) {
+                return node
+            }
+            return null
+        }
+
+        return {
+            Super(node) {
+                const superCallNode = node.parent
+
+                function findErrorSubclasses(isAggregateError) {
+                    const errorSubclasses = isAggregateError
+                        ? maybeAggregateErrorSubclasses
+                        : maybeErrorSubclasses
+
+                    if (
+                        isConstructCallWithCauseOption(
+                            superCallNode,
+                            isAggregateError,
+                        )
+                    ) {
+                        const classNode = findClassFromAncestors(superCallNode)
+                        if (classNode && classNode.superClass) {
+                            errorSubclasses.push({ classNode, superCallNode })
+                        }
+                    }
+                }
+
+                findErrorSubclasses(/* isAggregateError */ false)
+                findErrorSubclasses(/* isAggregateError */ true)
+            },
+            "Program:exit"() {
+                const tracker = new ReferenceTracker(context.getScope())
+                for (const { node, path } of tracker.iterateGlobalReferences(
+                    errorsTraceMap,
+                )) {
+                    const reportedNode = getReportedNode(
+                        node,
+                        path.join(",") === "AggregateError",
+                    )
+                    if (reportedNode) {
+                        context.report({
+                            node: reportedNode,
+                            messageId: "forbidden",
+                        })
+                    }
+                }
+            },
+        }
+    },
+}
diff --git a/lib/rules/no-escape-unescape.js b/lib/rules/no-escape-unescape.js
index 31f0873..eee701e 100644
--- a/lib/rules/no-escape-unescape.js
+++ b/lib/rules/no-escape-unescape.js
@@ -1,6 +1,6 @@
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-global-this.js b/lib/rules/no-global-this.js
index c2626d1..30bdae7 100644
--- a/lib/rules/no-global-this.js
+++ b/lib/rules/no-global-this.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-json.js b/lib/rules/no-json.js
index b5a3409..06e9e44 100644
--- a/lib/rules/no-json.js
+++ b/lib/rules/no-json.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-legacy-object-prototype-accessor-methods.js b/lib/rules/no-legacy-object-prototype-accessor-methods.js
index 14b3760..765ae29 100644
--- a/lib/rules/no-legacy-object-prototype-accessor-methods.js
+++ b/lib/rules/no-legacy-object-prototype-accessor-methods.js
@@ -1,6 +1,9 @@
 "use strict"
 
-const { getPropertyName, findVariable } = require("eslint-utils")
+const {
+    getPropertyName,
+    findVariable,
+} = require("@eslint-community/eslint-utils")
 
 const LEGACY_ACCESSOR_METHODS = new Set([
     "__defineGetter__",
diff --git a/lib/rules/no-logical-assignment-operators.js b/lib/rules/no-logical-assignment-operators.js
index c8e42a0..a6a9e29 100644
--- a/lib/rules/no-logical-assignment-operators.js
+++ b/lib/rules/no-logical-assignment-operators.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const utils = require("eslint-utils")
+const utils = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-map.js b/lib/rules/no-map.js
index a54ab7a..cec74c6 100644
--- a/lib/rules/no-map.js
+++ b/lib/rules/no-map.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-acosh.js b/lib/rules/no-math-acosh.js
index 2a55694..3b54c60 100644
--- a/lib/rules/no-math-acosh.js
+++ b/lib/rules/no-math-acosh.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-asinh.js b/lib/rules/no-math-asinh.js
index e22a4e0..fdd27d7 100644
--- a/lib/rules/no-math-asinh.js
+++ b/lib/rules/no-math-asinh.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-atanh.js b/lib/rules/no-math-atanh.js
index 533e8c4..255f822 100644
--- a/lib/rules/no-math-atanh.js
+++ b/lib/rules/no-math-atanh.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-cbrt.js b/lib/rules/no-math-cbrt.js
index e3476e9..6083b1c 100644
--- a/lib/rules/no-math-cbrt.js
+++ b/lib/rules/no-math-cbrt.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-clz32.js b/lib/rules/no-math-clz32.js
index b9e2a62..65df78b 100644
--- a/lib/rules/no-math-clz32.js
+++ b/lib/rules/no-math-clz32.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-cosh.js b/lib/rules/no-math-cosh.js
index f3b17ef..5135af3 100644
--- a/lib/rules/no-math-cosh.js
+++ b/lib/rules/no-math-cosh.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-expm1.js b/lib/rules/no-math-expm1.js
index 8da0aa1..4735ab8 100644
--- a/lib/rules/no-math-expm1.js
+++ b/lib/rules/no-math-expm1.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-fround.js b/lib/rules/no-math-fround.js
index 965269d..3bb76ba 100644
--- a/lib/rules/no-math-fround.js
+++ b/lib/rules/no-math-fround.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-hypot.js b/lib/rules/no-math-hypot.js
index 9343d6a..ce3b5c3 100644
--- a/lib/rules/no-math-hypot.js
+++ b/lib/rules/no-math-hypot.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-imul.js b/lib/rules/no-math-imul.js
index ef74432..0e7c5bd 100644
--- a/lib/rules/no-math-imul.js
+++ b/lib/rules/no-math-imul.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-log10.js b/lib/rules/no-math-log10.js
index cb42023..1f91d55 100644
--- a/lib/rules/no-math-log10.js
+++ b/lib/rules/no-math-log10.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-log1p.js b/lib/rules/no-math-log1p.js
index 9c248fc..dba86ac 100644
--- a/lib/rules/no-math-log1p.js
+++ b/lib/rules/no-math-log1p.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-log2.js b/lib/rules/no-math-log2.js
index af2c4a0..30fbccc 100644
--- a/lib/rules/no-math-log2.js
+++ b/lib/rules/no-math-log2.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-sign.js b/lib/rules/no-math-sign.js
index cc41799..3ccfffe 100644
--- a/lib/rules/no-math-sign.js
+++ b/lib/rules/no-math-sign.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-sinh.js b/lib/rules/no-math-sinh.js
index 65a6316..018e68b 100644
--- a/lib/rules/no-math-sinh.js
+++ b/lib/rules/no-math-sinh.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-tanh.js b/lib/rules/no-math-tanh.js
index 5658058..974d442 100644
--- a/lib/rules/no-math-tanh.js
+++ b/lib/rules/no-math-tanh.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-math-trunc.js b/lib/rules/no-math-trunc.js
index 638ef40..ef9c543 100644
--- a/lib/rules/no-math-trunc.js
+++ b/lib/rules/no-math-trunc.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-number-epsilon.js b/lib/rules/no-number-epsilon.js
index 9534693..cd0abb9 100644
--- a/lib/rules/no-number-epsilon.js
+++ b/lib/rules/no-number-epsilon.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-number-isfinite.js b/lib/rules/no-number-isfinite.js
index 9ee992c..e475452 100644
--- a/lib/rules/no-number-isfinite.js
+++ b/lib/rules/no-number-isfinite.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-number-isinteger.js b/lib/rules/no-number-isinteger.js
index 27342f5..98de991 100644
--- a/lib/rules/no-number-isinteger.js
+++ b/lib/rules/no-number-isinteger.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-number-isnan.js b/lib/rules/no-number-isnan.js
index 3583f5c..7b1f3cf 100644
--- a/lib/rules/no-number-isnan.js
+++ b/lib/rules/no-number-isnan.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-number-issafeinteger.js b/lib/rules/no-number-issafeinteger.js
index 9115a48..133e63e 100644
--- a/lib/rules/no-number-issafeinteger.js
+++ b/lib/rules/no-number-issafeinteger.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-number-maxsafeinteger.js b/lib/rules/no-number-maxsafeinteger.js
index e3cd334..676af47 100644
--- a/lib/rules/no-number-maxsafeinteger.js
+++ b/lib/rules/no-number-maxsafeinteger.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-number-minsafeinteger.js b/lib/rules/no-number-minsafeinteger.js
index 90abb90..9f28006 100644
--- a/lib/rules/no-number-minsafeinteger.js
+++ b/lib/rules/no-number-minsafeinteger.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-number-parsefloat.js b/lib/rules/no-number-parsefloat.js
index 08159ba..85539dc 100644
--- a/lib/rules/no-number-parsefloat.js
+++ b/lib/rules/no-number-parsefloat.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-number-parseint.js b/lib/rules/no-number-parseint.js
index 0e3aef3..d949246 100644
--- a/lib/rules/no-number-parseint.js
+++ b/lib/rules/no-number-parseint.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-assign.js b/lib/rules/no-object-assign.js
index e16f0e1..b852c34 100644
--- a/lib/rules/no-object-assign.js
+++ b/lib/rules/no-object-assign.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-create.js b/lib/rules/no-object-create.js
index 4ec65df..407d771 100644
--- a/lib/rules/no-object-create.js
+++ b/lib/rules/no-object-create.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { ReferenceTracker, READ } = require("eslint-utils")
+const { ReferenceTracker, READ } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-defineproperties.js b/lib/rules/no-object-defineproperties.js
index 42bfb4d..37bf10c 100644
--- a/lib/rules/no-object-defineproperties.js
+++ b/lib/rules/no-object-defineproperties.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-defineproperty.js b/lib/rules/no-object-defineproperty.js
index 32247dc..76bc39e 100644
--- a/lib/rules/no-object-defineproperty.js
+++ b/lib/rules/no-object-defineproperty.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-entries.js b/lib/rules/no-object-entries.js
index b1e0dfc..4d2b7bf 100644
--- a/lib/rules/no-object-entries.js
+++ b/lib/rules/no-object-entries.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-freeze.js b/lib/rules/no-object-freeze.js
index c113423..a7924a7 100644
--- a/lib/rules/no-object-freeze.js
+++ b/lib/rules/no-object-freeze.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-fromentries.js b/lib/rules/no-object-fromentries.js
index cc65dac..4759957 100644
--- a/lib/rules/no-object-fromentries.js
+++ b/lib/rules/no-object-fromentries.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-getownpropertydescriptor.js b/lib/rules/no-object-getownpropertydescriptor.js
index e0c50f0..55951ca 100644
--- a/lib/rules/no-object-getownpropertydescriptor.js
+++ b/lib/rules/no-object-getownpropertydescriptor.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-getownpropertydescriptors.js b/lib/rules/no-object-getownpropertydescriptors.js
index d1f9f24..5f89a62 100644
--- a/lib/rules/no-object-getownpropertydescriptors.js
+++ b/lib/rules/no-object-getownpropertydescriptors.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-getownpropertynames.js b/lib/rules/no-object-getownpropertynames.js
index ef09594..54b87a9 100644
--- a/lib/rules/no-object-getownpropertynames.js
+++ b/lib/rules/no-object-getownpropertynames.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-getownpropertysymbols.js b/lib/rules/no-object-getownpropertysymbols.js
index 24ce942..39dc647 100644
--- a/lib/rules/no-object-getownpropertysymbols.js
+++ b/lib/rules/no-object-getownpropertysymbols.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-getprototypeof.js b/lib/rules/no-object-getprototypeof.js
index d524b26..63e0983 100644
--- a/lib/rules/no-object-getprototypeof.js
+++ b/lib/rules/no-object-getprototypeof.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-hasown.js b/lib/rules/no-object-hasown.js
index 352dd4d..035d19d 100644
--- a/lib/rules/no-object-hasown.js
+++ b/lib/rules/no-object-hasown.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-is.js b/lib/rules/no-object-is.js
index 26cb675..7833b2a 100644
--- a/lib/rules/no-object-is.js
+++ b/lib/rules/no-object-is.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-isextensible.js b/lib/rules/no-object-isextensible.js
index 44ee3ac..3647a5d 100644
--- a/lib/rules/no-object-isextensible.js
+++ b/lib/rules/no-object-isextensible.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-isfrozen.js b/lib/rules/no-object-isfrozen.js
index 8506f1a..50079d8 100644
--- a/lib/rules/no-object-isfrozen.js
+++ b/lib/rules/no-object-isfrozen.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-issealed.js b/lib/rules/no-object-issealed.js
index 988b018..daec20c 100644
--- a/lib/rules/no-object-issealed.js
+++ b/lib/rules/no-object-issealed.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-keys.js b/lib/rules/no-object-keys.js
index d5421bb..19d5469 100644
--- a/lib/rules/no-object-keys.js
+++ b/lib/rules/no-object-keys.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-preventextensions.js b/lib/rules/no-object-preventextensions.js
index 7bfe266..0e9594c 100644
--- a/lib/rules/no-object-preventextensions.js
+++ b/lib/rules/no-object-preventextensions.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-seal.js b/lib/rules/no-object-seal.js
index 2c9a9b2..4e0f38d 100644
--- a/lib/rules/no-object-seal.js
+++ b/lib/rules/no-object-seal.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-setprototypeof.js b/lib/rules/no-object-setprototypeof.js
index 2c94602..3e2e9db 100644
--- a/lib/rules/no-object-setprototypeof.js
+++ b/lib/rules/no-object-setprototypeof.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-object-values.js b/lib/rules/no-object-values.js
index 4d41d2b..99fcb5b 100644
--- a/lib/rules/no-object-values.js
+++ b/lib/rules/no-object-values.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-promise-all-settled.js b/lib/rules/no-promise-all-settled.js
index 8fb1df4..d400634 100644
--- a/lib/rules/no-promise-all-settled.js
+++ b/lib/rules/no-promise-all-settled.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-promise-any.js b/lib/rules/no-promise-any.js
index 59bf823..68eb9c8 100644
--- a/lib/rules/no-promise-any.js
+++ b/lib/rules/no-promise-any.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-promise.js b/lib/rules/no-promise.js
index 3d6ea3c..634ee01 100644
--- a/lib/rules/no-promise.js
+++ b/lib/rules/no-promise.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-property-shorthands.js b/lib/rules/no-property-shorthands.js
index 190f10e..97466c9 100644
--- a/lib/rules/no-property-shorthands.js
+++ b/lib/rules/no-property-shorthands.js
@@ -4,7 +4,10 @@
  */
 "use strict"
 
-const { isOpeningBracketToken, isClosingBracketToken } = require("eslint-utils")
+const {
+    isOpeningBracketToken,
+    isClosingBracketToken,
+} = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-proxy.js b/lib/rules/no-proxy.js
index 2db8748..ff4a51b 100644
--- a/lib/rules/no-proxy.js
+++ b/lib/rules/no-proxy.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-reflect.js b/lib/rules/no-reflect.js
index f528557..c0f9712 100644
--- a/lib/rules/no-reflect.js
+++ b/lib/rules/no-reflect.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-regexp-lookbehind-assertions.js b/lib/rules/no-regexp-lookbehind-assertions.js
index f6d4df3..cf806aa 100644
--- a/lib/rules/no-regexp-lookbehind-assertions.js
+++ b/lib/rules/no-regexp-lookbehind-assertions.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { RegExpValidator } = require("regexpp")
+const { RegExpValidator } = require("@eslint-community/regexpp")
 const { getRegExpCalls } = require("../utils")
 
 /**
diff --git a/lib/rules/no-regexp-named-capture-groups.js b/lib/rules/no-regexp-named-capture-groups.js
index 69ade46..3a29b5d 100644
--- a/lib/rules/no-regexp-named-capture-groups.js
+++ b/lib/rules/no-regexp-named-capture-groups.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { RegExpValidator } = require("regexpp")
+const { RegExpValidator } = require("@eslint-community/regexpp")
 const { getRegExpCalls } = require("../utils")
 
 /**
diff --git a/lib/rules/no-regexp-unicode-property-escapes-2019.js b/lib/rules/no-regexp-unicode-property-escapes-2019.js
index e7def24..d3ae93a 100644
--- a/lib/rules/no-regexp-unicode-property-escapes-2019.js
+++ b/lib/rules/no-regexp-unicode-property-escapes-2019.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { RegExpValidator } = require("regexpp")
+const { RegExpValidator } = require("@eslint-community/regexpp")
 const { getRegExpCalls } = require("../utils")
 
 const scNamePattern = /^(?:Script(?:_Extensions)?|scx?)$/u
diff --git a/lib/rules/no-regexp-unicode-property-escapes.js b/lib/rules/no-regexp-unicode-property-escapes.js
index 8704739..6f98feb 100644
--- a/lib/rules/no-regexp-unicode-property-escapes.js
+++ b/lib/rules/no-regexp-unicode-property-escapes.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { RegExpValidator } = require("regexpp")
+const { RegExpValidator } = require("@eslint-community/regexpp")
 const { getRegExpCalls } = require("../utils")
 
 /**
diff --git a/lib/rules/no-set.js b/lib/rules/no-set.js
index 80afbd6..e7f6132 100644
--- a/lib/rules/no-set.js
+++ b/lib/rules/no-set.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-shared-array-buffer.js b/lib/rules/no-shared-array-buffer.js
index 85632ca..92ab442 100644
--- a/lib/rules/no-shared-array-buffer.js
+++ b/lib/rules/no-shared-array-buffer.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-string-fromcodepoint.js b/lib/rules/no-string-fromcodepoint.js
index 4a70d2a..73e6f1a 100644
--- a/lib/rules/no-string-fromcodepoint.js
+++ b/lib/rules/no-string-fromcodepoint.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-string-raw.js b/lib/rules/no-string-raw.js
index 3d39ba8..64557a9 100644
--- a/lib/rules/no-string-raw.js
+++ b/lib/rules/no-string-raw.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-subclassing-builtins.js b/lib/rules/no-subclassing-builtins.js
index 0acb01c..8e2be95 100644
--- a/lib/rules/no-subclassing-builtins.js
+++ b/lib/rules/no-subclassing-builtins.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-symbol.js b/lib/rules/no-symbol.js
index 794aaf0..e24d20b 100644
--- a/lib/rules/no-symbol.js
+++ b/lib/rules/no-symbol.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-typed-arrays.js b/lib/rules/no-typed-arrays.js
index c355724..8f75fb6 100644
--- a/lib/rules/no-typed-arrays.js
+++ b/lib/rules/no-typed-arrays.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-weak-map.js b/lib/rules/no-weak-map.js
index 3e2832a..c44cd9f 100644
--- a/lib/rules/no-weak-map.js
+++ b/lib/rules/no-weak-map.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-weak-set.js b/lib/rules/no-weak-set.js
index c56e4a2..a3073ec 100644
--- a/lib/rules/no-weak-set.js
+++ b/lib/rules/no-weak-set.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/rules/no-weakrefs.js b/lib/rules/no-weakrefs.js
index 454fc5c..bcb1463 100644
--- a/lib/rules/no-weakrefs.js
+++ b/lib/rules/no-weakrefs.js
@@ -4,7 +4,7 @@
  */
 "use strict"
 
-const { READ, ReferenceTracker } = require("eslint-utils")
+const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
 
 module.exports = {
     meta: {
diff --git a/lib/util/define-prototype-method-handler.js b/lib/util/define-prototype-method-handler.js
index 94896c3..00ee11d 100644
--- a/lib/util/define-prototype-method-handler.js
+++ b/lib/util/define-prototype-method-handler.js
@@ -1,6 +1,6 @@
 "use strict"
 
-const { getPropertyName } = require("eslint-utils")
+const { getPropertyName } = require("@eslint-community/eslint-utils")
 const { optionalRequire } = require("./optional-require")
 
 /** @type {import("typescript")} */
diff --git a/lib/utils.js b/lib/utils.js
index 3032256..19d0627 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -10,7 +10,7 @@ const {
     PatternMatcher,
     ReferenceTracker,
     getStringIfConstant,
-} = require("eslint-utils")
+} = require("@eslint-community/eslint-utils")
 
 module.exports = {
     /**
diff --git a/package.json b/package.json
index a16a1cb..1ac15ad 100644
--- a/package.json
+++ b/package.json
@@ -3,18 +3,18 @@
   "version": "5.4.0",
   "description": "ESLint plugin about ECMAScript syntactic features.",
   "engines": {
-    "node": ">=8.10.0"
+    "node": "^14.18.0 || >=16.0.0"
   },
   "main": "lib/index.js",
   "files": [
     "lib"
   ],
   "peerDependencies": {
-    "eslint": ">=4.19.1"
+    "eslint": ">=8"
   },
   "dependencies": {
-    "eslint-utils": "^2.0.0 || ^3.0.0",
-    "regexpp": "^3.0.0"
+    "@eslint-community/eslint-utils": "^4.1.2",
+    "@eslint-community/regexpp": "^4.2.0"
   },
   "devDependencies": {
     "@typescript-eslint/parser": "^5.14.0",
@@ -32,7 +32,7 @@
     "npm-run-all": "^4.1.5",
     "nyc": "^15.0.0",
     "opener": "^1.5.1",
-    "rimraf": "^3.0.0",
+    "rimraf": "^4.1.2",
     "semver": "^7.0.0",
     "typescript": "^4.1.2",
     "vue-eslint-editor": "^1.1.0",
diff --git a/scripts/rules.js b/scripts/rules.js
index 2f0b2f3..25243e8 100644
--- a/scripts/rules.js
+++ b/scripts/rules.js
@@ -18,42 +18,86 @@ const libRoot = path.resolve(__dirname, "../lib/rules")
 /**
  * @typedef {Object} Category
  * @property {string} id The category name.
- * @property {number} revision The revision number.
- * @property {string} configName The config name.
- * @property {string} aboveConfigName The config name for disallowing features all above.
+ * @property {string} title The category title.
+ * @property {number} [edition] The edition number.
+ * @property {string} [configName] The config name.
+ * @property {string} [aboveConfigName] The config name for disallowing features all above.
  * @property {Rule[]} rules The rules in this category.
  * @property {boolean} [experimental] The flag to be belong to experimental configs.
+ * @property {string} [comment] The category comment.
+ * @property {"ecma262" | "ecma402"} specKind The specification kind.
  */
 
 /** @type {Record<string, Category>} */
-const categories = [14, 13, 12, 11, 10, 9, 8, 7, 6, 5].reduce(
-    (map, revision, _, [latest]) => {
-        const year = revision <= 5 ? 5 : 2009 + revision
-        const id = `ES${year}`
-        map[id] = {
-            id,
-            title: id,
-            revision,
-            rules: [],
-            experimental: revision === latest,
+const categories = [
+    2023,
+    2022,
+    2021,
+    2020,
+    2019,
+    2018,
+    2017,
+    2016,
+    2015,
+    [5, 1],
+    [3, null],
+]
+    .map((esVersion) =>
+        Array.isArray(esVersion) ? esVersion : [esVersion, esVersion],
+    )
+    .reduce((map, versions, index, list) => {
+        const experimental = index === 0
+        const [vFor262, _vFor402] = versions
+        const [prevVFor262, _prevVFor402] = list[index + 1] || [null, null]
+        const ecma262Id = `ES${vFor262}`
+        if (prevVFor262) {
+            map[ecma262Id] = {
+                id: ecma262Id,
+                title: `ES${vFor262}`,
+                edition: vFor262 > 5 ? vFor262 - 2009 : vFor262,
+                rules: [],
+                experimental,
+                specKind: "ecma262",
+                configName: experimental
+                    ? "no-new-in-esnext"
+                    : `no-new-in-es${vFor262}`,
+                aboveConfigName: experimental
+                    ? undefined
+                    : `restrict-to-es${prevVFor262}`,
+            }
         }
+        // TODO: https://github.com/eslint-community/eslint-plugin-es-x/issues/45
+        // if (vFor402 && prevVFor402) {
+        //     const ecma402Id = `ES${vFor402}-Intl-API`
+        //     map[ecma402Id] = {
+        //         id: ecma402Id,
+        //         title: `ES${vFor402} Intl API`,
+        //         edition: vFor402 - 2013,
+        //         rules: [],
+        //         experimental,
+        //         specKind: "ecma402",
+        //         configName: experimental
+        //             ? "no-new-in-esnext-intl-api"
+        //             : `no-new-in-es${vFor402}-intl-api`,
+        //         aboveConfigName: experimental
+        //             ? undefined
+        //             : prevVFor402 === 1
+        //             ? "restrict-to-es-intl-api-1st-edition"
+        //             : `restrict-to-es${prevVFor402}-intl-api`,
+        //     }
+        // }
         return map
-    },
-    {},
-)
+    }, {})
 categories.legacy = {
     id: "legacy",
     title: "Legacy",
-    ignorePreset: true,
-    comment: `Rules in this category disallow the syntax contained in [Annex B](https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html) or Legacy.  
-The rules are not included in any preset.`,
+    comment:
+        "Rules in this category disallow the syntax contained in [Annex B](https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html) or Legacy.",
     rules: [],
 }
 categories.uncategorized = {
     id: "uncategorized",
     title: "Uncategorized",
-    ignorePreset: true,
-    comment: "Rules in this category are not included in any preset.",
     rules: [],
 }
 
@@ -74,11 +118,17 @@ const rules = []
             .replace(/\.js$/u, "")
             .replace(/\\/gu, "/")
         const content = fs.readFileSync(filePath, "utf8")
+        const contentWithoutComments = content.replace(
+            /("(?:\\"|[^"])*?"|'(?:\\'|[^'])*?')|\/\/[^\n]*|\/\*[\s\S]*?\*\//gu,
+            "$1",
+        )
         const category = /category:[\s\n]+(?:undefined|"(.+)")/u.exec(
-            content,
+            contentWithoutComments,
         )[1]
-        const description = /description:[\s\n]+"(.+?)\.?"/u.exec(content)[1]
-        const fixable = /fixable:[\s\n]+"(.+)"/u.test(content)
+        const description = /description:[\s\n]+"(.+?)\.?"/u.exec(
+            contentWithoutComments,
+        )[1]
+        const fixable = /fixable:[\s\n]+"(.+)"/u.test(contentWithoutComments)
         const rule = {
             ruleId,
             description: JSON.parse(`"${description}"`),
diff --git a/scripts/update-docs-readme.js b/scripts/update-docs-readme.js
index 9646f07..33f6924 100644
--- a/scripts/update-docs-readme.js
+++ b/scripts/update-docs-readme.js
@@ -45,8 +45,13 @@ ${ruleSectionContent}
 
 function extractCategoryId(filePath) {
     const basename = path.basename(filePath, ".js")
-    const match = /no-new-in-(es\d+)/u.exec(basename)
-    return match ? match[1].toUpperCase() : undefined
+    const category = Object.values(categories).find(
+        ({ configName }) => configName === basename,
+    )
+    if (category) {
+        return category.id
+    }
+    return undefined
 }
 
 /**
@@ -57,17 +62,24 @@ function toSection(category) {
     if (!category.rules.length) {
         return undefined
     }
-    const configIds = formatList(
-        configs
-            .filter((c) => c.categoryIds.includes(category.id))
-            .map((c) => `\`${c.id}\``)
-            .sort(collator.compare.bind(collator)),
-    )
-    const comment =
-        category.comment ||
-        (configIds
-            ? `There are multiple configs that enable all rules in this category: ${configIds}`
-            : "There is a config that enables the rules in this category: `plugin:es-x/no-new-in-esnext`")
+    const configIds = configs
+        .filter((c) => c.categoryIds.includes(category.id))
+        .map((c) => `\`${c.id}\``)
+        .sort(collator.compare.bind(collator))
+
+    let comment = ""
+    if (category.comment) {
+        comment = `${category.comment} \\\n`
+    }
+    comment += !configIds.length
+        ? "Rules in this category are not included in any preset."
+        : configIds.length > 1
+        ? `There are multiple configs that enable all rules in this category: ${formatList(
+              configIds,
+          )}`
+        : `There is a config that enables the rules in this category: ${formatList(
+              configIds,
+          )}`
 
     return `## ${category.title}
 
diff --git a/scripts/update-lib-configs.js b/scripts/update-lib-configs.js
index 8e412e2..ac4f67e 100644
--- a/scripts/update-lib-configs.js
+++ b/scripts/update-lib-configs.js
@@ -10,17 +10,6 @@ const { ESLint } = require("eslint")
 const { categories } = require("./rules")
 const Root = path.resolve(__dirname, "../lib/configs")
 
-function configNameToDisallowNewIn(revision) {
-    const year = revision <= 5 ? revision : 2009 + revision
-    return `no-new-in-es${year}`
-}
-
-function configNameToRestrictToPreviousOf(revision) {
-    const prevRev = revision === 5 ? 3 : revision - 1
-    const year = prevRev <= 5 ? prevRev : 2009 + prevRev
-    return `restrict-to-es${year}`
-}
-
 function wrapCode(code) {
     return `/**
  * DON'T EDIT THIS FILE.
@@ -32,33 +21,35 @@ module.exports = ${code}
 `
 }
 
-for (const { experimental, revision, rules, ignorePreset } of Object.values(
-    categories,
-)) {
-    if (ignorePreset) {
+for (const {
+    edition,
+    rules,
+    configName,
+    aboveConfigName,
+    specKind,
+} of Object.values(categories)) {
+    if (!configName) {
         continue
     }
     const ruleSetting = rules.map((r) => `"es-x/${r.ruleId}":"error"`).join(",")
-    const extendSetting = Object.values(categories)
-        .filter((c) => c.revision >= revision && !c.experimental)
-        .map(
-            (c) =>
-                `require.resolve("./${configNameToDisallowNewIn(c.revision)}")`,
-        )
-        .join(",")
 
-    if (experimental) {
-        fs.writeFileSync(
-            path.join(Root, "no-new-in-esnext.js"),
-            wrapCode(`{ plugins: ["es-x"], rules: { ${ruleSetting} } }`),
-        )
-    } else {
-        fs.writeFileSync(
-            path.join(Root, `${configNameToDisallowNewIn(revision)}.js`),
-            wrapCode(`{ plugins: ["es-x"], rules: { ${ruleSetting} } }`),
-        )
+    fs.writeFileSync(
+        path.join(Root, `${configName}.js`),
+        wrapCode(`{ plugins: ["es-x"], rules: { ${ruleSetting} } }`),
+    )
+    if (aboveConfigName) {
+        const extendSetting = Object.values(categories)
+            .filter(
+                (c) =>
+                    c.edition >= edition &&
+                    c.specKind === specKind &&
+                    !c.experimental &&
+                    c.configName,
+            )
+            .map((c) => `require.resolve("./${c.configName}")`)
+            .join(",")
         fs.writeFileSync(
-            path.join(Root, `${configNameToRestrictToPreviousOf(revision)}.js`),
+            path.join(Root, `${aboveConfigName}.js`),
             wrapCode(`{ extends: [${extendSetting}] }`),
         )
     }


Test patch:
diff --git a/tests/lib/rules/no-error-cause.js b/tests/lib/rules/no-error-cause.js
new file mode 100644
index 0000000..7c77874
--- /dev/null
+++ b/tests/lib/rules/no-error-cause.js
@@ -0,0 +1,77 @@
+/**
+ * @author Sosuke Suzuki <https://github.com/sosukesuzuki>
+ * See LICENSE file in root directory for full license.
+ */
+
+"use strict"
+
+const RuleTester = require("../../tester")
+const rule = require("../../../lib/rules/no-error-cause.js")
+
+if (!RuleTester.isSupported(2022)) {
+    //eslint-disable-next-line no-console
+    console.log("Skip the tests of no-error-cause.")
+    return
+}
+
+const errorConstructorNames = [
+    "Error",
+    "AggregateError",
+    "EvalError",
+    "RangeError",
+    "ReferenceError",
+    "SyntaxError",
+    "TypeError",
+    "URIError",
+]
+
+function getErrors(errorConstructorName) {
+    return errorConstructorName === "AggregateError"
+        ? '[new Error("message")], '
+        : ""
+}
+
+const valid = errorConstructorNames
+    .map((errorConstructorName) => {
+        const errors = getErrors(errorConstructorName)
+        return [
+            `new ${errorConstructorName}(${errors}"message")`,
+            `new ${errorConstructorName}(${errors}"message", notObjectExpression)`,
+            `new ${errorConstructorName}(${errors}"message", { notCause: foo })`,
+            `new ${errorConstructorName}(${errors}...foo, { cause: foo });`,
+            `class MyError extends ${errorConstructorName} { constructor() { super(${errors}"message") } }`,
+            `class MyError extends ${errorConstructorName} { constructor() { super(${errors}"message", notObjectExpression) } }`,
+            `class MyError extends ${errorConstructorName} { constructor() { super(${errors}"message", { notCause: foo }) } }`,
+        ]
+    })
+    // alternative of `Array.prototype.flat`
+    .reduce((acc, val) => acc.concat(val), [])
+
+const invalid = errorConstructorNames
+    .map((errorConstructorName) => {
+        const errors = getErrors(errorConstructorName)
+        return [
+            {
+                code: `new ${errorConstructorName}(${errors}"message", { cause: foo });`,
+                errors: ["ES2022 Error Cause is forbidden."],
+            },
+            {
+                code: `new ${errorConstructorName}(${errors}"message", { ["cause"]: foo });`,
+                errors: ["ES2022 Error Cause is forbidden."],
+            },
+            {
+                code: `const MyError = ${errorConstructorName}; new MyError(${errors}"message", { ["cause"]: foo });`,
+                errors: ["ES2022 Error Cause is forbidden."],
+            },
+            {
+                code: `class MyError extends ${errorConstructorName} { constructor() { super(${errors}"message", { cause: foo }); } }`,
+                errors: ["ES2022 Error Cause is forbidden."],
+            },
+        ]
+    })
+    // alternative of `Array.prototype.flat`
+    .reduce((acc, val) => acc.concat(val), [])
+
+new RuleTester({
+    parserOptions: { sourceType: "module" },
+}).run("no-error-cause", rule, { valid, invalid })