Skip to content

Commit 44be372

Browse files
chore(deps): update typescript-eslint monorepo to ~6.21.0 (#420)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Yosuke Ota <otameshiyo23@gmail.com>
1 parent ff69ecb commit 44be372

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
"@types/node": "^20.10.4",
7777
"@types/semver": "^7.5.6",
7878
"@typescript-eslint/eslint-plugin": "^6.14.0",
79-
"@typescript-eslint/parser": "~6.10.0",
80-
"@typescript-eslint/types": "~6.10.0",
79+
"@typescript-eslint/parser": "~6.21.0",
80+
"@typescript-eslint/types": "~6.21.0",
8181
"benchmark": "^2.1.4",
8282
"chai": "^4.3.10",
8383
"env-cmd": "^10.1.0",

tests/src/parser/test-utils.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,17 @@ function nodeReplacer(key: string, value: any): any {
578578
}
579579
}
580580
}
581+
if (
582+
typeof obj.type === "string" &&
583+
(obj.type.startsWith("Import") || obj.type.startsWith("Export")) &&
584+
Array.isArray(obj.attributes) &&
585+
obj.attributes.length === 0
586+
) {
587+
// Node types changed in typescript-eslint v6.
588+
const copy = { ...obj };
589+
delete copy.attributes;
590+
obj = copy;
591+
}
581592
}
582593
return normalizeObject(obj);
583594
}

0 commit comments

Comments
 (0)