Skip to content

Commit

Permalink
docs: add // @ts-check to config example
Browse files Browse the repository at this point in the history
  • Loading branch information
theoludwig committed Oct 8, 2024
1 parent e32847f commit a578bb8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ npm install --save-dev \
eslint-plugin-unicorn@^56.0.0 \
eslint-plugin-import-x@^4.3.1 \
globals@^15.10.0 \
"typescript@~5.5.4" \
"typescript-eslint@^8.8.0" \
typescript@~5.5.4 \
typescript-eslint@^8.8.0 \
eslint-config-conventions@latest
```

Expand All @@ -62,10 +62,12 @@ Dependencies are:
#### `eslint.config.js` (JavaScript and TypeScript)

```js
// @ts-check

import typescriptESLint from "typescript-eslint"
import eslintConfigConventions from "eslint-config-conventions"
import configConventions from "eslint-config-conventions"

export default typescriptESLint.config(...eslintConfigConventions)
export default typescriptESLint.config(...configConventions)
```

#### Configuration with [Prettier](https://prettier.io/) (recommended)
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-check

import promise from "eslint-plugin-promise"
import unicorn from "eslint-plugin-unicorn"
import importX from "eslint-plugin-import-x"
Expand Down
4 changes: 2 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @ts-check

import typescriptESLint from "typescript-eslint"
import eslintConfigConventions from "./eslint.config.js"
import configConventions from "./eslint.config.js"

export default typescriptESLint.config(...eslintConfigConventions, {
export default typescriptESLint.config(...configConventions, {
ignores: ["test/fixtures/*"],
})

0 comments on commit a578bb8

Please sign in to comment.