Skip to content

Commit

Permalink
chore: bump typescript-eslint to v8 (#17624)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <github@antfu.me>
  • Loading branch information
JoshuaKGoldberg and antfu committed Aug 5, 2024
1 parent 81327eb commit d1891fd
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 78 deletions.
11 changes: 8 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,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 },
Expand All @@ -106,18 +106,23 @@ 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-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-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',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"tslib": "^2.6.3",
"tsx": "^4.16.2",
"typescript": "^5.5.3",
"typescript-eslint": "^7.18.0",
"typescript-eslint": "^8.0.0",
"vite": "workspace:*",
"vitest": "^2.0.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-vite/template-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"eslint-plugin-react-refresh": "^0.4.7",
"globals": "^15.6.0",
"typescript": "^5.5.3",
"typescript-eslint": "^7.18.0",
"typescript-eslint": "^8.0.0",
"vite": "^5.3.5"
},
"overrides": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/importAnalysisBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function detectScriptRel() {
declare const scriptRel: string
declare const seen: Record<string, boolean>
function preload(
baseModule: () => Promise<{}>,
baseModule: () => Promise<unknown>,
deps?: string[],
importerUrl?: string,
) {
Expand Down
1 change: 1 addition & 0 deletions packages/vite/src/types/shims.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions packages/vite/src/types/ws.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand Down Expand Up @@ -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(
Expand Down
134 changes: 66 additions & 68 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion scripts/releaseUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export function run<EO extends ExecaOptions>(
bin: string,
args: string[],
opts?: EO,
): ResultPromise<EO & (keyof EO extends 'stdio' ? {} : { stdio: 'inherit' })> {
): ResultPromise<
EO & (keyof EO extends 'stdio' ? object : { stdio: 'inherit' })
> {
return execa(bin, args, { stdio: 'inherit', ...opts }) as any
}

Expand Down

0 comments on commit d1891fd

Please sign in to comment.