fix: allow void as statement in ts file (#142)

This commit is contained in:
曾明健
2022-12-16 18:48:11 +08:00
committed by GitHub
parent 2ad3503022
commit 5d5b3c338a
3 changed files with 7 additions and 2 deletions

View File

@@ -147,6 +147,12 @@ module.exports = {
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['*.ts', '*.tsx', '*.mts', '*.cts'],
rules: {
'no-void': ['error', { allowAsStatement: true }],
},
},
{
files: ['scripts/**/*.*', 'cli.*'],
rules: {

View File

@@ -34,7 +34,6 @@ module.exports = {
'@typescript-eslint/no-implied-eval': 'error',
'dot-notation': 'off',
'@typescript-eslint/dot-notation': ['error', { allowKeywords: true }],
'no-void': ['error', { allowAsStatement: true }],
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/await-thenable': 'error',