-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
28 lines (28 loc) · 889 Bytes
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: ["plugin:react/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 12,
sourceType: "module"
},
plugins: ["react", "react-hooks", "@typescript-eslint"],
rules: {
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "error" // Checks effect dependencies
},
settings: {
react: {
pragma: "React", // Pragma to use, default to "React"
fragment: "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
version: "detect" // React version. "detect" automatically picks the version you have installed.
}
}
};