Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to ESLint v9, typescript-eslint v8 #6987

Merged
merged 6 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

206 changes: 0 additions & 206 deletions .eslintrc.js

This file was deleted.

56 changes: 28 additions & 28 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,40 +44,40 @@
"jsonc"
],
"files.exclude": {
"node_modules/": true,
"coverage/": true,
"node_modules/": false,
"coverage/": false,
".*": false,
"**/node_modules/": true,
".nyc_output": true,
"**/coverage/": true,
"**/*.map": true,
"**/zwave-js-*.tgz": true,
"build": true,
"*.d.ts": true,
"*.map": true,
"**/build": true,
"**/*.tsbuildinfo": true,
"packages/zwave-js/**/fingerprint.txt": true,
"node_modules/zwave-js/**/fingerprint.txt": true,
".husky/_/**/*": true,
"packages/config/config/devices/index.json": true,
"packages/*/package-lock.json": true,
".yarn/*": true,
"**/node_modules/": false,
".nyc_output": false,
"**/coverage/": false,
"**/*.map": false,
"**/zwave-js-*.tgz": false,
"build": false,
"*.d.ts": false,
"*.map": false,
"**/build": false,
"**/*.tsbuildinfo": false,
"packages/zwave-js/**/fingerprint.txt": false,
"node_modules/zwave-js/**/fingerprint.txt": false,
".husky/_/**/*": false,
"packages/config/config/devices/index.json": false,
"packages/*/package-lock.json": false,
".yarn/*": false,
".yarn/patches": false,
".yarn/releases": false,
".yarn/plugins": false,
".yarn/sdks": false,
".yarn/versions": false,
"**/.pnp.*": true,
"**/*.test.js": true,
"packages/*/cache": true,
"**/.tmp": true,
"**/.tmpoh/": true,
"**/.tmpozw/": true,
"**/.tmpzwa/": true,
"**/.secrets": true,
"**/.test-payloads": true,
"(!test)/cache": true
"**/.pnp.*": false,
"**/*.test.js": false,
"packages/*/cache": false,
"**/.tmp": false,
"**/.tmpoh/": false,
"**/.tmpozw/": false,
"**/.tmpzwa/": false,
"**/.secrets": false,
"**/.test-payloads": false,
"(!test)/cache": false
},
"files.associations": {
"**/config/**/*.json": "jsonc",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/dist/index.js b/dist/index.js
index 924f1d410edf7ad3a217b9542d0455ee0954846e..92113759cd21a17b937c6b18369644a01802a9ae 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -7,6 +7,7 @@ var commaFilter = { filter: (token) => token.value === "," };
var includeCommentsFilter = { includeComments: true };
function makePredicate(isImport, addFixer) {
return (problem, context) => {
+ if (!problem.node && !problem.loc) return false;
const sourceCode = context.sourceCode || context.getSourceCode();
const { parent } = _nullishCoalesce(problem.node, () => ( // typescript-eslint >= 7.8 sets a range instead of a node
sourceCode.getNodeByRangeIndex(sourceCode.getIndexFromLoc(problem.loc.start))));
diff --git a/dist/index.mjs b/dist/index.mjs
index c9d421a8620f17748b9eef51d1480c2ba4a1b541..0752516e7adce3de842127f1a5e06bb0314e73e7 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -3,6 +3,7 @@ var commaFilter = { filter: (token) => token.value === "," };
var includeCommentsFilter = { includeComments: true };
function makePredicate(isImport, addFixer) {
return (problem, context) => {
+ if (!problem.node && !problem.loc) return false;
const sourceCode = context.sourceCode || context.getSourceCode();
const { parent } = problem.node ?? // typescript-eslint >= 7.8 sets a range instead of a node
sourceCode.getNodeByRangeIndex(sourceCode.getIndexFromLoc(problem.loc.start));
Loading
Loading