From df989a5653118ddee4dd84b5d8408a134e1aa51a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 6 Dec 2024 00:24:08 +0000 Subject: [PATCH] feat(deps): replace dependency eslint-plugin-node with eslint-plugin-n 14.0.0 BREAKING CHANGE: Replace eslint-plugin-node with eslint-plugin-n --- docs/breaking-changes/v13.md | 10 +++ index.js | 10 +-- legacy.js | 10 +-- package-lock.json | 94 ++++++++--------------- package.json | 2 +- test/__snapshots__/test.spec.js.snap | 110 +++++++++++++-------------- 6 files changed, 108 insertions(+), 128 deletions(-) create mode 100644 docs/breaking-changes/v13.md diff --git a/docs/breaking-changes/v13.md b/docs/breaking-changes/v13.md new file mode 100644 index 0000000..7975310 --- /dev/null +++ b/docs/breaking-changes/v13.md @@ -0,0 +1,10 @@ +# Breaking changes in v13 + +We are replacing `eslint-plugin-node` with `eslint-plugin-n`. See https://github.com/eslint-community/eslint-plugin-n + +If you were reconfiguring some of the node rules in your eslint config you will have to update them: + +```diff +- "node/no-missing-import": "off", ++ "n/no-missing-import": "off", +``` diff --git a/index.js b/index.js index f067af6..23b3e23 100644 --- a/index.js +++ b/index.js @@ -11,7 +11,7 @@ module.exports = { "import", "jest", "json", - "node", + "n", "prettier", "simple-import-sort", "sonarjs", @@ -27,7 +27,7 @@ module.exports = { "plugin:import/typescript", "plugin:jest/recommended", "plugin:json/recommended-legacy", - "plugin:node/recommended", + "plugin:n/recommended", "plugin:prettier/recommended", "plugin:sonarjs/recommended-legacy", "plugin:typescript-sort-keys/recommended", @@ -61,14 +61,14 @@ module.exports = { "import/prefer-default-export": "off", "jest/no-jest-import": "off", "json/*": "error", - "node/no-unpublished-import": [ + "n/no-unpublished-import": [ "error", { allowModules: ["@jest/globals", "nock"], }, ], - "node/no-unsupported-features/es-syntax": "off", - "node/no-missing-import": "off", + "n/no-unsupported-features/es-syntax": "off", + "n/no-missing-import": "off", "simple-import-sort/imports": "error", "simple-import-sort/exports": "error", "sort-destructure-keys/sort-destructure-keys": "error", diff --git a/legacy.js b/legacy.js index 9b9b90f..2b28fc4 100644 --- a/legacy.js +++ b/legacy.js @@ -12,7 +12,7 @@ module.exports = { "import", "jest", "json", - "node", + "n", "prettier", "simple-import-sort", "sonarjs", @@ -27,7 +27,7 @@ module.exports = { "plugin:import/typescript", "plugin:jest/recommended", "plugin:json/recommended-legacy", - "plugin:node/recommended", + "plugin:n/recommended", "plugin:prettier/recommended", "plugin:sonarjs/recommended-legacy", "plugin:typescript-sort-keys/recommended", @@ -62,14 +62,14 @@ module.exports = { "import/prefer-default-export": "off", "jest/no-jest-import": "off", "json/*": "error", - "node/no-unpublished-import": [ + "n/no-unpublished-import": [ "error", { allowModules: ["@jest/globals", "nock"], }, ], - "node/no-unsupported-features/es-syntax": "off", - "node/no-missing-import": "off", + "n/no-unsupported-features/es-syntax": "off", + "n/no-missing-import": "off", "simple-import-sort/imports": "error", "simple-import-sort/exports": "error", "sort-destructure-keys/sort-destructure-keys": "error", diff --git a/package-lock.json b/package-lock.json index 7dda430..298954a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "eslint-plugin-import": "2.31.0", "eslint-plugin-jest": "28.9.0", "eslint-plugin-json": "4.0.1", - "eslint-plugin-node": "11.1.0", + "eslint-plugin-n": "14.0.0", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-simple-import-sort": "12.1.1", "eslint-plugin-sonarjs": "3.0.0", @@ -4092,9 +4092,9 @@ } }, "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==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", + "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", "dependencies": { "eslint-utils": "^2.0.0", "regexpp": "^3.0.0" @@ -4226,51 +4226,33 @@ "node": ">=18.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": "14.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-14.0.0.tgz", + "integrity": "sha512-mNwplPLsbaKhHyA0fa/cy8j+oF6bF6l81hzBTWa6JOvPcMNAuIogk2ih6d9tYvWYzyUG+7ZFeChqbzdFpg2QrQ==", "dependencies": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", "ignore": "^5.1.1", + "is-core-module": "^2.3.0", "minimatch": "^3.0.4", "resolve": "^1.10.1", "semver": "^6.1.0" }, "engines": { - "node": ">=8.10.0" - }, - "peerDependencies": { - "eslint": ">=5.16.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==", - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" + "node": ">=12.22.0" }, "funding": { "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=7.0.0" } }, - "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_modules/eslint-plugin-node/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "node_modules/eslint-plugin-n/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -10922,9 +10904,9 @@ } }, "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==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", + "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", "requires": { "eslint-utils": "^2.0.0", "regexpp": "^3.0.0" @@ -11011,36 +10993,24 @@ "vscode-json-languageservice": "^4.1.6" } }, - "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==", + "eslint-plugin-n": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-14.0.0.tgz", + "integrity": "sha512-mNwplPLsbaKhHyA0fa/cy8j+oF6bF6l81hzBTWa6JOvPcMNAuIogk2ih6d9tYvWYzyUG+7ZFeChqbzdFpg2QrQ==", "requires": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", "ignore": "^5.1.1", + "is-core-module": "^2.3.0", "minimatch": "^3.0.4", "resolve": "^1.10.1", "semver": "^6.1.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==", - "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==" - }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, diff --git a/package.json b/package.json index fd449ba..3d0f8ce 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "eslint-plugin-import": "2.31.0", "eslint-plugin-jest": "28.9.0", "eslint-plugin-json": "4.0.1", - "eslint-plugin-node": "11.1.0", + "eslint-plugin-n": "14.0.0", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-simple-import-sort": "12.1.1", "eslint-plugin-sonarjs": "3.0.0", diff --git a/test/__snapshots__/test.spec.js.snap b/test/__snapshots__/test.spec.js.snap index 0a16a48..fce7fa2 100644 --- a/test/__snapshots__/test.spec.js.snap +++ b/test/__snapshots__/test.spec.js.snap @@ -76,7 +76,7 @@ exports[`validate config load config file in ESLint to validate all rules are co "sonarjs", "simple-import-sort", "prettier", - "node", + "n", "json", "import", "@typescript-eslint", @@ -541,6 +541,60 @@ exports[`validate config load config file in ESLint to validate all rules are co "multiline-ternary": [ "off", ], + "n/no-deprecated-api": [ + "error", + ], + "n/no-exports-assign": [ + "error", + ], + "n/no-extraneous-import": [ + "error", + ], + "n/no-extraneous-require": [ + "error", + ], + "n/no-missing-import": [ + "off", + ], + "n/no-missing-require": [ + "error", + ], + "n/no-process-exit": [ + "error", + ], + "n/no-unpublished-bin": [ + "error", + ], + "n/no-unpublished-import": [ + "error", + { + "allowModules": [ + "@jest/globals", + "nock", + ], + }, + ], + "n/no-unpublished-require": [ + "error", + ], + "n/no-unsupported-features/es-builtins": [ + "error", + ], + "n/no-unsupported-features/es-syntax": [ + "off", + { + "ignores": [], + }, + ], + "n/no-unsupported-features/node-builtins": [ + "error", + ], + "n/process-exit-as-throw": [ + "error", + ], + "n/shebang": [ + "error", + ], "new-parens": [ "off", ], @@ -691,9 +745,6 @@ exports[`validate config load config file in ESLint to validate all rules are co "no-octal": [ "error", ], - "no-process-exit": [ - "error", - ], "no-prototype-builtins": [ "error", ], @@ -784,57 +835,6 @@ exports[`validate config load config file in ESLint to validate all rules are co "no-wrap-func": [ "off", ], - "node/no-deprecated-api": [ - "error", - ], - "node/no-exports-assign": [ - "error", - ], - "node/no-extraneous-import": [ - "error", - ], - "node/no-extraneous-require": [ - "error", - ], - "node/no-missing-import": [ - "off", - ], - "node/no-missing-require": [ - "error", - ], - "node/no-unpublished-bin": [ - "error", - ], - "node/no-unpublished-import": [ - "error", - { - "allowModules": [ - "@jest/globals", - "nock", - ], - }, - ], - "node/no-unpublished-require": [ - "error", - ], - "node/no-unsupported-features/es-builtins": [ - "error", - ], - "node/no-unsupported-features/es-syntax": [ - "off", - { - "ignores": [], - }, - ], - "node/no-unsupported-features/node-builtins": [ - "error", - ], - "node/process-exit-as-throw": [ - "error", - ], - "node/shebang": [ - "error", - ], "nonblock-statement-body-position": [ "off", ],