From 00aab92dc266bd5f949094860eb35bb499844fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E6=98=8E=E5=81=A5?= Date: Fri, 2 Dec 2022 09:37:23 +0000 Subject: [PATCH] docs: update readme --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 10710e6099..1024141649 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,15 @@ 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. Refer to [this file](https://github.com/antfu/eslint-config/blob/main/packages/typescript/index.js#L17). +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. + +```js +process.env['ESLINT_TSCONFIG'] = 'tsconfig.json' + +module.exports = { + extends: '@antfu' +} +``` ## Extended Reading