Skip to content

Commit

Permalink
docs: eslint.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
theoludwig committed Oct 29, 2024
1 parent 8efe22c commit d41573f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d41573f

Please sign in to comment.