Skip to content

Commit

Permalink
Use maintained fork of eslint-plugin-node
Browse files Browse the repository at this point in the history
Since it can be hard for users of `eslint-plugin-node` to find out that there's a maintained fork from the official ESLint Community project I'm doing a drive where I'm making PR:s to some projects to raise awareness. See: eslint-community/eslint-plugin-n#100
  • Loading branch information
voxpelli committed Aug 13, 2023
1 parent a28a285 commit b538720
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 70 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ module.exports = {
es6: true,
},

plugins: ['node'],
extends: ['plugin:node/recommended'],
plugins: ['n'],
extends: ['plugin:n/recommended'],
rules: {
// add your custom rules and overrides for node files here
'no-process-exit': 'off',
Expand Down
1 change: 1 addition & 0 deletions bin/build-for-publishing.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Promise.resolve()
// eslint-disable-next-line
console.log('build-for-publishing failed');
// failure, must manually exit non-zero
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}
);
2 changes: 1 addition & 1 deletion bin/changelog.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

/* eslint-disable no-console, node/shebang */
/* eslint-disable no-console, n/shebang */

'use strict';

Expand Down
2 changes: 1 addition & 1 deletion bin/publish-to-s3.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@ if (!buildInfo.isBuildForTag) {

function exitGracefully(err) {
console.log(err); // eslint-disable-line no-console
process.exit(1);
process.exit(1); // eslint-disable-line n/no-process-exit
}
4 changes: 2 additions & 2 deletions bin/run-browserstack-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function run(command, args = []) {
]);

console.log('success');
process.exit(0);
process.exit(0); // eslint-disable-line n/no-process-exit
} finally {
if (process.env.GITHUB_RUN_ID) {
await run('ember', ['browserstack:results']);
Expand All @@ -42,6 +42,6 @@ function run(command, args = []) {
} catch (error) {
console.log('error');
console.log(error);
process.exit(1);
process.exit(1); // eslint-disable-line n/no-process-exit
}
})();
4 changes: 2 additions & 2 deletions bin/run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ function runAndExit() {
runInSequence(testFunctions)
.then(function () {
console.log(chalk.green('Passed!'));
process.exit(0);
process.exit(0); // eslint-disable-line n/no-process-exit
})
.catch(function (err) {
console.error(chalk.red(err.toString()));
console.error(chalk.red('Failed!'));
process.exit(1);
process.exit(1); // eslint-disable-line n/no-process-exit
});
}

Expand Down
2 changes: 1 addition & 1 deletion broccoli/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ module.exports.glimmerES = function glimmerES(environment) {
if (environment === 'development') {
let hasGlimmerDebug = true;
try {
require.resolve('@glimmer/debug'); // eslint-disable-line node/no-missing-require
require.resolve('@glimmer/debug'); // eslint-disable-line n/no-missing-require
} catch (e) {
hasGlimmerDebug = false;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"eslint-plugin-disable-features": "^0.1.3",
"eslint-plugin-ember-internal": "^3.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-n": "^16.0.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-qunit": "^7.3.4",
"execa": "^5.1.1",
Expand Down
9 changes: 2 additions & 7 deletions smoke-tests/ember-test-app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,8 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: {
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off',
},
plugins: ['n'],
extends: ['plugin:n/recommended'],
},
{
// test files
Expand Down
91 changes: 38 additions & 53 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2047,17 +2047,17 @@
semver "^7.3.5"
typescript-memoize "^1.0.1"

"@eslint-community/eslint-utils@^4.2.0":
"@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
dependencies:
eslint-visitor-keys "^3.3.0"

"@eslint-community/regexpp@^4.4.0":
version "4.5.0"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.0.tgz#f6f729b02feee2c749f57e334b7a1b5f40a81724"
integrity sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==
"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.0":
version "4.6.2"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.6.2.tgz#1816b5f6948029c5eaacb0703b850ee0cb37d8f8"
integrity sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==

"@eslint/eslintrc@^2.0.2":
version "2.0.2"
Expand Down Expand Up @@ -4121,7 +4121,7 @@ buffer@^5.2.1, buffer@^5.5.0:
base64-js "^1.0.2"
ieee754 "^1.1.4"

builtins@^5.0.0:
builtins@^5.0.0, builtins@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9"
integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==
Expand Down Expand Up @@ -5717,13 +5717,13 @@ eslint-plugin-ember-internal@^3.0.0:
line-column "^1.0.2"
requireindex "^1.2.0"

eslint-plugin-es@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.0.tgz#98cb1bc8ab0aa807977855e11ad9d1c9422d014b"
integrity "sha1-mMsbyKsKqAeXeFXhGtnRyUItAUs= sha512-6/Jb/J/ZvSebydwbBJO1R9E5ky7YeElfK56Veh7e4QGFHCXoIXGH9HhVz+ibJLM3XJ1XjP+T7rKBLUa/Y7eIng=="
eslint-plugin-es-x@^7.1.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-es-x/-/eslint-plugin-es-x-7.2.0.tgz#5779d742ad31f8fd780b9481331481e142b72311"
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"

eslint-plugin-import@^2.27.5:
version "2.27.5"
Expand All @@ -5746,17 +5746,19 @@ eslint-plugin-import@^2.27.5:
semver "^6.3.0"
tsconfig-paths "^3.14.1"

eslint-plugin-node@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d"
integrity "sha1-yVVEQW7kraJnQKMEdO78VALcZx0= sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g=="
eslint-plugin-n@^16.0.1:
version "16.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-16.0.1.tgz#baa62bb3af52940a53ba15386348ad9b0b425ada"
integrity sha512-CDmHegJN0OF3L5cz5tATH84RPQm9kG+Yx39wIqIwPR2C0uhBGMWfbbOtetR83PQjjidA5aXMu+LEFw1jaSwvTA==
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"
ignore "^5.2.4"
is-core-module "^2.12.1"
minimatch "^3.1.2"
resolve "^1.22.2"
semver "^7.5.3"

eslint-plugin-prettier@^4.2.1:
version "4.2.1"
Expand Down Expand Up @@ -5789,25 +5791,13 @@ eslint-scope@^7.2.0:
esrecurse "^4.3.0"
estraverse "^5.2.0"

eslint-utils@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
integrity "sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc= sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg=="
dependencies:
eslint-visitor-keys "^1.1.0"

eslint-utils@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672"
integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==
dependencies:
eslint-visitor-keys "^2.0.0"

eslint-visitor-keys@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
integrity "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4= sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ=="

eslint-visitor-keys@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8"
Expand Down Expand Up @@ -7315,10 +7305,10 @@ [email protected], ieee754@^1.1.4:
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
integrity "sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q= sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="

ignore@^5.1.1, ignore@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a"
integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==
ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4:
version "5.2.4"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==

import-fresh@^3.0.0, import-fresh@^3.2.1:
version "3.2.1"
Expand Down Expand Up @@ -7540,10 +7530,10 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7:
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==

is-core-module@^2.11.0, is-core-module@^2.5.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144"
integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==
is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.12.1:
version "2.13.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db"
integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==
dependencies:
has "^1.0.3"

Expand Down Expand Up @@ -10222,11 +10212,6 @@ regexp.prototype.flags@^1.3.1, regexp.prototype.flags@^1.4.3:
define-properties "^1.1.3"
functions-have-names "^1.2.2"

regexpp@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2"
integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==

regexpu-core@^5.2.1:
version "5.2.2"
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.2.2.tgz#3e4e5d12103b64748711c3aad69934d7718e75fc"
Expand Down Expand Up @@ -10402,7 +10387,7 @@ resolve-url@^0.2.1:
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
integrity "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg=="

resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.22.2, resolve@^1.4.0, resolve@^1.5.0:
resolve@^1.10.0, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.22.2, resolve@^1.4.0, resolve@^1.5.0:
version "1.22.2"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f"
integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==
Expand Down Expand Up @@ -10658,15 +10643,15 @@ schema-utils@^4.0.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==

semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0:
semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

semver@^7.0.0, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.2:
version "7.5.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb"
integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==
semver@^7.0.0, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.2, semver@^7.5.3:
version "7.5.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"

Expand Down

0 comments on commit b538720

Please sign in to comment.