Skip to content

Commit b538720

Browse files
committed
Use maintained fork of eslint-plugin-node
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
1 parent a28a285 commit b538720

10 files changed

+51
-70
lines changed

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ module.exports = {
151151
es6: true,
152152
},
153153

154-
plugins: ['node'],
155-
extends: ['plugin:node/recommended'],
154+
plugins: ['n'],
155+
extends: ['plugin:n/recommended'],
156156
rules: {
157157
// add your custom rules and overrides for node files here
158158
'no-process-exit': 'off',

bin/build-for-publishing.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Promise.resolve()
9393
// eslint-disable-next-line
9494
console.log('build-for-publishing failed');
9595
// failure, must manually exit non-zero
96+
// eslint-disable-next-line n/no-process-exit
9697
process.exit(1);
9798
}
9899
);

bin/changelog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
/* eslint-disable no-console, node/shebang */
3+
/* eslint-disable no-console, n/shebang */
44

55
'use strict';
66

bin/publish-to-s3.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,5 @@ if (!buildInfo.isBuildForTag) {
118118

119119
function exitGracefully(err) {
120120
console.log(err); // eslint-disable-line no-console
121-
process.exit(1);
121+
process.exit(1); // eslint-disable-line n/no-process-exit
122122
}

bin/run-browserstack-tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function run(command, args = []) {
3232
]);
3333

3434
console.log('success');
35-
process.exit(0);
35+
process.exit(0); // eslint-disable-line n/no-process-exit
3636
} finally {
3737
if (process.env.GITHUB_RUN_ID) {
3838
await run('ember', ['browserstack:results']);
@@ -42,6 +42,6 @@ function run(command, args = []) {
4242
} catch (error) {
4343
console.log('error');
4444
console.log(error);
45-
process.exit(1);
45+
process.exit(1); // eslint-disable-line n/no-process-exit
4646
}
4747
})();

bin/run-tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ function runAndExit() {
104104
runInSequence(testFunctions)
105105
.then(function () {
106106
console.log(chalk.green('Passed!'));
107-
process.exit(0);
107+
process.exit(0); // eslint-disable-line n/no-process-exit
108108
})
109109
.catch(function (err) {
110110
console.error(chalk.red(err.toString()));
111111
console.error(chalk.red('Failed!'));
112-
process.exit(1);
112+
process.exit(1); // eslint-disable-line n/no-process-exit
113113
});
114114
}
115115

broccoli/packages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ module.exports.glimmerES = function glimmerES(environment) {
274274
if (environment === 'development') {
275275
let hasGlimmerDebug = true;
276276
try {
277-
require.resolve('@glimmer/debug'); // eslint-disable-line node/no-missing-require
277+
require.resolve('@glimmer/debug'); // eslint-disable-line n/no-missing-require
278278
} catch (e) {
279279
hasGlimmerDebug = false;
280280
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"eslint-plugin-disable-features": "^0.1.3",
137137
"eslint-plugin-ember-internal": "^3.0.0",
138138
"eslint-plugin-import": "^2.27.5",
139-
"eslint-plugin-node": "^11.1.0",
139+
"eslint-plugin-n": "^16.0.1",
140140
"eslint-plugin-prettier": "^4.2.1",
141141
"eslint-plugin-qunit": "^7.3.4",
142142
"execa": "^5.1.1",

smoke-tests/ember-test-app/.eslintrc.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,8 @@ module.exports = {
4141
browser: false,
4242
node: true,
4343
},
44-
plugins: ['node'],
45-
extends: ['plugin:node/recommended'],
46-
rules: {
47-
// this can be removed once the following is fixed
48-
// https://github.com/mysticatea/eslint-plugin-node/issues/77
49-
'node/no-unpublished-require': 'off',
50-
},
44+
plugins: ['n'],
45+
extends: ['plugin:n/recommended'],
5146
},
5247
{
5348
// test files

yarn.lock

Lines changed: 38 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,17 +2047,17 @@
20472047
semver "^7.3.5"
20482048
typescript-memoize "^1.0.1"
20492049

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

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

20622062
"@eslint/eslintrc@^2.0.2":
20632063
version "2.0.2"
@@ -4121,7 +4121,7 @@ buffer@^5.2.1, buffer@^5.5.0:
41214121
base64-js "^1.0.2"
41224122
ieee754 "^1.1.4"
41234123

4124-
builtins@^5.0.0:
4124+
builtins@^5.0.0, builtins@^5.0.1:
41254125
version "5.0.1"
41264126
resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9"
41274127
integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==
@@ -5717,13 +5717,13 @@ eslint-plugin-ember-internal@^3.0.0:
57175717
line-column "^1.0.2"
57185718
requireindex "^1.2.0"
57195719

5720-
eslint-plugin-es@^3.0.0:
5721-
version "3.0.0"
5722-
resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.0.tgz#98cb1bc8ab0aa807977855e11ad9d1c9422d014b"
5723-
integrity "sha1-mMsbyKsKqAeXeFXhGtnRyUItAUs= sha512-6/Jb/J/ZvSebydwbBJO1R9E5ky7YeElfK56Veh7e4QGFHCXoIXGH9HhVz+ibJLM3XJ1XjP+T7rKBLUa/Y7eIng=="
5720+
eslint-plugin-es-x@^7.1.0:
5721+
version "7.2.0"
5722+
resolved "https://registry.yarnpkg.com/eslint-plugin-es-x/-/eslint-plugin-es-x-7.2.0.tgz#5779d742ad31f8fd780b9481331481e142b72311"
5723+
integrity sha512-9dvv5CcvNjSJPqnS5uZkqb3xmbeqRLnvXKK7iI5+oK/yTusyc46zbBZKENGsOfojm/mKfszyZb+wNqNPAPeGXA==
57245724
dependencies:
5725-
eslint-utils "^2.0.0"
5726-
regexpp "^3.0.0"
5725+
"@eslint-community/eslint-utils" "^4.1.2"
5726+
"@eslint-community/regexpp" "^4.6.0"
57275727

57285728
eslint-plugin-import@^2.27.5:
57295729
version "2.27.5"
@@ -5746,17 +5746,19 @@ eslint-plugin-import@^2.27.5:
57465746
semver "^6.3.0"
57475747
tsconfig-paths "^3.14.1"
57485748

5749-
eslint-plugin-node@^11.1.0:
5750-
version "11.1.0"
5751-
resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d"
5752-
integrity "sha1-yVVEQW7kraJnQKMEdO78VALcZx0= sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g=="
5749+
eslint-plugin-n@^16.0.1:
5750+
version "16.0.1"
5751+
resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-16.0.1.tgz#baa62bb3af52940a53ba15386348ad9b0b425ada"
5752+
integrity sha512-CDmHegJN0OF3L5cz5tATH84RPQm9kG+Yx39wIqIwPR2C0uhBGMWfbbOtetR83PQjjidA5aXMu+LEFw1jaSwvTA==
57535753
dependencies:
5754-
eslint-plugin-es "^3.0.0"
5755-
eslint-utils "^2.0.0"
5756-
ignore "^5.1.1"
5757-
minimatch "^3.0.4"
5758-
resolve "^1.10.1"
5759-
semver "^6.1.0"
5754+
"@eslint-community/eslint-utils" "^4.4.0"
5755+
builtins "^5.0.1"
5756+
eslint-plugin-es-x "^7.1.0"
5757+
ignore "^5.2.4"
5758+
is-core-module "^2.12.1"
5759+
minimatch "^3.1.2"
5760+
resolve "^1.22.2"
5761+
semver "^7.5.3"
57605762

57615763
eslint-plugin-prettier@^4.2.1:
57625764
version "4.2.1"
@@ -5789,25 +5791,13 @@ eslint-scope@^7.2.0:
57895791
esrecurse "^4.3.0"
57905792
estraverse "^5.2.0"
57915793

5792-
eslint-utils@^2.0.0:
5793-
version "2.1.0"
5794-
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
5795-
integrity "sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc= sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg=="
5796-
dependencies:
5797-
eslint-visitor-keys "^1.1.0"
5798-
57995794
eslint-utils@^3.0.0:
58005795
version "3.0.0"
58015796
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672"
58025797
integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==
58035798
dependencies:
58045799
eslint-visitor-keys "^2.0.0"
58055800

5806-
eslint-visitor-keys@^1.1.0:
5807-
version "1.3.0"
5808-
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
5809-
integrity "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4= sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ=="
5810-
58115801
eslint-visitor-keys@^2.0.0:
58125802
version "2.0.0"
58135803
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8"
@@ -7315,10 +7305,10 @@ [email protected], ieee754@^1.1.4:
73157305
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
73167306
integrity "sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q= sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
73177307

7318-
ignore@^5.1.1, ignore@^5.2.0:
7319-
version "5.2.0"
7320-
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a"
7321-
integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==
7308+
ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4:
7309+
version "5.2.4"
7310+
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
7311+
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
73227312

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

7543-
is-core-module@^2.11.0, is-core-module@^2.5.0:
7544-
version "2.11.0"
7545-
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144"
7546-
integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==
7533+
is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.12.1:
7534+
version "2.13.0"
7535+
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db"
7536+
integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==
75477537
dependencies:
75487538
has "^1.0.3"
75497539

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

10225-
regexpp@^3.0.0:
10226-
version "3.2.0"
10227-
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2"
10228-
integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
10229-
1023010215
regexpu-core@^5.2.1:
1023110216
version "5.2.2"
1023210217
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.2.2.tgz#3e4e5d12103b64748711c3aad69934d7718e75fc"
@@ -10402,7 +10387,7 @@ resolve-url@^0.2.1:
1040210387
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
1040310388
integrity "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg=="
1040410389

10405-
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:
10390+
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:
1040610391
version "1.22.2"
1040710392
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f"
1040810393
integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==
@@ -10658,15 +10643,15 @@ schema-utils@^4.0.0:
1065810643
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
1065910644
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
1066010645

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

10666-
semver@^7.0.0, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.2:
10667-
version "7.5.2"
10668-
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb"
10669-
integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==
10651+
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:
10652+
version "7.5.4"
10653+
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
10654+
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
1067010655
dependencies:
1067110656
lru-cache "^6.0.0"
1067210657

0 commit comments

Comments
 (0)