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