eslint-config-plus-prettier 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -8
- package/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,24 +7,32 @@ Standard config for ESLint and Prettier. Also includes an optional TSConfig.
|
|
|
7
7
|
npm install --save-dev eslint-config-plus-prettier
|
|
8
8
|
npx install-peerdeps --dev eslint-config-plus-prettier
|
|
9
9
|
|
|
10
|
+
Add the following scripts to your `package.json`:
|
|
11
|
+
|
|
12
|
+
"scripts": {
|
|
13
|
+
"lint": "eslint . --ext .ts,.js --fix",
|
|
14
|
+
"format": "prettier --write ."
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
### Configure ESLint
|
|
18
|
+
|
|
10
19
|
Add a `.eslintrc.json` file with the following:
|
|
11
20
|
|
|
12
21
|
{
|
|
13
22
|
"extends": "eslint-config-plus-prettier"
|
|
14
23
|
}
|
|
15
24
|
|
|
16
|
-
|
|
25
|
+
Consider adding a `.eslintignore` file to avoid trying to lint compiled code in the `dist` folder:
|
|
17
26
|
|
|
18
|
-
|
|
27
|
+
dist
|
|
19
28
|
|
|
20
|
-
|
|
29
|
+
### Configure Prettier
|
|
21
30
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
31
|
+
Add prettier config to `package.json`:
|
|
32
|
+
|
|
33
|
+
"prettier": "eslint-config-plus-prettier/.prettierrc.json"
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
### Configure TSConfig (optional)
|
|
28
36
|
|
|
29
37
|
Add a `tsconfig.json` file with the following:
|
|
30
38
|
|
package/index.js
CHANGED