Skip to content

Commit 6b64b84

Browse files
committed
fix(eslint): upgrade eslint config for prettier
1 parent 0299442 commit 6b64b84

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

.eslintrc.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"parser": "babel-eslint",
33
"extends": [
44
"eslint:recommended",
5-
"plugin:prettier/recommended",
6-
"prettier"
5+
"plugin:prettier/recommended"
76
],
87
"plugins": [
98
"import"
@@ -35,8 +34,6 @@
3534
},
3635
"extends": [
3736
"plugin:@typescript-eslint/recommended",
38-
"prettier",
39-
"prettier/@typescript-eslint",
4037
"plugin:prettier/recommended"
4138
],
4239
"plugins": [

docs/adding-prettier.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ title: Adding Prettier
55

66
## Adding Prettier Into Your Project
77

8+
9+
### Version `<4.1.0`
810
> This feature is available starting from version 3 of `typescript-node-scripts`
911
1012
1. In your project folder, install Prettier and the ESLint plugins:
@@ -41,3 +43,37 @@ yarn add prettier eslint-plugin-prettier eslint-config-prettier --dev
4143
]
4244
}
4345
```
46+
47+
### Version `>=4.1.0`
48+
49+
1. In your project folder, install Prettier and the ESLint plugins:
50+
51+
```sh
52+
# npm
53+
npm i -D prettier eslint-plugin-prettier eslint-config-prettier
54+
55+
# yarn
56+
yarn add prettier eslint-plugin-prettier eslint-config-prettier --dev
57+
```
58+
59+
2. Add the plugins to your `.eslintrc.json`
60+
61+
```diff
62+
{
63+
"parser": "babel-eslint",
64+
"extends": [
65+
"eslint:recommended",
66+
+ "plugin:prettier/recommended"
67+
],
68+
...
69+
"overrides": [
70+
{
71+
...
72+
"extends": [
73+
"plugin:@typescript-eslint/recommended",
74+
+ "plugin:prettier/recommended"
75+
],
76+
}
77+
]
78+
}
79+
```

0 commit comments

Comments
 (0)