-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
35 lines (35 loc) · 1.11 KB
/
.eslintrc.cjs
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
34
35
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"prettier",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
eqeqeq: "warn",
"array-callback-return": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/hook-use-state": "error",
"react/jsx-no-useless-fragment": "warn",
"react/jsx-pascal-case": "error",
"react/jsx-props-no-multi-spaces": "error",
"react/self-closing-comp": "warn",
"react/void-dom-elements-no-children": "error",
"react/default-props-match-prop-types": "error",
"react/jsx-no-duplicate-props": "error",
"react/prefer-exact-props": "error",
"@typescript-eslint/no-explicit-any": "off"
},
settings: {
react: { version: "detect" },
},
};