forked from kubeclipper/console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
131 lines (131 loc) · 2.7 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
{
"extends": ["eslint-config-ali/react", "prettier", "plugin:react-hooks/recommended"],
"parser": "babel-eslint",
"plugins": ["cypress", "react-hooks"],
"env": {
"es6": true,
"browser": true,
"node": true,
"cypress/globals": true,
"jest": true
},
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"legacyDecorators": true
}
},
"rules": {
"comma-dangle": [
"error"
],
"object-curly-spacing": [
"error",
"always"
],
"no-void": "warn",
"new-cap": [
"warn",
{
"newIsCap": true,
"properties": false
}
],
"no-plusplus": "off",
"no-mixed-operators": [
"error",
{
"allowSamePrecedence": true
}
],
"no-fallthrough": [
"error",
{
"commentPattern": "break[\\s\\w]*omitted"
}
],
"no-nested-ternary": "warn",
"no-console": ["error", {
"allow": ["warn", "error"]
}],
"no-param-reassign": "off",
"no-unused-expressions": "off",
"eqeqeq": "error",
// "react/prop-types": "off",
"react/forbid-prop-types": "off",
"no-script-url": 0,
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
],
"no-extend-native": [
"error",
{
"exceptions": [
"Object",
"String"
]
}
],
"react/jsx-filename-extension": [
1,
{
"extensions": [
".js", ".jsx"
]
}
],
"react/jsx-wrap-multilines": 0,
"react/prop-types": 0,
"react/jsx-one-expression-per-line": 0,
"import/no-unresolved": [
2,
{
"ignore": [
"^umi/",
"^src",
"^layouts",
"^components",
"^containers",
"^stores",
"^utils",
"^pages",
"^core",
"^asset",
"^styles",
"^hooks",
"^resources"
]
}
],
"import/no-extraneous-dependencies": [
2,
{
"optionalDependencies": true
}
],
"import/prefer-default-export": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/anchor-is-valid": 0,
"linebreak-style": 0,
"react/no-array-index-key": 0,
"camelcase": "off",
"array-bracket-spacing": "off",
"space-before-function-paren": "off",
"arrow-parens": "off",
"react-hooks/rules-of-hooks": "error",
// "react-hooks/exhaustive-deps": "warn"
},
"globals": {
"t": true,
"globals": true,
"request": true,
"global_config": true
}
}