Skip to content

Commit d1891fd

Browse files
JoshuaKGoldbergantfu
andauthoredAug 5, 2024··
chore: bump typescript-eslint to v8 (#17624)
Co-authored-by: Anthony Fu <github@antfu.me>
1 parent 81327eb commit d1891fd

File tree

8 files changed

+84
-78
lines changed

8 files changed

+84
-78
lines changed
 

‎eslint.config.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default tseslint.config(
9797
],
9898

9999
'@typescript-eslint/ban-ts-comment': 'error',
100-
'@typescript-eslint/ban-types': 'off', // TODO: we should turn this on in a new PR
100+
'@typescript-eslint/no-unsafe-function-type': 'off', // TODO: we should turn this on in a new PR
101101
'@typescript-eslint/explicit-module-boundary-types': [
102102
'error',
103103
{ allowArgumentsExplicitlyTypedAsAny: true },
@@ -106,18 +106,23 @@ export default tseslint.config(
106106
'error',
107107
{ allow: ['arrowFunctions'] },
108108
],
109+
'@typescript-eslint/no-empty-object-type': [
110+
'error',
111+
{ allowInterfaces: 'with-single-extends' }, // maybe we should turn this on in a new PR
112+
],
109113
'@typescript-eslint/no-empty-interface': 'off',
110114
'@typescript-eslint/no-explicit-any': 'off', // maybe we should turn this on in a new PR
111115
'no-extra-semi': 'off',
112116
'@typescript-eslint/no-extra-semi': 'off', // conflicts with prettier
113117
'@typescript-eslint/no-inferrable-types': 'off',
118+
'@typescript-eslint/no-unused-expressions': 'off', // maybe we should turn this on in a new PR
114119
'@typescript-eslint/no-unused-vars': 'off', // maybe we should turn this on in a new PR
115-
'@typescript-eslint/no-var-requires': 'off',
120+
'@typescript-eslint/no-require-imports': 'off',
116121
'@typescript-eslint/consistent-type-imports': [
117122
'error',
118123
{ prefer: 'type-imports', disallowTypeAnnotations: false },
119124
],
120-
// disable rules set in @typescript-eslint/stylistic v6 that wasn't set in @typescript-eslint/recommended v5 and which conflict with current code
125+
// disable rules set in @typescript-eslint/stylistic which conflict with current code
121126
// maybe we should turn them on in a new PR
122127
'@typescript-eslint/array-type': 'off',
123128
'@typescript-eslint/ban-tslint-comment': 'off',

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"tslib": "^2.6.3",
7575
"tsx": "^4.16.2",
7676
"typescript": "^5.5.3",
77-
"typescript-eslint": "^7.18.0",
77+
"typescript-eslint": "^8.0.0",
7878
"vite": "workspace:*",
7979
"vitest": "^2.0.4"
8080
},

‎packages/create-vite/template-react-ts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"eslint-plugin-react-refresh": "^0.4.7",
2424
"globals": "^15.6.0",
2525
"typescript": "^5.5.3",
26-
"typescript-eslint": "^7.18.0",
26+
"typescript-eslint": "^8.0.0",
2727
"vite": "^5.3.5"
2828
},
2929
"overrides": {

‎packages/vite/src/node/plugins/importAnalysisBuild.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function detectScriptRel() {
7777
declare const scriptRel: string
7878
declare const seen: Record<string, boolean>
7979
function preload(
80-
baseModule: () => Promise<{}>,
80+
baseModule: () => Promise<unknown>,
8181
deps?: string[],
8282
importerUrl?: string,
8383
) {

‎packages/vite/src/types/shims.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ declare module 'postcss-import' {
3434

3535
// LESS' types somewhat references this which doesn't make sense in Node,
3636
// so we have to shim it
37+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
3738
declare interface HTMLLinkElement {}
3839

3940
// eslint-disable-next-line no-var

‎packages/vite/src/types/ws.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ declare class WebSocket extends EventEmitter {
300300
}
301301

302302
declare const WebSocketAlias: typeof WebSocket
303-
interface WebSocketAlias extends WebSocket {} // tslint:disable-line no-empty-interface
303+
interface WebSocketAlias extends WebSocket {}
304304

305305
declare namespace WebSocket {
306306
/**
@@ -550,9 +550,9 @@ declare namespace WebSocket {
550550
}
551551

552552
const WebSocketServer: typeof Server
553-
interface WebSocketServer extends Server {} // tslint:disable-line no-empty-interface
553+
interface WebSocketServer extends Server {}
554554
const WebSocket: typeof WebSocketAlias
555-
interface WebSocket extends WebSocketAlias {} // tslint:disable-line no-empty-interface
555+
interface WebSocket extends WebSocketAlias {}
556556

557557
// WebSocket stream
558558
function createWebSocketStream(

‎pnpm-lock.yaml

+66-68
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎scripts/releaseUtils.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ export function run<EO extends ExecaOptions>(
88
bin: string,
99
args: string[],
1010
opts?: EO,
11-
): ResultPromise<EO & (keyof EO extends 'stdio' ? {} : { stdio: 'inherit' })> {
11+
): ResultPromise<
12+
EO & (keyof EO extends 'stdio' ? object : { stdio: 'inherit' })
13+
> {
1214
return execa(bin, args, { stdio: 'inherit', ...opts }) as any
1315
}
1416

0 commit comments

Comments
 (0)
Please sign in to comment.