From 2d5da4646c824057a0625e06913b2530c1dd5ea0 Mon Sep 17 00:00:00 2001 From: Will Stone <654103+will-stone@users.noreply.github.com> Date: Sat, 16 Sep 2023 11:29:45 +0100 Subject: [PATCH] chore: upgrade eslint node config --- package-lock.json | 155 ++++++++----------- package.json | 2 +- src/main/state/middleware.action-hub.ts | 2 +- src/main/state/middleware.bus.ts | 2 +- src/renderers/picker/state/middleware.ts | 2 +- src/renderers/prefs/state/middleware.ts | 2 +- src/renderers/shared/state/middleware.bus.ts | 2 +- 7 files changed, 67 insertions(+), 100 deletions(-) diff --git a/package-lock.json b/package-lock.json index d548cd20..c3e441aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "@vercel/webpack-asset-relocator-loader": "^1.7.3", "@will-stone/eslint-config-base": "^7.1.2", "@will-stone/eslint-config-jest": "^3.0.1", - "@will-stone/eslint-config-node": "^2.0.1", + "@will-stone/eslint-config-node": "^2.0.2", "@will-stone/eslint-config-prettier": "^3.0.1", "@will-stone/eslint-config-react": "^3.0.2", "@will-stone/eslint-config-typescript": "^8.0.2", @@ -3511,12 +3511,12 @@ } }, "node_modules/@will-stone/eslint-config-node": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@will-stone/eslint-config-node/-/eslint-config-node-2.0.1.tgz", - "integrity": "sha512-UL4Dbhgejfxoy13HPwHb6KShoahIVe7Pvt6QqidKzeECaxpI9pumHSYyRXWe5pUwA9UYIOqN8AaCTlwLkOJukw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@will-stone/eslint-config-node/-/eslint-config-node-2.0.2.tgz", + "integrity": "sha512-aA0eBYuT3ggTxRn7an/+N4bwk+Ho2WuFqPw9s1LCcuAhCmdRFwFGRQ26xMYtc4u+f2xQqWeq+cN2+pE24SIzVg==", "dev": true, "dependencies": { - "eslint-plugin-node": "^11.1.0" + "eslint-plugin-n": "^16.1.0" }, "peerDependencies": { "@will-stone/eslint-config-base": "*" @@ -4521,6 +4521,15 @@ "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==", + "dev": true, + "dependencies": { + "semver": "^7.0.0" + } + }, "node_modules/bundle-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", @@ -7044,47 +7053,23 @@ "ms": "^2.1.1" } }, - "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==", "dev": true, "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==", - "dev": true, - "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==", - "dev": true, - "engines": { - "node": ">=4" + "eslint": ">=8" } }, "node_modules/eslint-plugin-import": { @@ -7313,57 +7298,30 @@ "semver": "bin/semver.js" } }, - "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.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.1.0.tgz", + "integrity": "sha512-3wv/TooBst0N4ND+pnvffHuz9gNPmk/NkLwAxOt2JykTl/hcuECe6yhTtLJcZjIxtZwN+GX92ACp/QTLpHA3Hg==", "dev": true, "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" - }, - "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==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.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": ">=6" + "node": ">=16.0.0" }, "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==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-node/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" } }, "node_modules/eslint-plugin-prettier": { @@ -8833,6 +8791,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", + "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/git-hooks-list": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/git-hooks-list/-/git-hooks-list-3.1.0.tgz", @@ -15112,18 +15082,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==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/regjsparser": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", @@ -15279,6 +15237,15 @@ "npm": ">=2" } }, + "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==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/resolve.exports": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", diff --git a/package.json b/package.json index e2f0ce0f..7d74e382 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@vercel/webpack-asset-relocator-loader": "^1.7.3", "@will-stone/eslint-config-base": "^7.1.2", "@will-stone/eslint-config-jest": "^3.0.1", - "@will-stone/eslint-config-node": "^2.0.1", + "@will-stone/eslint-config-node": "^2.0.2", "@will-stone/eslint-config-prettier": "^3.0.1", "@will-stone/eslint-config-react": "^3.0.2", "@will-stone/eslint-config-typescript": "^8.0.2", diff --git a/src/main/state/middleware.action-hub.ts b/src/main/state/middleware.action-hub.ts index 20a9579e..83621a80 100644 --- a/src/main/state/middleware.action-hub.ts +++ b/src/main/state/middleware.action-hub.ts @@ -1,4 +1,4 @@ -/* eslint-disable node/callback-return -- must flush middleware to get nextState */ +/* eslint-disable n/callback-return -- must flush middleware to get nextState */ /* eslint-disable unicorn/prefer-regexp-test -- rtk uses .match */ import { app, autoUpdater, shell } from 'electron' import deepEqual from 'fast-deep-equal' diff --git a/src/main/state/middleware.bus.ts b/src/main/state/middleware.bus.ts index e07779ef..5edb55d6 100644 --- a/src/main/state/middleware.bus.ts +++ b/src/main/state/middleware.bus.ts @@ -9,7 +9,7 @@ export const busMiddleware = (): Middleware => () => (next) => (action) => { /** * Move to next middleware */ - // eslint-disable-next-line node/callback-return -- must flush to get nextState + // eslint-disable-next-line n/callback-return -- must flush to get nextState const result = next(action) // Send actions from main to all renderers diff --git a/src/renderers/picker/state/middleware.ts b/src/renderers/picker/state/middleware.ts index 8fdc39c4..a3b28167 100644 --- a/src/renderers/picker/state/middleware.ts +++ b/src/renderers/picker/state/middleware.ts @@ -17,7 +17,7 @@ export const pickerMiddleware = ({ dispatch }) => (next) => (action) => { - // eslint-disable-next-line node/callback-return -- Move to next middleware + // eslint-disable-next-line n/callback-return -- Move to next middleware const result = next(action) const doesActionOpenPicker = diff --git a/src/renderers/prefs/state/middleware.ts b/src/renderers/prefs/state/middleware.ts index 9099c07a..726fc745 100644 --- a/src/renderers/prefs/state/middleware.ts +++ b/src/renderers/prefs/state/middleware.ts @@ -11,7 +11,7 @@ export const prefsMiddleware = ({ dispatch }) => (next) => (action) => { - // eslint-disable-next-line node/callback-return -- Move to next middleware + // eslint-disable-next-line n/callback-return -- Move to next middleware const result = next(action) if (clickedOpenPrefs.match(action)) { diff --git a/src/renderers/shared/state/middleware.bus.ts b/src/renderers/shared/state/middleware.bus.ts index 9a5812b6..38199137 100644 --- a/src/renderers/shared/state/middleware.bus.ts +++ b/src/renderers/shared/state/middleware.bus.ts @@ -12,7 +12,7 @@ export const busMiddleware = /** * Move to next middleware */ - // eslint-disable-next-line node/callback-return -- must flush to get nextState + // eslint-disable-next-line n/callback-return -- must flush to get nextState const result = next(action) // Only send actions from this channel to prevent an infinite loop.