From e86954a330fe05b1d524b567d5089eb2335bd004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E6=98=8E=E5=81=A5?= Date: Thu, 15 Dec 2022 14:19:01 +0000 Subject: [PATCH] fix: allow void as statement in ts file --- packages/basic/index.js | 6 ++++++ packages/typescript/index.js | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/basic/index.js b/packages/basic/index.js index 1887638a05..52386f70b9 100644 --- a/packages/basic/index.js +++ b/packages/basic/index.js @@ -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: { diff --git a/packages/typescript/index.js b/packages/typescript/index.js index 4140783702..71d50e7d4e 100644 --- a/packages/typescript/index.js +++ b/packages/typescript/index.js @@ -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',