-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
33 lines (32 loc) · 1011 Bytes
/
.eslintrc.json
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
29
30
31
32
33
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "react-hooks"],
"rules": {
"react/react-in-jsx-scope": "off", // For React 17+ (no need to import React)
"react/prop-types": "warn", // Warn if PropTypes are missing
"react/no-unescaped-entities": "warn", // Warn for unescaped entities in JSX
"react/no-array-index-key": "warn", // Warn against using array indices as keys
"react-hooks/rules-of-hooks": "error", // Ensure hooks are used correctly
"react-hooks/exhaustive-deps": "warn" // Warn for missing dependencies in hooks
},
"settings": {
"react": {
"version": "detect" // Automatically detect the React version
}
}
}