-
Notifications
You must be signed in to change notification settings - Fork 255
/
.eslintrc
100 lines (100 loc) · 2.59 KB
/
.eslintrc
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"airbnb",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:testing-library/react"
],
"globals": {
"page": true,
"document": true,
"vi": true
},
"plugins": [
"react",
"react-hooks",
"testing-library"
],
"rules": {
"import/no-unresolved": [
2, { "ignore": ["test-utils"] }
],
"import/prefer-default-export": "off",
"no-console": "off",
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }],
"no-unused-vars": "off",
"no-undef": "off",
"no-restricted-syntax": ["warn", "WithStatement"],
"no-restricted-globals": ["error"],
"eqeqeq": ["warn", "smart"],
"no-use-before-define": [
"warn",
{
"functions": false,
"classes": false,
"variables": false
},
],
"no-mixed-operators": [
"warn",
{
"groups": [
["&", "|", "^", "~", "<<", ">>", ">>>"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"],
],
"allowSamePrecedence": false,
},
],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": true,
"FunctionExpression": true
}
}],
"no-underscore-dangle": "off",
"react/prefer-stateless-function": "off",
"sort-keys": ["error", "asc", {
"caseSensitive": false,
"natural": false
}],
"react/jsx-props-no-spreading": "off",
"react/function-component-definition": "off",
"default-param-last": "off",
"arrow-parens": "off",
"import/no-anonymous-default-export": "off",
"import/no-extraneous-dependencies": "off",
"max-len": ["error", {
"code": 120,
"ignoreComments": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}],
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": [2, {
"functions": "defaultArguments"
}],
"react-hooks/exhaustive-deps": "error",
"testing-library/render-result-naming-convention": "off",
"testing-library/no-render-in-lifecycle": [
"error",
{
"allowTestingFrameworkSetupHook": "beforeEach"
}
]
}
}