Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zanminkian committed Dec 2, 2022
1 parent c8a9c5e commit 5dbbb1d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Expand Up @@ -18,10 +18,10 @@
pnpm add -D eslint @antfu/eslint-config
```

### Config `.eslintrc`
### Config `.eslintrc.js`

```json
{
```js
module.exports = {
"extends": "@antfu"
}
```
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 5dbbb1d

Please sign in to comment.