mirror of
https://github.com/theoludwig/eslint-config-conventions.git
synced 2024-12-18 21:45:04 +01:00
docs: eslint.config.js
This commit is contained in:
parent
8efe22c23e
commit
d41573f12c
15
README.md
15
README.md
@ -59,15 +59,22 @@ Dependencies are:
|
|||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
#### `eslint.config.js` (JavaScript and TypeScript)
|
#### `eslint.config.js`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
import typescriptESLint from "typescript-eslint"
|
import typescriptESLint from "typescript-eslint"
|
||||||
import configConventions from "eslint-config-conventions"
|
import configConventions from "eslint-config-conventions"
|
||||||
|
|
||||||
export default typescriptESLint.config(...configConventions)
|
export default typescriptESLint.config(...configConventions, {
|
||||||
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
languageOptions: {
|
||||||
|
parser: typescriptESLint.parser,
|
||||||
|
parserOptions: {
|
||||||
|
projectService: true,
|
||||||
|
tsconfigRootDir: import.meta.dirname,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Configuration with [Prettier](https://prettier.io/) (recommended)
|
#### Configuration with [Prettier](https://prettier.io/) (recommended)
|
||||||
|
Loading…
Reference in New Issue
Block a user