1
1
mirror of https://github.com/theoludwig/eslint-config-conventions.git synced 2024-12-18 21:45:04 +01:00

Compare commits

..

2 Commits

Author SHA1 Message Date
a578bb80ba
docs: add // @ts-check to config example 2024-10-08 08:10:28 +02:00
e32847fa3d
chore: specify correct supported Node.js version
BREAKING CHANGE: Minimum supported Node.js >= 20.11.0

Ref: https://nodejs.org/api/esm.html#importmetadirname
2024-10-08 08:02:27 +02:00
4 changed files with 13 additions and 9 deletions

View File

@ -29,7 +29,7 @@ More information about **formatting rules** vs **code-quality rules** can be fou
### Prerequisites ### Prerequisites
[Node.js](https://nodejs.org/) >= 20.9.0 [Node.js](https://nodejs.org/) >= 20.11.0
### Installation ### Installation
@ -40,8 +40,8 @@ npm install --save-dev \
eslint-plugin-unicorn@^56.0.0 \ eslint-plugin-unicorn@^56.0.0 \
eslint-plugin-import-x@^4.3.1 \ eslint-plugin-import-x@^4.3.1 \
globals@^15.10.0 \ globals@^15.10.0 \
"typescript@~5.5.4" \ typescript@~5.5.4 \
"typescript-eslint@^8.8.0" \ typescript-eslint@^8.8.0 \
eslint-config-conventions@latest eslint-config-conventions@latest
``` ```
@ -62,10 +62,12 @@ Dependencies are:
#### `eslint.config.js` (JavaScript and TypeScript) #### `eslint.config.js` (JavaScript and TypeScript)
```js ```js
import typescriptESLint from "typescript-eslint" // @ts-check
import eslintConfigConventions from "eslint-config-conventions"
export default typescriptESLint.config(...eslintConfigConventions) import typescriptESLint from "typescript-eslint"
import configConventions from "eslint-config-conventions"
export default typescriptESLint.config(...configConventions)
``` ```
#### Configuration with [Prettier](https://prettier.io/) (recommended) #### Configuration with [Prettier](https://prettier.io/) (recommended)

View File

@ -1,3 +1,5 @@
// @ts-check
import promise from "eslint-plugin-promise" import promise from "eslint-plugin-promise"
import unicorn from "eslint-plugin-unicorn" import unicorn from "eslint-plugin-unicorn"
import importX from "eslint-plugin-import-x" import importX from "eslint-plugin-import-x"

View File

@ -1,8 +1,8 @@
// @ts-check // @ts-check
import typescriptESLint from "typescript-eslint" 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/*"], ignores: ["test/fixtures/*"],
}) })

View File

@ -34,7 +34,7 @@
"provenance": true "provenance": true
}, },
"engines": { "engines": {
"node": ">=20.9.0" "node": ">=20.11.0"
}, },
"scripts": { "scripts": {
"lint:editorconfig": "editorconfig-checker", "lint:editorconfig": "editorconfig-checker",