|
@@ -16,15 +16,16 @@
|
|
|
"ecmaVersion": 2018,
|
|
|
"sourceType": "module"
|
|
|
},
|
|
|
- "plugins": ["react", "@typescript-eslint"],
|
|
|
+ "plugins": ["react", "@typescript-eslint", "react-hooks"],
|
|
|
"rules": {
|
|
|
"semi": ["error", "never"],
|
|
|
"no-multiple-empty-lines": [1, { "max": 2 }], //空行最多不能超过2行
|
|
|
"comma-dangle": [2, "never"],
|
|
|
"react/prop-types": 0,
|
|
|
"array-bracket-spacing": ["error", "always"],
|
|
|
- "object-curly-spacing": ["error", "always"]
|
|
|
-
|
|
|
+ "object-curly-spacing": ["error", "always"],
|
|
|
+ "react-hooks/rules-of-hooks": "error"
|
|
|
+ // "react-hooks/exhaustive-deps": "warn"
|
|
|
// "import/no-unresolved": [1, { "ignore": ["^@/"] }]
|
|
|
},
|
|
|
"settings": {
|