Skip to content

Commit d41573f

Browse files
committed
docs: eslint.config.js
1 parent 8efe22c commit d41573f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,22 @@ Dependencies are:
5959

6060
### Configuration
6161

62-
#### `eslint.config.js` (JavaScript and TypeScript)
62+
#### `eslint.config.js`
6363

6464
```js
65-
// @ts-check
66-
6765
import typescriptESLint from "typescript-eslint"
6866
import configConventions from "eslint-config-conventions"
6967

70-
export default typescriptESLint.config(...configConventions)
68+
export default typescriptESLint.config(...configConventions, {
69+
files: ["**/*.ts", "**/*.tsx"],
70+
languageOptions: {
71+
parser: typescriptESLint.parser,
72+
parserOptions: {
73+
projectService: true,
74+
tsconfigRootDir: import.meta.dirname,
75+
},
76+
},
77+
})
7178
```
7279

7380
#### Configuration with [Prettier](https://prettier.io/) (recommended)

0 commit comments

Comments
 (0)