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
|
||||
|
||||
#### `eslint.config.js` (JavaScript and TypeScript)
|
||||
#### `eslint.config.js`
|
||||
|
||||
```js
|
||||
// @ts-check
|
||||
|
||||
import typescriptESLint from "typescript-eslint"
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user