diff --git a/README.md b/README.md index 6d2402ff58..46249254d3 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Install [VS Code ESLint extension](https://marketplace.visualstudio.com/items?it ### TypeScript Aware Rules -Type aware rules are enabled when a `tsconfig.eslint.json` is found in the project root. If you want to enable it while have no `tsconfig.eslint.json` in the project root, you can change tsconfig name by modifying `ESLINT_TSCONFIG` env. +Type aware rules are enabled when a `tsconfig.eslint.json` is found in the project root, which will introduce some stricter rules into your project. If you want to enable it while have no `tsconfig.eslint.json` in the project root, you can change tsconfig name by modifying `ESLINT_TSCONFIG` env. ```js // .eslintrc.js 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 29f15e9090..1a9c403059 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',