-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
73 lines (73 loc) · 2.16 KB
/
.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
"env": {
"browser": true,
"es2021": true
},
"extends": ["plugin:react/recommended", "plugin:react/jsx-runtime", "airbnb"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "modules-newline"],
"rules": {
// "react/no-unstable-nested-components": "off",
// "react/no-namespace": "off",
// "react/prefer-exact-props": "off",
// "react/no-arrow-function-lifecycle": "off",
// "react/no-invalid-html-attribute": "off",
// "react/no-unused-class-component-methods": "off",
// "import/no-import-module-exports": "off",
// "import/no-relative-packages": "off",
// "react/jsx-indent": ["error", 2],
"import/newline-after-import": ["error", { "count": 1 }],
"react/no-unescaped-entities": "off",
"comma-dangle": ["error", "never"],
"func-names": "off",
"react/react-in-jsx-scope": 0,
"react/jsx-props-no-multi-spaces": ["error"],
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 0 }],
"max-len": "off",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"no-unused-vars": "warn",
"react-hooks/rules-of-hooks": "error",
"operator-linebreak": ["error", "none"],
"no-console": 0,
"react/state-in-constructor": 0,
"linebreak-style": 0,
"react/prop-types": 0,
"jsx-a11y/click-events-have-key-events": 0,
"modules-newline/import-declaration-newline": "warn",
"modules-newline/export-declaration-newline": "warn",
"react/jsx-one-expression-per-line": [
"warn",
{
"allow": "literal"
}
],
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function"
}
],
"object-curly-newline": [
"error",
{
"ObjectExpression": "always",
"ObjectPattern": { "multiline": true },
"ImportDeclaration": { "multiline": true, "minProperties": 3 },
"ExportDeclaration": { "multiline": true, "minProperties": 3 }
}
],
"react/jsx-filename-extension": [
1,
{
"extensions": [".js", ".jsx"]
}
]
}
}