File tree Expand file tree Collapse file tree 2 files changed +37
-4
lines changed Expand file tree Collapse file tree 2 files changed +37
-4
lines changed Original file line number Diff line number Diff line change 22 "parser" : " babel-eslint" ,
33 "extends" : [
44 " eslint:recommended" ,
5- " plugin:prettier/recommended" ,
6- " prettier"
5+ " plugin:prettier/recommended"
76 ],
87 "plugins" : [
98 " import"
3534 },
3635 "extends" : [
3736 " plugin:@typescript-eslint/recommended" ,
38- " prettier" ,
39- " prettier/@typescript-eslint" ,
4037 " plugin:prettier/recommended"
4138 ],
4239 "plugins" : [
Original file line number Diff line number Diff 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
10121 . 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+ ```
You can’t perform that action at this time.
0 commit comments