diff --git a/.eslintrc.js b/.eslintrc.js
index dbb78e0..cc4d82c 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -6,6 +6,6 @@ module.exports = {
],
rules: {
'canonical/filename-match-regex': 0,
- 'node/global-require': 0,
+ 'n/global-require': 0,
},
};
diff --git a/COMPARISON_TABLE.md b/COMPARISON_TABLE.md
index 7171e21..e508e92 100644
--- a/COMPARISON_TABLE.md
+++ b/COMPARISON_TABLE.md
@@ -213,6 +213,7 @@ Configurations:
|[`canonical/no-barrel-import`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-no-barrel-import) 🛠|👻|👻|👻|👻|👻|
|[`canonical/no-export-all`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-no-export-all) 🛠|👻|👻|👻|👻|👻|
|[`canonical/no-reassign-imports`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-no-reassign-imports)|👻|👻|👻|👻|👻|
+|[`canonical/no-restricted-imports`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-no-restricted-imports)|👻|👻|👻|👻|👻|
|[`canonical/no-restricted-strings`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-no-restricted-strings)|❌|👻|👻|👻|👻|
|[`canonical/no-unused-exports`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-no-unused-exports)|👻|👻|👻|👻|👻|
|[`canonical/no-use-extend-native`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-no-use-extend-native)|🚨|👻|👻|👻|👻|
@@ -221,7 +222,9 @@ Configurations:
|[`canonical/prefer-react-lazy`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-prefer-react-lazy)|👻|👻|👻|👻|👻|
|[`canonical/prefer-use-mount`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-prefer-use-mount)|👻|👻|👻|👻|👻|
|[`canonical/require-extension`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-require-extension) 🛠|👻|👻|👻|👻|👻|
+|[`canonical/sort-destructure-keys`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-sort-destructure-keys) 🛠|🚨|👻|👻|👻|👻|
|[`canonical/sort-keys`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-sort-keys) 🛠|🚨|👻|👻|👻|👻|
+|[`canonical/sort-react-dependencies`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-sort-react-dependencies) 🛠|🚨|👻|👻|👻|👻|
|[`canonical/virtual-module`](https://github.com/gajus/eslint-plugin-canonical#eslint-plugin-canonical-rules-virtual-module) 🛠|👻|👻|👻|👻|👻|
|[`capitalized-comments`](https://eslint.org/docs/rules/capitalized-comments) 🛠|❌|❌|👻|👻|🚨?|
|[`class-methods-use-this`](https://eslint.org/docs/rules/class-methods-use-this)|❌|🚨?|👻|👻|👻|
@@ -234,8 +237,8 @@ Configurations:
|[`consistent-this`](https://eslint.org/docs/rules/consistent-this)|🚨|❌|👻|👻|👻|
|[`constructor-super`](https://eslint.org/docs/rules/constructor-super)|🚨|🚨|🚨|🚨|🚨|
|[`curly`](https://eslint.org/docs/rules/curly) 🛠|🚨|🚨?|🚨?|🚨?|🚨|
-|[`default-case`](https://eslint.org/docs/rules/default-case)|🚨|🚨?|👻|👻|🚨|
-|[`default-case-last`](https://eslint.org/docs/rules/default-case-last)|🚨|🚨|👻|🚨|🚨|
+|[`default-case`](https://eslint.org/docs/rules/default-case)|❌|🚨?|👻|👻|🚨?|
+|[`default-case-last`](https://eslint.org/docs/rules/default-case-last)|❌|🚨?|👻|🚨?|🚨?|
|[`default-param-last`](https://eslint.org/docs/rules/default-param-last)|🚨|🚨|👻|👻|👻|
|[`dot-location`](https://eslint.org/docs/rules/dot-location) 🛠|🚨|🚨|👻|🚨|🚨|
|[`dot-notation`](https://eslint.org/docs/rules/dot-notation) 🛠|🚨|🚨?|👻|🚨?|🚨|
@@ -584,45 +587,45 @@ Configurations:
|[`mocha/valid-test-description`](https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/valid-test-description.md)|❌|👻|👻|👻|👻|
|[`multiline-comment-style`](https://eslint.org/docs/rules/multiline-comment-style) 🛠|❌|❌|👻|👻|👻|
|[`multiline-ternary`](https://eslint.org/docs/rules/multiline-ternary) 🛠|❌|❌|👻|🚨?|👻|
-|`n/callback-return`|👻|👻|👻|👻|👻|
-|`n/exports-style` 🛠|👻|👻|👻|👻|👻|
-|`n/file-extension-in-import` 🛠|👻|👻|👻|👻|👻|
-|`n/global-require`|👻|👻|👻|👻|👻|
-|`n/handle-callback-err`|👻|👻|👻|🚨?|👻|
-|`n/no-callback-literal`|👻|👻|👻|🚨?|👻|
-|`n/no-deprecated-api`|👻|👻|👻|🚨?|👻|
-|`n/no-exports-assign`|👻|👻|👻|🚨?|👻|
-|`n/no-extraneous-import`|👻|👻|👻|👻|👻|
-|`n/no-extraneous-require`|👻|👻|👻|👻|👻|
-|`n/no-hide-core-modules` ⛔️|👻|👻|👻|👻|👻|
-|`n/no-missing-import`|👻|👻|👻|👻|👻|
-|`n/no-missing-require`|👻|👻|👻|👻|👻|
-|`n/no-mixed-requires`|👻|👻|👻|👻|👻|
-|`n/no-new-require`|👻|👻|👻|🚨?|👻|
-|`n/no-path-concat`|👻|👻|👻|🚨?|👻|
-|`n/no-process-env`|👻|👻|👻|👻|👻|
-|`n/no-process-exit`|👻|👻|👻|👻|👻|
-|`n/no-restricted-import`|👻|👻|👻|👻|👻|
-|`n/no-restricted-require`|👻|👻|👻|👻|👻|
-|`n/no-sync`|👻|👻|👻|👻|👻|
-|`n/no-unpublished-bin`|👻|👻|👻|👻|👻|
-|`n/no-unpublished-import`|👻|👻|👻|👻|👻|
-|`n/no-unpublished-require`|👻|👻|👻|👻|👻|
-|`n/no-unsupported-features` ⛔️|👻|👻|👻|👻|👻|
-|`n/no-unsupported-features/es-builtins`|👻|👻|👻|👻|👻|
-|`n/no-unsupported-features/es-syntax`|👻|👻|👻|👻|👻|
-|`n/no-unsupported-features/node-builtins`|👻|👻|👻|👻|👻|
-|`n/prefer-global/buffer`|👻|👻|👻|👻|👻|
-|`n/prefer-global/console`|👻|👻|👻|👻|👻|
-|`n/prefer-global/process`|👻|👻|👻|👻|👻|
-|`n/prefer-global/text-decoder`|👻|👻|👻|👻|👻|
-|`n/prefer-global/text-encoder`|👻|👻|👻|👻|👻|
-|`n/prefer-global/url`|👻|👻|👻|👻|👻|
-|`n/prefer-global/url-search-params`|👻|👻|👻|👻|👻|
-|`n/prefer-promises/dns`|👻|👻|👻|👻|👻|
-|`n/prefer-promises/fs`|👻|👻|👻|👻|👻|
-|`n/process-exit-as-throw`|👻|👻|👻|🚨?|👻|
-|`n/shebang` 🛠|👻|👻|👻|👻|👻|
+|[`n/callback-return`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/callback-return.md)|🚨|👻|👻|👻|👻|
+|[`n/exports-style`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/exports-style.md) 🛠|🚨|👻|👻|👻|👻|
+|[`n/file-extension-in-import`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/file-extension-in-import.md) 🛠|❌|👻|👻|👻|👻|
+|[`n/global-require`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/global-require.md)|❌|👻|👻|👻|👻|
+|[`n/handle-callback-err`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/handle-callback-err.md)|🚨|👻|👻|🚨?|👻|
+|[`n/no-callback-literal`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-callback-literal.md)|🚨|👻|👻|🚨|👻|
+|[`n/no-deprecated-api`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-deprecated-api.md)|🚨|👻|👻|🚨|👻|
+|[`n/no-exports-assign`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-exports-assign.md)|🚨|👻|👻|🚨|👻|
+|[`n/no-extraneous-import`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-extraneous-import.md)|🚨|👻|👻|👻|👻|
+|[`n/no-extraneous-require`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-extraneous-require.md)|🚨|👻|👻|👻|👻|
+|[`n/no-hide-core-modules`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-hide-core-modules.md) ⛔️|👻|👻|👻|👻|👻|
+|[`n/no-missing-import`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-missing-import.md)|❌|👻|👻|👻|👻|
+|[`n/no-missing-require`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-missing-require.md)|❌|👻|👻|👻|👻|
+|[`n/no-mixed-requires`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-mixed-requires.md)|❌|👻|👻|👻|👻|
+|[`n/no-new-require`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-new-require.md)|🚨|👻|👻|🚨|👻|
+|[`n/no-path-concat`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-path-concat.md)|🚨|👻|👻|🚨|👻|
+|[`n/no-process-env`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-process-env.md)|🚨|👻|👻|👻|👻|
+|[`n/no-process-exit`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-process-exit.md)|🚨|👻|👻|👻|👻|
+|[`n/no-restricted-import`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-restricted-import.md)|❌|👻|👻|👻|👻|
+|[`n/no-restricted-require`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-restricted-require.md)|❌|👻|👻|👻|👻|
+|[`n/no-sync`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-sync.md)|🚨|👻|👻|👻|👻|
+|[`n/no-unpublished-bin`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-unpublished-bin.md)|🚨|👻|👻|👻|👻|
+|[`n/no-unpublished-import`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-unpublished-import.md)|❌|👻|👻|👻|👻|
+|[`n/no-unpublished-require`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-unpublished-require.md)|❌|👻|👻|👻|👻|
+|[`n/no-unsupported-features`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-unsupported-features.md) ⛔️|👻|👻|👻|👻|👻|
+|[`n/no-unsupported-features/es-builtins`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-unsupported-features/es-builtins.md)|❌|👻|👻|👻|👻|
+|[`n/no-unsupported-features/es-syntax`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-unsupported-features/es-syntax.md)|❌|👻|👻|👻|👻|
+|[`n/no-unsupported-features/node-builtins`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-unsupported-features/node-builtins.md)|❌|👻|👻|👻|👻|
+|[`n/prefer-global/buffer`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/prefer-global/buffer.md)|🚨|👻|👻|👻|👻|
+|[`n/prefer-global/console`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/prefer-global/console.md)|🚨|👻|👻|👻|👻|
+|[`n/prefer-global/process`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/prefer-global/process.md)|🚨|👻|👻|👻|👻|
+|[`n/prefer-global/text-decoder`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/prefer-global/text-decoder.md)|🚨|👻|👻|👻|👻|
+|[`n/prefer-global/text-encoder`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/prefer-global/text-encoder.md)|🚨|👻|👻|👻|👻|
+|[`n/prefer-global/url`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/prefer-global/url.md)|🚨|👻|👻|👻|👻|
+|[`n/prefer-global/url-search-params`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/prefer-global/url-search-params.md)|🚨|👻|👻|👻|👻|
+|[`n/prefer-promises/dns`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/prefer-promises/dns.md)|🚨|👻|👻|👻|👻|
+|[`n/prefer-promises/fs`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/prefer-promises/fs.md)|🚨|👻|👻|👻|👻|
+|[`n/process-exit-as-throw`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/process-exit-as-throw.md)|🚨|👻|👻|🚨|👻|
+|[`n/shebang`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/shebang.md) 🛠|🚨|👻|👻|👻|👻|
|[`new-cap`](https://eslint.org/docs/rules/new-cap)|❌|🚨?|🚨?|🚨?|🚨?|
|[`new-parens`](https://eslint.org/docs/rules/new-parens) 🛠|🚨|🚨|👻|🚨|🚨|
|[`newline-after-var`](https://eslint.org/docs/rules/newline-after-var) 🛠 ⛔️|👻|❌|👻|👻|👻|
@@ -781,45 +784,6 @@ Configurations:
|[`no-warning-comments`](https://eslint.org/docs/rules/no-warning-comments)|⚠️|❌|👻|👻|⚠️?|
|[`no-whitespace-before-property`](https://eslint.org/docs/rules/no-whitespace-before-property) 🛠|🚨|🚨|👻|🚨|🚨|
|[`no-with`](https://eslint.org/docs/rules/no-with)|🚨|🚨|🚨|🚨|🚨|
-|[`node/callback-return`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/callback-return.md)|🚨|👻|👻|👻|👻|
-|[`node/exports-style`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/exports-style.md)|🚨|👻|👻|👻|👻|
-|[`node/file-extension-in-import`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/file-extension-in-import.md) 🛠|❌|👻|👻|👻|👻|
-|[`node/global-require`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/global-require.md)|❌|👻|👻|👻|👻|
-|[`node/handle-callback-err`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/handle-callback-err.md)|🚨|👻|👻|👻|👻|
-|[`node/no-callback-literal`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-callback-literal.md)|🚨|👻|👻|👻|👻|
-|[`node/no-deprecated-api`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)|🚨|👻|👻|👻|👻|
-|[`node/no-exports-assign`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-exports-assign.md)|🚨|👻|👻|👻|👻|
-|[`node/no-extraneous-import`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-import.md)|🚨|👻|👻|👻|👻|
-|[`node/no-extraneous-require`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-require.md)|🚨|👻|👻|👻|👻|
-|[`node/no-hide-core-modules`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-hide-core-modules.md) ⛔️|👻|👻|👻|👻|👻|
-|[`node/no-missing-import`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-import.md)|❌|👻|👻|👻|👻|
-|[`node/no-missing-require`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-require.md)|❌|👻|👻|👻|👻|
-|[`node/no-mixed-requires`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-mixed-requires.md)|❌|👻|👻|👻|👻|
-|[`node/no-new-require`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-new-require.md)|🚨|👻|👻|👻|👻|
-|[`node/no-path-concat`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-path-concat.md)|🚨|👻|👻|👻|👻|
-|[`node/no-process-env`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-process-env.md)|🚨|👻|👻|👻|👻|
-|[`node/no-process-exit`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-process-exit.md)|🚨|👻|👻|👻|👻|
-|[`node/no-restricted-import`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-restricted-import.md)|❌|👻|👻|👻|👻|
-|[`node/no-restricted-require`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-restricted-require.md)|❌|👻|👻|👻|👻|
-|[`node/no-sync`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-sync.md)|🚨|👻|👻|👻|👻|
-|[`node/no-unpublished-bin`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-bin.md)|🚨|👻|👻|👻|👻|
-|[`node/no-unpublished-import`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-import.md)|❌|👻|👻|👻|👻|
-|[`node/no-unpublished-require`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-require.md)|❌|👻|👻|👻|👻|
-|[`node/no-unsupported-features`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features.md) ⛔️|👻|👻|👻|👻|👻|
-|[`node/no-unsupported-features/es-builtins`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features/es-builtins.md)|❌|👻|👻|👻|👻|
-|[`node/no-unsupported-features/es-syntax`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features/es-syntax.md)|❌|👻|👻|👻|👻|
-|[`node/no-unsupported-features/node-builtins`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features/node-builtins.md)|❌|👻|👻|👻|👻|
-|[`node/prefer-global/buffer`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/buffer.md)|🚨|👻|👻|👻|👻|
-|[`node/prefer-global/console`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/console.md)|🚨|👻|👻|👻|👻|
-|[`node/prefer-global/process`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/process.md)|🚨|👻|👻|👻|👻|
-|[`node/prefer-global/text-decoder`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/text-decoder.md)|🚨|👻|👻|👻|👻|
-|[`node/prefer-global/text-encoder`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/text-encoder.md)|🚨|👻|👻|👻|👻|
-|[`node/prefer-global/url`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/url.md)|🚨|👻|👻|👻|👻|
-|[`node/prefer-global/url-search-params`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-global/url-search-params.md)|🚨|👻|👻|👻|👻|
-|[`node/prefer-promises/dns`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-promises/dns.md)|🚨|👻|👻|👻|👻|
-|[`node/prefer-promises/fs`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/prefer-promises/fs.md)|🚨|👻|👻|👻|👻|
-|[`node/process-exit-as-throw`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/process-exit-as-throw.md)|🚨|👻|👻|👻|👻|
-|[`node/shebang`](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/shebang.md) 🛠|🚨|👻|👻|👻|👻|
|[`nonblock-statement-body-position`](https://eslint.org/docs/rules/nonblock-statement-body-position) 🛠|🚨|🚨?|👻|👻|👻|
|[`object-curly-newline`](https://eslint.org/docs/rules/object-curly-newline) 🛠|🚨|🚨?|👻|🚨?|👻|
|[`object-curly-spacing`](https://eslint.org/docs/rules/object-curly-spacing) 🛠|❌|🚨?|🚨?|🚨?|🚨?|
@@ -1040,7 +1004,7 @@ Configurations:
|[`unicorn/no-unnecessary-await`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md) 🛠|👻|👻|👻|👻|👻|
|[`unicorn/no-unreadable-array-destructuring`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-array-destructuring.md) 🛠|❌|👻|👻|👻|👻|
|[`unicorn/no-unreadable-iife`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md)|🚨|👻|👻|👻|👻|
-|[`unicorn/no-unsafe-regex`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-regex.md)|🚨|👻|👻|👻|👻|
+|[`unicorn/no-unsafe-regex`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-regex.md) ⛔️|👻|👻|👻|👻|👻|
|[`unicorn/no-unused-properties`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unused-properties.md)|🚨|👻|👻|👻|👻|
|[`unicorn/no-useless-fallback-in-spread`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md) 🛠|🚨|👻|👻|👻|👻|
|[`unicorn/no-useless-length-check`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md) 🛠|🚨|👻|👻|👻|👻|
@@ -1058,6 +1022,7 @@ Configurations:
|[`unicorn/prefer-array-index-of`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-index-of.md) 🛠|🚨|👻|👻|👻|👻|
|[`unicorn/prefer-array-some`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-some.md) 🛠|🚨|👻|👻|👻|👻|
|[`unicorn/prefer-at`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md) 🛠|❌|👻|👻|👻|👻|
+|[`unicorn/prefer-blob-reading-methods`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-blob-reading-methods.md)|🚨|👻|👻|👻|👻|
|[`unicorn/prefer-code-point`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-code-point.md)|🚨|👻|👻|👻|👻|
|[`unicorn/prefer-dataset`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dataset.md) ⛔️|👻|👻|👻|👻|👻|
|[`unicorn/prefer-date-now`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-date-now.md) 🛠|🚨|👻|👻|👻|👻|
diff --git a/compare/.eslintrc b/compare/.eslintrc
index b97a707..f970577 100644
--- a/compare/.eslintrc
+++ b/compare/.eslintrc
@@ -1,6 +1,6 @@
{
"rules": {
- "node/global-require": 0,
+ "n/global-require": 0,
"import/no-dynamic-require": 0
}
}
\ No newline at end of file
diff --git a/compare/compare.js b/compare/compare.js
index 5efa602..17abc71 100644
--- a/compare/compare.js
+++ b/compare/compare.js
@@ -1,7 +1,7 @@
/* eslint-disable complexity */
/* eslint-disable no-console */
-const { readFileSync, writeFileSync } = require('node:fs');
+const { writeFile, readFile } = require('node:fs/promises');
const { resolve } = require('node:path');
const stringify = require('safe-stable-stringify');
const {
@@ -219,17 +219,17 @@ const createIncompatibleRuleSummary = (
const README_PATH = resolve(__dirname, '../COMPARISON_TABLE.md');
- writeFileSync(
+ await writeFile(
README_PATH,
- readFileSync(README_PATH, 'utf8').replace(
+ (await readFile(README_PATH, 'utf8')).replace(
/[\s\S]+/u,
markdownLines.join('\n'),
),
);
- writeFileSync(
+ await writeFile(
README_PATH,
- readFileSync(README_PATH, 'utf8').replace(
+ (await readFile(README_PATH, 'utf8')).replace(
/[\s\S]+/u,
'\n' +
[
diff --git a/compare/package-lock.json b/compare/package-lock.json
index a762c71..8c83521 100644
--- a/compare/package-lock.json
+++ b/compare/package-lock.json
@@ -12,7 +12,7 @@
"eslint-config-standard": "^17.1.0",
"eslint-config-xo": "^0.43.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
- "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-n": "^16.2.0",
"eslint-plugin-standard": "^4.1.0",
"got": "^12.0.0",
"safe-stable-stringify": "^2.4.3",
@@ -2709,7 +2709,6 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz",
"integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==",
- "peer": true,
"dependencies": {
"semver": "^7.0.0"
}
@@ -2718,7 +2717,6 @@
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "peer": true,
"dependencies": {
"yallist": "^4.0.0"
},
@@ -2730,7 +2728,6 @@
"version": "7.3.8",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
- "peer": true,
"dependencies": {
"lru-cache": "^6.0.0"
},
@@ -2744,8 +2741,7 @@
"node_modules/builtins/node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "peer": true
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/bundle-name": {
"version": "3.0.0",
@@ -3734,22 +3730,6 @@
"ms": "^2.1.1"
}
},
- "node_modules/eslint-import-resolver-node/node_modules/resolve": {
- "version": "1.22.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
- "dependencies": {
- "is-core-module": "^2.9.0",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
- },
- "bin": {
- "resolve": "bin/resolve"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/eslint-import-resolver-typescript": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz",
@@ -3873,6 +3853,24 @@
"eslint": ">=4.19.1"
}
},
+ "node_modules/eslint-plugin-es-x": {
+ "version": "7.2.0",
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/eslint-plugin-es-x/-/eslint-plugin-es-x-7.2.0.tgz",
+ "integrity": "sha512-9dvv5CcvNjSJPqnS5uZkqb3xmbeqRLnvXKK7iI5+oK/yTusyc46zbBZKENGsOfojm/mKfszyZb+wNqNPAPeGXA==",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.1.2",
+ "@eslint-community/regexpp": "^4.6.0"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ota-meshi"
+ },
+ "peerDependencies": {
+ "eslint": ">=8"
+ }
+ },
"node_modules/eslint-plugin-es/node_modules/eslint-utils": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
@@ -4321,22 +4319,22 @@
}
},
"node_modules/eslint-plugin-n": {
- "version": "15.6.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.6.1.tgz",
- "integrity": "sha512-R9xw9OtCRxxaxaszTQmQAlPgM+RdGjaL1akWuY/Fv9fRAi8Wj4CUKc6iYVG8QNRjRuo8/BqVYIpfqberJUEacA==",
- "peer": true,
+ "version": "16.2.0",
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/eslint-plugin-n/-/eslint-plugin-n-16.2.0.tgz",
+ "integrity": "sha512-AQER2jEyQOt1LG6JkGJCCIFotzmlcCZFur2wdKrp1JX2cNotC7Ae0BcD/4lLv3lUAArM9uNS8z/fsvXTd0L71g==",
"dependencies": {
+ "@eslint-community/eslint-utils": "^4.4.0",
"builtins": "^5.0.1",
- "eslint-plugin-es": "^4.1.0",
- "eslint-utils": "^3.0.0",
- "ignore": "^5.1.1",
- "is-core-module": "^2.11.0",
+ "eslint-plugin-es-x": "^7.1.0",
+ "get-tsconfig": "^4.7.0",
+ "ignore": "^5.2.4",
+ "is-core-module": "^2.12.1",
"minimatch": "^3.1.2",
- "resolve": "^1.22.1",
- "semver": "^7.3.8"
+ "resolve": "^1.22.2",
+ "semver": "^7.5.3"
},
"engines": {
- "node": ">=12.22.0"
+ "node": ">=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/mysticatea"
@@ -4345,54 +4343,10 @@
"eslint": ">=7.0.0"
}
},
- "node_modules/eslint-plugin-n/node_modules/eslint-plugin-es": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz",
- "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==",
- "peer": true,
- "dependencies": {
- "eslint-utils": "^2.0.0",
- "regexpp": "^3.0.0"
- },
- "engines": {
- "node": ">=8.10.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/mysticatea"
- },
- "peerDependencies": {
- "eslint": ">=4.19.1"
- }
- },
- "node_modules/eslint-plugin-n/node_modules/eslint-plugin-es/node_modules/eslint-utils": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
- "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
- "peer": true,
- "dependencies": {
- "eslint-visitor-keys": "^1.1.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/mysticatea"
- }
- },
- "node_modules/eslint-plugin-n/node_modules/eslint-visitor-keys": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
- "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
- "peer": true,
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/eslint-plugin-n/node_modules/lru-cache": {
"version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "peer": true,
"dependencies": {
"yallist": "^4.0.0"
},
@@ -4400,28 +4354,10 @@
"node": ">=10"
}
},
- "node_modules/eslint-plugin-n/node_modules/resolve": {
- "version": "1.22.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
- "peer": true,
- "dependencies": {
- "is-core-module": "^2.9.0",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
- },
- "bin": {
- "resolve": "bin/resolve"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/eslint-plugin-n/node_modules/semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
- "peer": true,
+ "version": "7.5.4",
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dependencies": {
"lru-cache": "^6.0.0"
},
@@ -4434,9 +4370,8 @@
},
"node_modules/eslint-plugin-n/node_modules/yallist": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "peer": true
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/eslint-plugin-node": {
"version": "11.1.0",
@@ -7459,12 +7394,16 @@
}
},
"node_modules/resolve": {
- "version": "1.20.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
- "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
+ "version": "1.22.8",
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/resolve/-/resolve-1.22.8.tgz",
+ "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
"dependencies": {
- "is-core-module": "^2.2.0",
- "path-parse": "^1.0.6"
+ "is-core-module": "^2.13.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -10648,7 +10587,6 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz",
"integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==",
- "peer": true,
"requires": {
"semver": "^7.0.0"
},
@@ -10657,7 +10595,6 @@
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "peer": true,
"requires": {
"yallist": "^4.0.0"
}
@@ -10666,7 +10603,6 @@
"version": "7.3.8",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
- "peer": true,
"requires": {
"lru-cache": "^6.0.0"
}
@@ -10674,8 +10610,7 @@
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "peer": true
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
}
},
@@ -11393,16 +11328,6 @@
"requires": {
"ms": "^2.1.1"
}
- },
- "resolve": {
- "version": "1.22.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
- "requires": {
- "is-core-module": "^2.9.0",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
- }
}
}
},
@@ -11507,6 +11432,15 @@
}
}
},
+ "eslint-plugin-es-x": {
+ "version": "7.2.0",
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/eslint-plugin-es-x/-/eslint-plugin-es-x-7.2.0.tgz",
+ "integrity": "sha512-9dvv5CcvNjSJPqnS5uZkqb3xmbeqRLnvXKK7iI5+oK/yTusyc46zbBZKENGsOfojm/mKfszyZb+wNqNPAPeGXA==",
+ "requires": {
+ "@eslint-community/eslint-utils": "^4.1.2",
+ "@eslint-community/regexpp": "^4.6.0"
+ }
+ },
"eslint-plugin-eslint-comments": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz",
@@ -11784,82 +11718,41 @@
}
},
"eslint-plugin-n": {
- "version": "15.6.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.6.1.tgz",
- "integrity": "sha512-R9xw9OtCRxxaxaszTQmQAlPgM+RdGjaL1akWuY/Fv9fRAi8Wj4CUKc6iYVG8QNRjRuo8/BqVYIpfqberJUEacA==",
- "peer": true,
+ "version": "16.2.0",
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/eslint-plugin-n/-/eslint-plugin-n-16.2.0.tgz",
+ "integrity": "sha512-AQER2jEyQOt1LG6JkGJCCIFotzmlcCZFur2wdKrp1JX2cNotC7Ae0BcD/4lLv3lUAArM9uNS8z/fsvXTd0L71g==",
"requires": {
+ "@eslint-community/eslint-utils": "^4.4.0",
"builtins": "^5.0.1",
- "eslint-plugin-es": "^4.1.0",
- "eslint-utils": "^3.0.0",
- "ignore": "^5.1.1",
- "is-core-module": "^2.11.0",
+ "eslint-plugin-es-x": "^7.1.0",
+ "get-tsconfig": "^4.7.0",
+ "ignore": "^5.2.4",
+ "is-core-module": "^2.12.1",
"minimatch": "^3.1.2",
- "resolve": "^1.22.1",
- "semver": "^7.3.8"
+ "resolve": "^1.22.2",
+ "semver": "^7.5.3"
},
"dependencies": {
- "eslint-plugin-es": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz",
- "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==",
- "peer": true,
- "requires": {
- "eslint-utils": "^2.0.0",
- "regexpp": "^3.0.0"
- },
- "dependencies": {
- "eslint-utils": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
- "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
- "peer": true,
- "requires": {
- "eslint-visitor-keys": "^1.1.0"
- }
- }
- }
- },
- "eslint-visitor-keys": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
- "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
- "peer": true
- },
"lru-cache": {
"version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "peer": true,
"requires": {
"yallist": "^4.0.0"
}
},
- "resolve": {
- "version": "1.22.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
- "peer": true,
- "requires": {
- "is-core-module": "^2.9.0",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
- }
- },
"semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
- "peer": true,
+ "version": "7.5.4",
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"requires": {
"lru-cache": "^6.0.0"
}
},
"yallist": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "peer": true
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
}
},
@@ -13933,12 +13826,13 @@
"integrity": "sha1-5UBLgVV+91225JxacgBIk/4D4WI="
},
"resolve": {
- "version": "1.20.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
- "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
+ "version": "1.22.8",
+ "resolved": "https://verdaccio.deploy.evelin.jsmd-group.com/resolve/-/resolve-1.22.8.tgz",
+ "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
"requires": {
- "is-core-module": "^2.2.0",
- "path-parse": "^1.0.6"
+ "is-core-module": "^2.13.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
}
},
"resolve-alpn": {
diff --git a/compare/package.json b/compare/package.json
index 9ad4b6b..e835cfa 100644
--- a/compare/package.json
+++ b/compare/package.json
@@ -7,7 +7,7 @@
"eslint-config-standard": "^17.1.0",
"eslint-config-xo": "^0.43.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
- "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-n": "^16.2.0",
"eslint-plugin-standard": "^4.1.0",
"got": "^12.0.0",
"safe-stable-stringify": "^2.4.3",
diff --git a/compare/utilities.js b/compare/utilities.js
index d7f2d86..2951b62 100644
--- a/compare/utilities.js
+++ b/compare/utilities.js
@@ -95,6 +95,7 @@ const getConfigurationRules = async (configuration) => {
return calculatedConfiguration.rules;
};
+// eslint-disable-next-line complexity
const getRuleLink = (ruleName) => {
if (!ruleName.includes('/')) {
return (
@@ -222,6 +223,16 @@ const getRuleLink = (ruleName) => {
);
}
+ if (ruleName.startsWith('n/')) {
+ return (
+ '[`' +
+ ruleName +
+ '`](https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/' +
+ ruleName.replace(/^n\//u, '') +
+ '.md)'
+ );
+ }
+
if (ruleName.startsWith('node/')) {
return (
'[`' +
diff --git a/configurations/node.js b/configurations/node.js
index da435db..ad3fae3 100644
--- a/configurations/node.js
+++ b/configurations/node.js
@@ -5,50 +5,50 @@ module.exports = {
parserOptions: {
ecmaVersion: 2_020,
},
- plugins: ['unicorn', 'import', 'node'],
+ plugins: ['unicorn', 'import', 'n'],
rules: {
- 'node/callback-return': 2,
- 'node/exports-style': [2, 'module.exports'],
- 'node/file-extension-in-import': 0,
- 'node/global-require': 2,
- 'node/handle-callback-err': 2,
- 'node/no-callback-literal': 2,
- 'node/no-deprecated-api': 2,
- 'node/no-exports-assign': 2,
- 'node/no-extraneous-import': 2,
- 'node/no-extraneous-require': 2,
- 'node/no-missing-import': 0,
- 'node/no-missing-require': 0,
- 'node/no-mixed-requires': 0,
- 'node/no-new-require': 2,
- 'node/no-path-concat': 2,
- 'node/no-process-env': 2,
- 'node/no-process-exit': 2,
- 'node/no-restricted-import': 0,
- 'node/no-restricted-require': 0,
- 'node/no-sync': [
+ 'n/callback-return': 2,
+ 'n/exports-style': [2, 'module.exports'],
+ 'n/file-extension-in-import': 0,
+ 'n/global-require': 2,
+ 'n/handle-callback-err': 2,
+ 'n/no-callback-literal': 2,
+ 'n/no-deprecated-api': 2,
+ 'n/no-exports-assign': 2,
+ 'n/no-extraneous-import': 2,
+ 'n/no-extraneous-require': 2,
+ 'n/no-missing-import': 0,
+ 'n/no-missing-require': 0,
+ 'n/no-mixed-requires': 0,
+ 'n/no-new-require': 2,
+ 'n/no-path-concat': 2,
+ 'n/no-process-env': 2,
+ 'n/no-process-exit': 2,
+ 'n/no-restricted-import': 0,
+ 'n/no-restricted-require': 0,
+ 'n/no-sync': [
2,
{
allowAtRootLevel: true,
},
],
- 'node/no-unpublished-bin': 2,
- 'node/no-unpublished-import': 0,
- 'node/no-unpublished-require': 0,
- 'node/no-unsupported-features/es-builtins': 0,
- 'node/no-unsupported-features/es-syntax': 0,
- 'node/no-unsupported-features/node-builtins': 0,
- 'node/prefer-global/buffer': 2,
- 'node/prefer-global/console': 2,
- 'node/prefer-global/process': 2,
- 'node/prefer-global/text-decoder': 2,
- 'node/prefer-global/text-encoder': 2,
- 'node/prefer-global/url': 2,
- 'node/prefer-global/url-search-params': 2,
- 'node/prefer-promises/dns': 2,
- 'node/prefer-promises/fs': 2,
- 'node/process-exit-as-throw': 2,
- 'node/shebang': [
+ 'n/no-unpublished-bin': 2,
+ 'n/no-unpublished-import': 0,
+ 'n/no-unpublished-require': 0,
+ 'n/no-unsupported-features/es-builtins': 0,
+ 'n/no-unsupported-features/es-syntax': 0,
+ 'n/no-unsupported-features/node-builtins': 0,
+ 'n/prefer-global/buffer': 2,
+ 'n/prefer-global/console': 2,
+ 'n/prefer-global/process': 2,
+ 'n/prefer-global/text-decoder': 2,
+ 'n/prefer-global/text-encoder': 2,
+ 'n/prefer-global/url': 2,
+ 'n/prefer-global/url-search-params': 2,
+ 'n/prefer-promises/dns': 2,
+ 'n/prefer-promises/fs': 2,
+ 'n/process-exit-as-throw': 2,
+ 'n/shebang': [
2,
{
convertPath: {
diff --git a/configurations/typescript.js b/configurations/typescript.js
index bd0896f..940dd63 100644
--- a/configurations/typescript.js
+++ b/configurations/typescript.js
@@ -185,11 +185,11 @@ module.exports = {
'default-param-last': 0,
'import/no-dynamic-require': 0,
'jsdoc/require-property-type': 0,
+ 'n/global-require': 0,
+ 'n/no-missing-import': 0,
'no-duplicate-imports': 0,
'no-undef': 0,
'no-use-before-define': 0,
- 'node/global-require': 0,
- 'node/no-missing-import': 0,
'spaced-comment': [
2,
'always',
diff --git a/package-lock.json b/package-lock.json
index 5b8b6e1..800af4e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -34,7 +34,7 @@
"eslint-plugin-lodash": "^7.4.0",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-modules-newline": "0.0.6",
- "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-n": "^16.2.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
@@ -4373,6 +4373,28 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/builtins": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz",
+ "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==",
+ "dependencies": {
+ "semver": "^7.0.0"
+ }
+ },
+ "node_modules/builtins/node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/busboy": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
@@ -6045,44 +6067,22 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/eslint-plugin-es": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz",
- "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==",
+ "node_modules/eslint-plugin-es-x": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.2.0.tgz",
+ "integrity": "sha512-9dvv5CcvNjSJPqnS5uZkqb3xmbeqRLnvXKK7iI5+oK/yTusyc46zbBZKENGsOfojm/mKfszyZb+wNqNPAPeGXA==",
"dependencies": {
- "eslint-utils": "^2.0.0",
- "regexpp": "^3.0.0"
+ "@eslint-community/eslint-utils": "^4.1.2",
+ "@eslint-community/regexpp": "^4.6.0"
},
"engines": {
- "node": ">=8.10.0"
+ "node": "^14.18.0 || >=16.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/mysticatea"
+ "url": "https://github.com/sponsors/ota-meshi"
},
"peerDependencies": {
- "eslint": ">=4.19.1"
- }
- },
- "node_modules/eslint-plugin-es/node_modules/eslint-utils": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
- "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
- "dependencies": {
- "eslint-visitor-keys": "^1.1.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/mysticatea"
- }
- },
- "node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
- "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
- "engines": {
- "node": ">=4"
+ "eslint": ">=8"
}
},
"node_modules/eslint-plugin-eslint-comments": {
@@ -6348,45 +6348,43 @@
"node": ">=0.10.0"
}
},
- "node_modules/eslint-plugin-node": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz",
- "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==",
+ "node_modules/eslint-plugin-n": {
+ "version": "16.2.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.2.0.tgz",
+ "integrity": "sha512-AQER2jEyQOt1LG6JkGJCCIFotzmlcCZFur2wdKrp1JX2cNotC7Ae0BcD/4lLv3lUAArM9uNS8z/fsvXTd0L71g==",
"dependencies": {
- "eslint-plugin-es": "^3.0.0",
- "eslint-utils": "^2.0.0",
- "ignore": "^5.1.1",
- "minimatch": "^3.0.4",
- "resolve": "^1.10.1",
- "semver": "^6.1.0"
+ "@eslint-community/eslint-utils": "^4.4.0",
+ "builtins": "^5.0.1",
+ "eslint-plugin-es-x": "^7.1.0",
+ "get-tsconfig": "^4.7.0",
+ "ignore": "^5.2.4",
+ "is-core-module": "^2.12.1",
+ "minimatch": "^3.1.2",
+ "resolve": "^1.22.2",
+ "semver": "^7.5.3"
},
"engines": {
- "node": ">=8.10.0"
+ "node": ">=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/mysticatea"
},
"peerDependencies": {
- "eslint": ">=5.16.0"
+ "eslint": ">=7.0.0"
}
},
- "node_modules/eslint-plugin-node/node_modules/eslint-utils": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
- "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
+ "node_modules/eslint-plugin-n/node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dependencies": {
- "eslint-visitor-keys": "^1.1.0"
+ "lru-cache": "^6.0.0"
},
- "engines": {
- "node": ">=6"
+ "bin": {
+ "semver": "bin/semver.js"
},
- "funding": {
- "url": "https://github.com/sponsors/mysticatea"
- }
- },
- "node_modules/eslint-plugin-node/node_modules/eslint-visitor-keys": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
- "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
"engines": {
- "node": ">=4"
+ "node": ">=10"
}
},
"node_modules/eslint-plugin-prettier": {
@@ -7481,9 +7479,12 @@
}
},
"node_modules/get-tsconfig": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.5.0.tgz",
- "integrity": "sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==",
+ "version": "4.7.2",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz",
+ "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==",
+ "dependencies": {
+ "resolve-pkg-maps": "^1.0.0"
+ },
"funding": {
"url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
}
@@ -14014,17 +14015,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/regexpp": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
- "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/mysticatea"
- }
- },
"node_modules/registry-auth-token": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz",
@@ -14099,11 +14089,11 @@
}
},
"node_modules/resolve": {
- "version": "1.22.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+ "version": "1.22.8",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
+ "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
"dependencies": {
- "is-core-module": "^2.9.0",
+ "is-core-module": "^2.13.0",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
},
@@ -14140,6 +14130,14 @@
"node": ">=8"
}
},
+ "node_modules/resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+ "funding": {
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+ }
+ },
"node_modules/responselike": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz",
diff --git a/package.json b/package.json
index 3e3e60a..6e25524 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
"eslint-plugin-lodash": "^7.4.0",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-modules-newline": "0.0.6",
- "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-n": "^16.2.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",