You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-1Lines changed: 34 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -73,4 +73,37 @@ For validating **React** project with TypeScript use `react-typescript` version
73
73
74
74
Caution! `htmlacademy/react` and `htmlacademy/react-typescript` doesn't include `react-hooks/rules-of-hooks` and `react-hooks/exhaustive-deps` because in our courses we use CRA (Create React App) which includes these plugins out of box. Install them yourself if necessary.
75
75
76
-
**Node.js** versions soon.
76
+
For validating **Node** project use `node` version (`htmlacademy/node` includes `htmlacademy/vanilla`, `plugin:@typescript-eslint/recommended` and `plugin:node/recommended`).
77
+
78
+
Before using `eslint-config-htmlacademy` make sure you have TypeScript and `@typescript-eslint/parser` installed:
79
+
80
+
```bash
81
+
$ npm i --save-dev typescript @typescript-eslint/parser
82
+
```
83
+
84
+
Then install the plugin:
85
+
86
+
```bash
87
+
$ npm i --save-dev @typescript-eslint/eslint-plugin
88
+
```
89
+
90
+
```json
91
+
{
92
+
"env": {
93
+
"es2021": true,
94
+
"node": true
95
+
},
96
+
"parserOptions": {
97
+
"ecmaVersion": 2021,
98
+
"sourceType": "module"
99
+
},
100
+
"parser": "@typescript-eslint/parser",
101
+
"plugins": "@typescript-eslint",
102
+
"extends": "htmlacademy/node"
103
+
}
104
+
```
105
+
106
+
Caution!
107
+
-`htmlacademy/node` aimed at using Typescript.
108
+
-`htmlacademy/node` recommends a use of the "engines" field of package.json, because our package includes `plugin:node/recomended`. The "engines" field is used by `node/no-unsupported-features/*` rules.
109
+
-`htmlacademy/node` uses ES6 modules and the rules are aimed precisely at this approach of connecting modules.
0 commit comments