1
1
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:
Théo LUDWIG 2024-10-29 23:48:40 +01:00
parent 8efe22c23e
commit d41573f12c
Signed by: theoludwig
GPG Key ID: ADFE5A563D718F3B

View File

@ -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)