Skip to content

Commit

Permalink
Use eslint-plugin-n instead of eslint-plugin-node
Browse files Browse the repository at this point in the history
  • Loading branch information
bertdeblock committed Nov 2, 2022
1 parent aa25747 commit 570abb3
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Expand Up @@ -5,8 +5,8 @@ module.exports = {
parserOptions: {
ecmaVersion: 2020,
},
plugins: ['node', 'prettier'],
extends: ['eslint:recommended', 'plugin:node/recommended', 'plugin:prettier/recommended'],
plugins: ['prettier'],
extends: ['eslint:recommended', 'plugin:n/recommended', 'plugin:prettier/recommended'],
env: {
browser: false,
node: true,
Expand Down
2 changes: 1 addition & 1 deletion dev/changelog.js
@@ -1,5 +1,5 @@
#!/usr/bin/env node
/* eslint-disable node/shebang */
/* eslint-disable n/shebang */

'use strict';

Expand Down
2 changes: 1 addition & 1 deletion dev/update-blueprint-dependencies.js
Expand Up @@ -150,7 +150,7 @@ if (module === require.main) {

console.error(error.stack);

/* eslint-disable-next-line no-process-exit */
// eslint-disable-next-line n/no-process-exit
process.exit(1);
});

Expand Down
2 changes: 1 addition & 1 deletion lib/models/command.js
Expand Up @@ -190,7 +190,7 @@ let Command = CoreObject.extend({
} else {
// interrupt all external commands which don't use `runTask()` with an error

// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}
},
Expand Down
2 changes: 1 addition & 1 deletion lib/models/task.js
Expand Up @@ -15,7 +15,7 @@ class Task extends CoreObject {
* @method onInterrupt
*/
onInterrupt() {
// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -147,7 +147,7 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-chai-expect": "^3.0.0",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-n": "^15.3.0",
"eslint-plugin-prettier": "^4.2.1",
"fixturify": "^2.1.0",
"jsdom": "^20.0.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/assert-version-lock.js
@@ -1,6 +1,6 @@
'use strict';

// eslint-disable-next-line node/no-unpublished-require
// eslint-disable-next-line n/no-unpublished-require
const expect = require('chai').expect;
const semver = require('semver');

Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/dist-checker.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs');
const path = require('path');
// eslint-disable-next-line node/no-unpublished-require
// eslint-disable-next-line n/no-unpublished-require
const jsdom = require('jsdom');
const { AssertionError } = require('assert');

Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/has-global-yarn.js
@@ -1,6 +1,6 @@
'use strict';

/* eslint-disable node/no-unpublished-require */
// eslint-disable-next-line n/no-unpublished-require
const which = require('which');

module.exports = which.sync('yarn', { nothrow: true });
2 changes: 0 additions & 2 deletions tests/helpers/mock-project.js
Expand Up @@ -4,8 +4,6 @@ const Project = require('../../lib/models/project');
const Instrumentation = require('../../lib/models/instrumentation');
const MockUI = require('console-ui/mock');

// eslint-disable-next-line node/no-unpublished-require

class MockProject extends Project {
constructor(options = {}) {
let root = options.root || process.cwd();
Expand Down
3 changes: 1 addition & 2 deletions tests/helpers/process-help-string.js
@@ -1,8 +1,7 @@
'use strict';

const chalk = require('chalk');

// eslint-disable-next-line node/no-unpublished-require
// eslint-disable-next-line n/no-unpublished-require
const stripAnsi = require('strip-ansi');

module.exports = function (helpString) {
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/proxy-server.js
@@ -1,7 +1,7 @@
'use strict';

const http = require('http');
/* eslint-disable node/no-unpublished-require */
// eslint-disable-next-line n/no-unpublished-require
const WebSocketServer = require('websocket').server;

class ProxyServer {
Expand Down
4 changes: 2 additions & 2 deletions tests/runner.js
Expand Up @@ -68,7 +68,7 @@ function runMocha() {
mocha.run((failures) => {
console.timeEnd('Mocha Tests Running Time');

// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(failures);
});
}
Expand All @@ -79,6 +79,6 @@ Promise.resolve()
console.error(error);
console.error(error.stack);

// eslint-disable-next-line no-process-exit
// eslint-disable-next-line n/no-process-exit
process.exit(1);
});
41 changes: 25 additions & 16 deletions yarn.lock
Expand Up @@ -1833,7 +1833,7 @@ bufferutil@^4.0.1:
dependencies:
node-gyp-build "^4.3.0"

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 @@ -3195,10 +3195,10 @@ eslint-plugin-chai-expect@^3.0.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-3.0.0.tgz#812d7384756177b2d424040cb3c20e78606db1b2"
integrity sha512-NS0YBcToJl+BRKBSMCwRs/oHJIX67fG5Gvb4tGked+9Wnd1/PzKijd82B2QVKcSSOwRe+pp4RAJ2AULeck4eQw==

eslint-plugin-es@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893"
integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==
eslint-plugin-es@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9"
integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==
dependencies:
eslint-utils "^2.0.0"
regexpp "^3.0.0"
Expand All @@ -3211,17 +3211,19 @@ eslint-plugin-mocha@^10.1.0:
eslint-utils "^3.0.0"
rambda "^7.1.0"

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 sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==
eslint-plugin-n@^15.3.0:
version "15.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.3.0.tgz#3e1ad236a17dce7ecc0760621c46cc251ef99560"
integrity sha512-IyzPnEWHypCWasDpxeJnim60jhlumbmq0pubL6IOcnk8u2y53s5QfT8JnXy7skjHJ44yWHRb11PLtDHuu1kg/Q==
dependencies:
eslint-plugin-es "^3.0.0"
eslint-utils "^2.0.0"
builtins "^5.0.1"
eslint-plugin-es "^4.1.0"
eslint-utils "^3.0.0"
ignore "^5.1.1"
minimatch "^3.0.4"
resolve "^1.10.1"
semver "^6.1.0"
is-core-module "^2.10.0"
minimatch "^3.1.2"
resolve "^1.22.1"
semver "^7.3.7"

eslint-plugin-prettier@^4.2.1:
version "4.2.1"
Expand Down Expand Up @@ -4979,6 +4981,13 @@ is-ci@3.0.1, is-ci@^3.0.1:
dependencies:
ci-info "^3.2.0"

is-core-module@^2.10.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==
dependencies:
has "^1.0.3"

is-core-module@^2.9.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69"
Expand Down Expand Up @@ -7629,7 +7638,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=

resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.20.0, resolve@^1.22.1:
resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.13.1, resolve@^1.20.0, resolve@^1.22.1:
version "1.22.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"
integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==
Expand Down Expand Up @@ -7855,7 +7864,7 @@ semver@^5.4.1, semver@^5.5.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.2.0, semver@^6.3.0:
semver@^6.0.0, 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==
Expand Down

0 comments on commit 570abb3

Please sign in to comment.