mirror of
https://github.com/alex8088/electron-vite.git
synced 2025-11-10 06:24:33 +08:00
chore: update eslint config
This commit is contained in:
parent
cbb039c3e9
commit
0badfc493f
@ -29,6 +29,7 @@ export default tseslint.config(
|
|||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
'prettier/prettier': 'warn',
|
'prettier/prettier': 'warn',
|
||||||
|
'no-empty': ['warn', { allowEmptyCatch: true }],
|
||||||
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],
|
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],
|
||||||
'@typescript-eslint/explicit-function-return-type': [
|
'@typescript-eslint/explicit-function-return-type': [
|
||||||
'error',
|
'error',
|
||||||
@ -52,6 +53,10 @@ export default tseslint.config(
|
|||||||
allowTaggedTemplates: true,
|
allowTaggedTemplates: true,
|
||||||
allowTernary: true
|
allowTernary: true
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
'@typescript-eslint/consistent-type-imports': [
|
||||||
|
'error',
|
||||||
|
{ prefer: 'type-imports', disallowTypeAnnotations: false }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
2
node.d.ts
vendored
2
node.d.ts
vendored
@ -1,6 +1,6 @@
|
|||||||
// node worker
|
// node worker
|
||||||
declare module '*?nodeWorker' {
|
declare module '*?nodeWorker' {
|
||||||
import { Worker, WorkerOptions } from 'node:worker_threads'
|
import type { Worker, WorkerOptions } from 'node:worker_threads'
|
||||||
export default function (options: WorkerOptions): Worker
|
export default function (options: WorkerOptions): Worker
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -417,7 +417,6 @@ async function loadConfigFormBundledFile(
|
|||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
fs.unlinkSync(fileNameTmp)
|
fs.unlinkSync(fileNameTmp)
|
||||||
// eslint-disable-next-line no-empty
|
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user