From 2c5119dc6fb10f00e0be8fbb4f79afd1f667d820 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 31 Dec 2025 05:21:34 +0800 Subject: [PATCH] Update typescript-eslint to v8.51.0 (#18551) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: fisker --- package.json | 8 +- .../__snapshots__/format.test.js.snap | 34 ---- .../format.test.js | 5 - yarn.lock | 158 +++++++++--------- 4 files changed, 79 insertions(+), 126 deletions(-) diff --git a/package.json b/package.json index f1cdba4e1..b03f1819d 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,8 @@ "@prettier/html-event-attributes": "0.0.1", "@prettier/html-tags": "2.0.0", "@prettier/parse-srcset": "3.1.0", - "@typescript-eslint/typescript-estree": "8.48.1", - "@typescript-eslint/visitor-keys": "8.48.1", + "@typescript-eslint/typescript-estree": "8.51.0", + "@typescript-eslint/visitor-keys": "8.51.0", "acorn": "8.15.0", "acorn-jsx": "5.3.2", "angular-estree-parser": "14.2.1", @@ -138,8 +138,8 @@ "@eslint/js": "9.39.1", "@stylistic/eslint-plugin": "5.6.1", "@types/jsesc": "3.0.3", - "@typescript-eslint/eslint-plugin": "8.48.1", - "@typescript-eslint/parser": "8.48.1", + "@typescript-eslint/eslint-plugin": "8.51.0", + "@typescript-eslint/parser": "8.51.0", "base64-arraybuffer-es6": "3.1.0", "browserslist": "4.28.0", "browserslist-to-esbuild": "2.1.1", diff --git a/tests/format/js/explicit-resource-management/__snapshots__/format.test.js.snap b/tests/format/js/explicit-resource-management/__snapshots__/format.test.js.snap index 850ff61ae..b7ca39be3 100644 --- a/tests/format/js/explicit-resource-management/__snapshots__/format.test.js.snap +++ b/tests/format/js/explicit-resource-management/__snapshots__/format.test.js.snap @@ -195,18 +195,6 @@ exports[`using-declarations.js [meriyah] format 1`] = ` Cause: [2:16-2:17]: Unexpected token: 'identifier'" `; -exports[`using-declarations.js [typescript] format 1`] = ` -"'using' declarations may not be initialized in for statement. (5:19) - 3 | } - 4 | -> 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;); - | ^^^^^^^^^ - 6 | - 7 | for(using /* 1 */ foo of bar()); - 8 | -Cause: 'using' declarations may not be initialized in for statement." -`; - exports[`using-declarations.js format 1`] = ` ====================================options===================================== parsers: ["babel", "flow", "typescript"] @@ -609,18 +597,6 @@ exports[`valid-await-using-comments.js [meriyah] format 1`] = ` Cause: [3:27-3:28]: Unexpected token: 'identifier'" `; -exports[`valid-await-using-comments.js [typescript] format 1`] = ` -"'await using' declarations may not be initialized in for statement. (6:42) - 4 | } - 5 | { -> 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/; - | ^^^^^^^^^^^^^ - 7 | } - 8 | { - 9 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/of/*6*/x/*7*/)/*8*/; -Cause: 'await using' declarations may not be initialized in for statement." -`; - exports[`valid-await-using-comments.js format 1`] = ` ====================================options===================================== parsers: ["babel", "flow", "typescript"] @@ -781,16 +757,6 @@ exports[`valid-for-using-declaration.js [meriyah] format 1`] = ` Cause: [2:19-2:24]: Expected ';'" `; -exports[`valid-for-using-declaration.js [typescript] format 1`] = ` -"'await using' declarations may not be initialized in for statement. (2:20) - 1 | async function f() { -> 2 | for (await using basic = reader();;); - | ^^^^^^^^^^^^^^^^ - 3 | } - 4 | -Cause: 'await using' declarations may not be initialized in for statement." -`; - exports[`valid-for-using-declaration.js format 1`] = ` ====================================options===================================== parsers: ["babel", "flow", "typescript"] diff --git a/tests/format/js/explicit-resource-management/format.test.js b/tests/format/js/explicit-resource-management/format.test.js index 653273f3a..ac05610ad 100644 --- a/tests/format/js/explicit-resource-management/format.test.js +++ b/tests/format/js/explicit-resource-management/format.test.js @@ -49,11 +49,6 @@ runFormatTest(import.meta, ["babel", "flow", "typescript"], { "valid-module-block-top-level-await-using-binding.js", ], typescript: [ - // https://github.com/typescript-eslint/typescript-eslint/blob/4f34d0ba34474926ba1eed623704b583a037f886/packages/typescript-estree/src/convert.ts#L1035-L1050 - "valid-for-using-declaration.js", - "valid-await-using-comments.js", - "using-declarations.js", - // TypeScript does not support module expr "valid-module-block-top-level-using-binding.js", "valid-module-block-top-level-await-using-binding.js", diff --git a/yarn.lock b/yarn.lock index db6b3727a..86acd202d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2562,139 +2562,138 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.48.1": - version: 8.48.1 - resolution: "@typescript-eslint/eslint-plugin@npm:8.48.1" +"@typescript-eslint/eslint-plugin@npm:8.51.0": + version: 8.51.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.51.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.48.1" - "@typescript-eslint/type-utils": "npm:8.48.1" - "@typescript-eslint/utils": "npm:8.48.1" - "@typescript-eslint/visitor-keys": "npm:8.48.1" - graphemer: "npm:^1.4.0" + "@typescript-eslint/scope-manager": "npm:8.51.0" + "@typescript-eslint/type-utils": "npm:8.51.0" + "@typescript-eslint/utils": "npm:8.51.0" + "@typescript-eslint/visitor-keys": "npm:8.51.0" ignore: "npm:^7.0.0" natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^2.1.0" + ts-api-utils: "npm:^2.2.0" peerDependencies: - "@typescript-eslint/parser": ^8.48.1 + "@typescript-eslint/parser": ^8.51.0 eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10/3ccf420805fb8adb2f3059fa26eb9c6211c0624966d8c8654a1bd586bf87f30be0c62524dfd785185ef573bedd91c42ec3c98c23aed5d60cb9ac583dd9334bc8 + checksum: 10/cb6c129a9f7e723218458ec86acb86176f7cddc1b41924416478a31fd633c2991849be56e21dca8df0ce535ea2014b361073b043085e39795816de528747c80b languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.48.1": - version: 8.48.1 - resolution: "@typescript-eslint/parser@npm:8.48.1" +"@typescript-eslint/parser@npm:8.51.0": + version: 8.51.0 + resolution: "@typescript-eslint/parser@npm:8.51.0" dependencies: - "@typescript-eslint/scope-manager": "npm:8.48.1" - "@typescript-eslint/types": "npm:8.48.1" - "@typescript-eslint/typescript-estree": "npm:8.48.1" - "@typescript-eslint/visitor-keys": "npm:8.48.1" + "@typescript-eslint/scope-manager": "npm:8.51.0" + "@typescript-eslint/types": "npm:8.51.0" + "@typescript-eslint/typescript-estree": "npm:8.51.0" + "@typescript-eslint/visitor-keys": "npm:8.51.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10/d8409c9ede4b1cd2ad0e10e94bb00c54f79352f7d54c97bf24419cb983c19b9f6097e6c31b217ce7ec5cfc9a48117e732d9f88ce0cb8c0ccf7fc3faecdf854a3 + checksum: 10/ad2cb5d9cea5749fca712699ef971d68506f6170766d465ecc5864b5b5a15401c85d4042231df9edcc200f14b2579e6d4b2fbe66db824d925193004cde02ba79 languageName: node linkType: hard -"@typescript-eslint/project-service@npm:8.48.1": - version: 8.48.1 - resolution: "@typescript-eslint/project-service@npm:8.48.1" +"@typescript-eslint/project-service@npm:8.51.0": + version: 8.51.0 + resolution: "@typescript-eslint/project-service@npm:8.51.0" dependencies: - "@typescript-eslint/tsconfig-utils": "npm:^8.48.1" - "@typescript-eslint/types": "npm:^8.48.1" + "@typescript-eslint/tsconfig-utils": "npm:^8.51.0" + "@typescript-eslint/types": "npm:^8.51.0" debug: "npm:^4.3.4" peerDependencies: typescript: ">=4.8.4 <6.0.0" - checksum: 10/66ecc7ef9572748860517cde7fbfc335d05ca8c99dcf13ac6d728ac93388d90cdc3ebe2ff33a85c0a03487b3c1c4e36c6e3fe413ee16d8fb003621cb58e65e52 + checksum: 10/f8b38bf1c92c3a5d33ae0304fc920b8ac20b24c308c056ea70fb5b257f9447be62fe54e9595260fd8611b36c8a66229e4ca7ef859edad42e1321434986132aac languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.48.1": - version: 8.48.1 - resolution: "@typescript-eslint/scope-manager@npm:8.48.1" +"@typescript-eslint/scope-manager@npm:8.51.0": + version: 8.51.0 + resolution: "@typescript-eslint/scope-manager@npm:8.51.0" dependencies: - "@typescript-eslint/types": "npm:8.48.1" - "@typescript-eslint/visitor-keys": "npm:8.48.1" - checksum: 10/5040246220f9872ec47633297b7896ed5587af3163e06ddcb7ca0dcf1e171f359bd4f1c82f794a6adfecbccfb5ef437d51b522321034603c93ba1993c407bdf2 + "@typescript-eslint/types": "npm:8.51.0" + "@typescript-eslint/visitor-keys": "npm:8.51.0" + checksum: 10/3d873589cd5b39f2bdc1e5b4f0052095f2cc5b2d59115ceea99533346839539ad7123ab0ba43ff4dd28c6afd4e8ae77798beb3618c93f24010104d38dedad6ad languageName: node linkType: hard -"@typescript-eslint/tsconfig-utils@npm:8.48.1, @typescript-eslint/tsconfig-utils@npm:^8.48.1": - version: 8.48.1 - resolution: "@typescript-eslint/tsconfig-utils@npm:8.48.1" +"@typescript-eslint/tsconfig-utils@npm:8.51.0, @typescript-eslint/tsconfig-utils@npm:^8.51.0": + version: 8.51.0 + resolution: "@typescript-eslint/tsconfig-utils@npm:8.51.0" peerDependencies: typescript: ">=4.8.4 <6.0.0" - checksum: 10/830bcd0e7628441f91899e8e24aaed66d32a239babcc205aba1d08c08ff5a636d8c04f96d9873578df59d7468fc4c5df032667764b3b2ee0a733af36fca21c4a + checksum: 10/1a423e2b8bb6900e86f54ef78e967f17e6f51a528c64d78460338b916fda4e44bb8c73a7aba6b129295c59c3f364edbf27b34580f525df700674afbf0fc034df languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.48.1": - version: 8.48.1 - resolution: "@typescript-eslint/type-utils@npm:8.48.1" +"@typescript-eslint/type-utils@npm:8.51.0": + version: 8.51.0 + resolution: "@typescript-eslint/type-utils@npm:8.51.0" dependencies: - "@typescript-eslint/types": "npm:8.48.1" - "@typescript-eslint/typescript-estree": "npm:8.48.1" - "@typescript-eslint/utils": "npm:8.48.1" + "@typescript-eslint/types": "npm:8.51.0" + "@typescript-eslint/typescript-estree": "npm:8.51.0" + "@typescript-eslint/utils": "npm:8.51.0" debug: "npm:^4.3.4" - ts-api-utils: "npm:^2.1.0" + ts-api-utils: "npm:^2.2.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10/6cf9370ac5437e2d64c71964646aed9e6c1ea3c7bb473258b50ae422106461d290f4215b9435b892a2dd563e3c31feb3169532375513b56b7e48f4a425283091 + checksum: 10/1dd5b72e4c7d6ffeafff1c24f745c335dc4073ec2a5c7e40f1a05be3be91097246c96be8d927389d8e4ccfa15db946a45ac85dbfd0c788d6cf003dced1830c7d languageName: node linkType: hard -"@typescript-eslint/types@npm:8.48.1, @typescript-eslint/types@npm:^8.47.0, @typescript-eslint/types@npm:^8.48.1": - version: 8.48.1 - resolution: "@typescript-eslint/types@npm:8.48.1" - checksum: 10/1aa1e3f25b429bcebd9eb45b5252d950f1b24dbc6014a47dff8d00547e2e1ac47f351846fb996b6ebd49da37a85394051d36191cbbbf2c431b8db9d95afd198d +"@typescript-eslint/types@npm:8.51.0, @typescript-eslint/types@npm:^8.47.0, @typescript-eslint/types@npm:^8.51.0": + version: 8.51.0 + resolution: "@typescript-eslint/types@npm:8.51.0" + checksum: 10/34c4b602d2f07edb72879e8af5359b0d54d3787030ae0a8325691972b07f2c6429bef9586938d18ff7df03a2be858064c7890a42136514ff0f2b7847c1432193 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.48.1": - version: 8.48.1 - resolution: "@typescript-eslint/typescript-estree@npm:8.48.1" +"@typescript-eslint/typescript-estree@npm:8.51.0": + version: 8.51.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.51.0" dependencies: - "@typescript-eslint/project-service": "npm:8.48.1" - "@typescript-eslint/tsconfig-utils": "npm:8.48.1" - "@typescript-eslint/types": "npm:8.48.1" - "@typescript-eslint/visitor-keys": "npm:8.48.1" + "@typescript-eslint/project-service": "npm:8.51.0" + "@typescript-eslint/tsconfig-utils": "npm:8.51.0" + "@typescript-eslint/types": "npm:8.51.0" + "@typescript-eslint/visitor-keys": "npm:8.51.0" debug: "npm:^4.3.4" minimatch: "npm:^9.0.4" semver: "npm:^7.6.0" tinyglobby: "npm:^0.2.15" - ts-api-utils: "npm:^2.1.0" + ts-api-utils: "npm:^2.2.0" peerDependencies: typescript: ">=4.8.4 <6.0.0" - checksum: 10/485aa44d22453396dbe61c560c6f583bf876f971d9e70773093cd729279f88184cf5793bf706033bbd8465cce6f9d045b63574727d58d5996519c29e1adbbfe5 + checksum: 10/4f9f82b18b9a62e3ffe1253e7914a396ec1c550fec36f862eff9d3d49be4bf01349eb2540be68ecc35b245aab7f72843d2b5cd1e73c8e820db5cf6f3c6542916 languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.48.1, @typescript-eslint/utils@npm:^8.0.0": - version: 8.48.1 - resolution: "@typescript-eslint/utils@npm:8.48.1" +"@typescript-eslint/utils@npm:8.51.0, @typescript-eslint/utils@npm:^8.0.0": + version: 8.51.0 + resolution: "@typescript-eslint/utils@npm:8.51.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.7.0" - "@typescript-eslint/scope-manager": "npm:8.48.1" - "@typescript-eslint/types": "npm:8.48.1" - "@typescript-eslint/typescript-estree": "npm:8.48.1" + "@typescript-eslint/scope-manager": "npm:8.51.0" + "@typescript-eslint/types": "npm:8.51.0" + "@typescript-eslint/typescript-estree": "npm:8.51.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10/34afe5cf78020b682473e6529d6268eb8015bdb020a3c5303c4abb230d4d7c39e6fc8b9df58d1f0f35a1ceeb5d6182e71e42fe7a28dde8ffc31f8560f2dacc7c + checksum: 10/e5ced67d08129e62fd6866a72b94fa685cd33aa7f5d1fc3bb9a34187d0fc0b469062ec8dfd44cd8c06494af070a050a314a6db672dda392fbc907b64b1ecc57f languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.48.1": - version: 8.48.1 - resolution: "@typescript-eslint/visitor-keys@npm:8.48.1" +"@typescript-eslint/visitor-keys@npm:8.51.0": + version: 8.51.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.51.0" dependencies: - "@typescript-eslint/types": "npm:8.48.1" + "@typescript-eslint/types": "npm:8.51.0" eslint-visitor-keys: "npm:^4.2.1" - checksum: 10/63aa165c57e6b38700adf84da2e90537577cdeb69d05031e3e70785fa412d96d539dc4c1696a0b7bc93284613f8b92fb1bb40f6068bb75347a942120b246ac60 + checksum: 10/922fb3d2e59f6e8a9583a1bc7b13e66d4ec7bd7df3256602810465a7017549b890cd1a7897efc71ed64cc287c718be5dddbc8071b74e8ee41fe441f6d5251d3d languageName: node linkType: hard @@ -5376,13 +5375,6 @@ __metadata: languageName: node linkType: hard -"graphemer@npm:^1.4.0": - version: 1.4.0 - resolution: "graphemer@npm:1.4.0" - checksum: 10/6dd60dba97007b21e3a829fab3f771803cc1292977fe610e240ea72afd67e5690ac9eeaafc4a99710e78962e5936ab5a460787c2a1180f1cb0ccfac37d29f897 - languageName: node - linkType: hard - "graphmatch@npm:^1.1.0": version: 1.1.0 resolution: "graphmatch@npm:1.1.0" @@ -8365,10 +8357,10 @@ __metadata: "@prettier/parse-srcset": "npm:3.1.0" "@stylistic/eslint-plugin": "npm:5.6.1" "@types/jsesc": "npm:3.0.3" - "@typescript-eslint/eslint-plugin": "npm:8.48.1" - "@typescript-eslint/parser": "npm:8.48.1" - "@typescript-eslint/typescript-estree": "npm:8.48.1" - "@typescript-eslint/visitor-keys": "npm:8.48.1" + "@typescript-eslint/eslint-plugin": "npm:8.51.0" + "@typescript-eslint/parser": "npm:8.51.0" + "@typescript-eslint/typescript-estree": "npm:8.51.0" + "@typescript-eslint/visitor-keys": "npm:8.51.0" acorn: "npm:8.15.0" acorn-jsx: "npm:5.3.2" angular-estree-parser: "npm:14.2.1" @@ -9636,12 +9628,12 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^2.1.0": - version: 2.1.0 - resolution: "ts-api-utils@npm:2.1.0" +"ts-api-utils@npm:^2.2.0": + version: 2.3.0 + resolution: "ts-api-utils@npm:2.3.0" peerDependencies: typescript: ">=4.8.4" - checksum: 10/02e55b49d9617c6eebf8aadfa08d3ca03ca0cd2f0586ad34117fdfc7aa3cd25d95051843fde9df86665ad907f99baed179e7a117b11021417f379e4d2614eacd + checksum: 10/33472e0aa22222947512bcbdad37f078a6a4fb8f79e5ce271267f3520e7303ab204067cc7eaa508b2e4f91539b0bb9ecb9254f5f62397d27cf52dc5e73540a8f languageName: node linkType: hard