From 514fda334a152d1c0fb2d4cfb0a8317eadf7ad1f Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 6 Jul 2024 12:43:00 -0400 Subject: [PATCH 1/3] chore: bump typescript-eslint to v8 --- eslint.config.js | 11 +- package.json | 2 +- .../template-react-ts/package.json | 4 +- .../src/node/plugins/importAnalysisBuild.ts | 2 +- packages/vite/src/types/shims.d.ts | 1 + packages/vite/src/types/ws.d.ts | 6 +- pnpm-lock.yaml | 134 +++++++++--------- scripts/releaseUtils.ts | 4 +- 8 files changed, 85 insertions(+), 79 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 0b103b51776cef..ff52e8493ee45b 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -86,7 +86,7 @@ export default tseslint.config( ], '@typescript-eslint/ban-ts-comment': 'error', - '@typescript-eslint/ban-types': 'off', // TODO: we should turn this on in a new PR + '@typescript-eslint/no-unsafe-function-type': 'off', // TODO: we should turn this on in a new PR '@typescript-eslint/explicit-module-boundary-types': [ 'error', { allowArgumentsExplicitlyTypedAsAny: true }, @@ -95,24 +95,29 @@ export default tseslint.config( 'error', { allow: ['arrowFunctions'] }, ], + '@typescript-eslint/no-empty-object-type': [ + 'error', + { allowInterfaces: 'with-single-extends' }, // maybe we should turn this on in a new PR + ], '@typescript-eslint/no-empty-interface': 'off', '@typescript-eslint/no-explicit-any': 'off', // maybe we should turn this on in a new PR 'no-extra-semi': 'off', '@typescript-eslint/no-extra-semi': 'off', // conflicts with prettier '@typescript-eslint/no-inferrable-types': 'off', '@typescript-eslint/no-unused-vars': 'off', // maybe we should turn this on in a new PR - '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-require-imports': 'off', '@typescript-eslint/consistent-type-imports': [ 'error', { prefer: 'type-imports', disallowTypeAnnotations: false }, ], - // disable rules set in @typescript-eslint/stylistic v6 that wasn't set in @typescript-eslint/recommended v5 and which conflict with current code + // disable rules set in @typescript-eslint/stylistic which conflict with current code // maybe we should turn them on in a new PR '@typescript-eslint/array-type': 'off', '@typescript-eslint/ban-tslint-comment': 'off', '@typescript-eslint/consistent-generic-constructors': 'off', '@typescript-eslint/consistent-indexed-object-style': 'off', '@typescript-eslint/consistent-type-definitions': 'off', + '@typescript-eslint/no-unused-expressions': 'off', '@typescript-eslint/prefer-for-of': 'off', '@typescript-eslint/prefer-function-type': 'off', diff --git a/package.json b/package.json index 1a3b2566830736..398803f1ed6910 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "tslib": "^2.6.3", "tsx": "^4.16.0", "typescript": "^5.2.2", - "typescript-eslint": "^7.15.0", + "typescript-eslint": "8.0.0-alpha.39", "vite": "workspace:*", "vitest": "^1.6.0" }, diff --git a/packages/create-vite/template-react-ts/package.json b/packages/create-vite/template-react-ts/package.json index f5cf282df8a623..9a443e2ac3919c 100644 --- a/packages/create-vite/template-react-ts/package.json +++ b/packages/create-vite/template-react-ts/package.json @@ -16,8 +16,8 @@ "devDependencies": { "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "@typescript-eslint/eslint-plugin": "^7.15.0", - "@typescript-eslint/parser": "^7.15.0", + "@typescript-eslint/eslint-plugin": "8.0.0-alpha.39", + "@typescript-eslint/parser": "8.0.0-alpha.39", "@vitejs/plugin-react": "^4.3.1", "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.2", diff --git a/packages/vite/src/node/plugins/importAnalysisBuild.ts b/packages/vite/src/node/plugins/importAnalysisBuild.ts index 9af262a70544a9..24d0c11846b40b 100644 --- a/packages/vite/src/node/plugins/importAnalysisBuild.ts +++ b/packages/vite/src/node/plugins/importAnalysisBuild.ts @@ -75,7 +75,7 @@ function detectScriptRel() { declare const scriptRel: string declare const seen: Record function preload( - baseModule: () => Promise<{}>, + baseModule: () => Promise, deps?: string[], importerUrl?: string, ) { diff --git a/packages/vite/src/types/shims.d.ts b/packages/vite/src/types/shims.d.ts index 9f637b00e2b292..3a8c070e3ee5f0 100644 --- a/packages/vite/src/types/shims.d.ts +++ b/packages/vite/src/types/shims.d.ts @@ -34,6 +34,7 @@ declare module 'postcss-import' { // LESS' types somewhat references this which doesn't make sense in Node, // so we have to shim it +// eslint-disable-next-line @typescript-eslint/no-empty-object-type declare interface HTMLLinkElement {} // eslint-disable-next-line no-var diff --git a/packages/vite/src/types/ws.d.ts b/packages/vite/src/types/ws.d.ts index 99932f49b19906..f521365871758b 100644 --- a/packages/vite/src/types/ws.d.ts +++ b/packages/vite/src/types/ws.d.ts @@ -300,7 +300,7 @@ declare class WebSocket extends EventEmitter { } declare const WebSocketAlias: typeof WebSocket -interface WebSocketAlias extends WebSocket {} // tslint:disable-line no-empty-interface +interface WebSocketAlias extends WebSocket {} declare namespace WebSocket { /** @@ -550,9 +550,9 @@ declare namespace WebSocket { } const WebSocketServer: typeof Server - interface WebSocketServer extends Server {} // tslint:disable-line no-empty-interface + interface WebSocketServer extends Server {} const WebSocket: typeof WebSocketAlias - interface WebSocket extends WebSocketAlias {} // tslint:disable-line no-empty-interface + interface WebSocket extends WebSocketAlias {} // WebSocket stream function createWebSocketStream( diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 80823d55fcf871..1ccd1b42892469 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -134,8 +134,8 @@ importers: specifier: ^5.2.2 version: 5.2.2 typescript-eslint: - specifier: ^7.15.0 - version: 7.15.0(eslint@9.6.0)(typescript@5.2.2) + specifier: 8.0.0-alpha.39 + version: 8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2) vite: specifier: workspace:* version: link:packages/vite @@ -3201,22 +3201,22 @@ packages: '@types/ws@8.5.10': resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} - '@typescript-eslint/eslint-plugin@7.15.0': - resolution: {integrity: sha512-uiNHpyjZtFrLwLDpHnzaDlP3Tt6sGMqTCiqmxaN4n4RP0EfYZDODJyddiFDF44Hjwxr5xAcaYxVKm9QKQFJFLA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/eslint-plugin@8.0.0-alpha.39': + resolution: {integrity: sha512-ILv1vDA8M9ah1vzYpnOs4UOLRdB63Ki/rsxedVikjMLq68hFfpsDR25bdMZ4RyUkzLJwOhcg3Jujm/C1nupXKA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/parser@7.15.0': - resolution: {integrity: sha512-k9fYuQNnypLFcqORNClRykkGOMOj+pV6V91R4GO/l1FDGwpqmSwoOQrOHo3cGaH63e+D3ZiCAOsuS/D2c99j/A==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/parser@8.0.0-alpha.39': + resolution: {integrity: sha512-5k+pwV91plJojHgZkWlq4/TQdOrnEaeSvt48V0m8iEwdMJqX/63BXYxy8BUOSghWcjp05s73vy9HJjovAKmHkQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -3226,15 +3226,14 @@ packages: resolution: {integrity: sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/scope-manager@7.15.0': - resolution: {integrity: sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.0.0-alpha.39': + resolution: {integrity: sha512-HCBlKQROY+JIgWolucdFMj1W3VUnnIQTdxAhxJTAj3ix2nASmvKIFgrdo5KQMrXxQj6tC4l3zva10L+s0dUIIw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@7.15.0': - resolution: {integrity: sha512-SkgriaeV6PDvpA6253PDVep0qCqgbO1IOBiycjnXsszNTVQe5flN5wR5jiczoEoDEnAqYFSFFc9al9BSGVltkg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/type-utils@8.0.0-alpha.39': + resolution: {integrity: sha512-alO13fRU6yVeJbwl9ESI3AYhq5dQdz3Dpd0I5B4uezs2lvgYp44dZsj5hWyPz/kL7JFEsjbn+4b/CZA0OQJzjA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: @@ -3244,9 +3243,9 @@ packages: resolution: {integrity: sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/types@7.15.0': - resolution: {integrity: sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@8.0.0-alpha.39': + resolution: {integrity: sha512-yINN7j0/+S1VGSp0IgH52oQvUx49vkOug6xbrDA/9o+U55yCAQKSvYWvzYjNa+SZE3hXI0zwvYtMVsIAAMmKIQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@7.13.1': resolution: {integrity: sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==} @@ -3257,9 +3256,9 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@7.15.0': - resolution: {integrity: sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/typescript-estree@8.0.0-alpha.39': + resolution: {integrity: sha512-S8gREuP8r8PCxGegeojeXntx0P50ul9YH7c7JYpbLIIsEPNr5f7UHlm+I1NUbL04CBin4kvZ60TG4eWr/KKN9A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -3272,19 +3271,19 @@ packages: peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/utils@7.15.0': - resolution: {integrity: sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/utils@8.0.0-alpha.39': + resolution: {integrity: sha512-Nr2PrlfNhrNQTlFHlD7XJdTGw/Vt8qY44irk6bfjn9LxGdSG5e4c1R2UN6kvGMhhx20DBPbM7q3Z3r+huzmL1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 '@typescript-eslint/visitor-keys@7.13.1': resolution: {integrity: sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/visitor-keys@7.15.0': - resolution: {integrity: sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@8.0.0-alpha.39': + resolution: {integrity: sha512-DVJ0UdhucZy+/1GlIy7FX2+CFhCeNAi4VwaEAe7u2UDenQr9/kGqvzx00UlpWibmEVDw4KsPOI7Aqa1+2Vqfmw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript/vfs@1.5.0': resolution: {integrity: sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg==} @@ -6504,11 +6503,10 @@ packages: type@2.7.2: resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==} - typescript-eslint@7.15.0: - resolution: {integrity: sha512-Ta40FhMXBCwHura4X4fncaCVkVcnJ9jnOq5+Lp4lN8F4DzHZtOwZdRvVBiNUGznUDHPwdGnrnwxmUOU2fFQqFA==} - engines: {node: ^18.18.0 || >=20.0.0} + typescript-eslint@8.0.0-alpha.39: + resolution: {integrity: sha512-bsuR1BVJfHr7sBh7Cca962VPIcP+5UWaIa/+6PpnFZ+qtASjGTxKWIF5dG2o73BX9NsyqQfvRWujb3M9CIoRXA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: @@ -8466,14 +8464,14 @@ snapshots: dependencies: '@types/node': 20.14.9 - '@typescript-eslint/eslint-plugin@7.15.0(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.2.2))(eslint@9.6.0)(typescript@5.2.2)': + '@typescript-eslint/eslint-plugin@8.0.0-alpha.39(@typescript-eslint/parser@8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2))(eslint@9.6.0)(typescript@5.2.2)': dependencies: '@eslint-community/regexpp': 4.10.1 - '@typescript-eslint/parser': 7.15.0(eslint@9.6.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 7.15.0 - '@typescript-eslint/type-utils': 7.15.0(eslint@9.6.0)(typescript@5.2.2) - '@typescript-eslint/utils': 7.15.0(eslint@9.6.0)(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 7.15.0 + '@typescript-eslint/parser': 8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 8.0.0-alpha.39 + '@typescript-eslint/type-utils': 8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2) + '@typescript-eslint/utils': 8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 8.0.0-alpha.39 eslint: 9.6.0 graphemer: 1.4.0 ignore: 5.3.1 @@ -8484,12 +8482,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.2.2)': + '@typescript-eslint/parser@8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2)': dependencies: - '@typescript-eslint/scope-manager': 7.15.0 - '@typescript-eslint/types': 7.15.0 - '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 7.15.0 + '@typescript-eslint/scope-manager': 8.0.0-alpha.39 + '@typescript-eslint/types': 8.0.0-alpha.39 + '@typescript-eslint/typescript-estree': 8.0.0-alpha.39(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 8.0.0-alpha.39 debug: 4.3.5 eslint: 9.6.0 optionalDependencies: @@ -8502,26 +8500,26 @@ snapshots: '@typescript-eslint/types': 7.13.1 '@typescript-eslint/visitor-keys': 7.13.1 - '@typescript-eslint/scope-manager@7.15.0': + '@typescript-eslint/scope-manager@8.0.0-alpha.39': dependencies: - '@typescript-eslint/types': 7.15.0 - '@typescript-eslint/visitor-keys': 7.15.0 + '@typescript-eslint/types': 8.0.0-alpha.39 + '@typescript-eslint/visitor-keys': 8.0.0-alpha.39 - '@typescript-eslint/type-utils@7.15.0(eslint@9.6.0)(typescript@5.2.2)': + '@typescript-eslint/type-utils@8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2)': dependencies: - '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.2.2) - '@typescript-eslint/utils': 7.15.0(eslint@9.6.0)(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 8.0.0-alpha.39(typescript@5.2.2) + '@typescript-eslint/utils': 8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2) debug: 4.3.5 - eslint: 9.6.0 ts-api-utils: 1.3.0(typescript@5.2.2) optionalDependencies: typescript: 5.2.2 transitivePeerDependencies: + - eslint - supports-color '@typescript-eslint/types@7.13.1': {} - '@typescript-eslint/types@7.15.0': {} + '@typescript-eslint/types@8.0.0-alpha.39': {} '@typescript-eslint/typescript-estree@7.13.1(typescript@5.2.2)': dependencies: @@ -8538,10 +8536,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@7.15.0(typescript@5.2.2)': + '@typescript-eslint/typescript-estree@8.0.0-alpha.39(typescript@5.2.2)': dependencies: - '@typescript-eslint/types': 7.15.0 - '@typescript-eslint/visitor-keys': 7.15.0 + '@typescript-eslint/types': 8.0.0-alpha.39 + '@typescript-eslint/visitor-keys': 8.0.0-alpha.39 debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 @@ -8564,12 +8562,12 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@7.15.0(eslint@9.6.0)(typescript@5.2.2)': + '@typescript-eslint/utils@8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) - '@typescript-eslint/scope-manager': 7.15.0 - '@typescript-eslint/types': 7.15.0 - '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.2.2) + '@typescript-eslint/scope-manager': 8.0.0-alpha.39 + '@typescript-eslint/types': 8.0.0-alpha.39 + '@typescript-eslint/typescript-estree': 8.0.0-alpha.39(typescript@5.2.2) eslint: 9.6.0 transitivePeerDependencies: - supports-color @@ -8580,9 +8578,9 @@ snapshots: '@typescript-eslint/types': 7.13.1 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@7.15.0': + '@typescript-eslint/visitor-keys@8.0.0-alpha.39': dependencies: - '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/types': 8.0.0-alpha.39 eslint-visitor-keys: 3.4.3 '@typescript/vfs@1.5.0': @@ -12094,15 +12092,15 @@ snapshots: type@2.7.2: {} - typescript-eslint@7.15.0(eslint@9.6.0)(typescript@5.2.2): + typescript-eslint@8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2): dependencies: - '@typescript-eslint/eslint-plugin': 7.15.0(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.2.2))(eslint@9.6.0)(typescript@5.2.2) - '@typescript-eslint/parser': 7.15.0(eslint@9.6.0)(typescript@5.2.2) - '@typescript-eslint/utils': 7.15.0(eslint@9.6.0)(typescript@5.2.2) - eslint: 9.6.0 + '@typescript-eslint/eslint-plugin': 8.0.0-alpha.39(@typescript-eslint/parser@8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2))(eslint@9.6.0)(typescript@5.2.2) + '@typescript-eslint/parser': 8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2) + '@typescript-eslint/utils': 8.0.0-alpha.39(eslint@9.6.0)(typescript@5.2.2) optionalDependencies: typescript: 5.2.2 transitivePeerDependencies: + - eslint - supports-color typescript@5.2.2: {} diff --git a/scripts/releaseUtils.ts b/scripts/releaseUtils.ts index fbbe7c5b780f4f..14e64d2cbb49e9 100644 --- a/scripts/releaseUtils.ts +++ b/scripts/releaseUtils.ts @@ -9,7 +9,9 @@ export function run( bin: string, args: string[], opts?: EO, -): ResultPromise { +): ResultPromise< + EO & (keyof EO extends 'stdio' ? object : { stdio: 'inherit' }) +> { return execa(bin, args, { stdio: 'inherit', ...opts }) as any } From 43e8bf2b115d12ed17c19902ff737aa46ee85f48 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 6 Jul 2024 12:46:53 -0400 Subject: [PATCH 2/3] nit: no-unused-expressions is recommended, not stylistic --- eslint.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index ff52e8493ee45b..4b3927225ab2be 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -104,6 +104,7 @@ export default tseslint.config( 'no-extra-semi': 'off', '@typescript-eslint/no-extra-semi': 'off', // conflicts with prettier '@typescript-eslint/no-inferrable-types': 'off', + '@typescript-eslint/no-unused-expressions': 'off', // maybe we should turn this on in a new PR '@typescript-eslint/no-unused-vars': 'off', // maybe we should turn this on in a new PR '@typescript-eslint/no-require-imports': 'off', '@typescript-eslint/consistent-type-imports': [ @@ -117,7 +118,6 @@ export default tseslint.config( '@typescript-eslint/consistent-generic-constructors': 'off', '@typescript-eslint/consistent-indexed-object-style': 'off', '@typescript-eslint/consistent-type-definitions': 'off', - '@typescript-eslint/no-unused-expressions': 'off', '@typescript-eslint/prefer-for-of': 'off', '@typescript-eslint/prefer-function-type': 'off', From 5959190a2d01681a78cd89572f0bfd47fbee0c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Sun, 4 Aug 2024 18:01:51 -0400 Subject: [PATCH 3/3] Update packages/create-vite/template-react-ts/package.json Co-authored-by: Anthony Fu --- packages/create-vite/template-react-ts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-vite/template-react-ts/package.json b/packages/create-vite/template-react-ts/package.json index d8f88e9aaa0a67..92347d28d145a3 100644 --- a/packages/create-vite/template-react-ts/package.json +++ b/packages/create-vite/template-react-ts/package.json @@ -23,7 +23,7 @@ "eslint-plugin-react-refresh": "^0.4.7", "globals": "^15.6.0", "typescript": "^5.5.3", - "typescript-eslint": "8.0.0", + "typescript-eslint": "^8.0.0", "vite": "^5.3.5" }, "overrides": {