chore: update eslint config

This commit is contained in:
alex8088 2025-10-17 21:28:47 +08:00
parent cbb039c3e9
commit 0badfc493f
3 changed files with 6 additions and 2 deletions

View File

@ -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
View File

@ -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
}

View File

@ -417,7 +417,6 @@ async function loadConfigFormBundledFile(
} finally {
try {
fs.unlinkSync(fileNameTmp)
// eslint-disable-next-line no-empty
} catch {}
}
} else {