-
-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy path.eslintrc.js
More file actions
33 lines (33 loc) · 765 Bytes
/
.eslintrc.js
File metadata and controls
33 lines (33 loc) · 765 Bytes
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
module.exports = {
extends: ['alloy', 'alloy/react', 'alloy/typescript'],
ignorePatterns: ['package.json'],
env: {
// 你的环境变量(包含多个预定义的全局变量)
//
// browser: true,
// node: true,
// mocha: true,
// jest: true,
// jquery: true
},
globals: {
// 你的全局变量(设置为 false 表示它不允许被重新赋值)
//
// myGlobal: false
},
rules: {
// 自定义你的规则
// 最大圈复杂度
complexity: ['error', 30],
"linebreak-style": ['off', "unix"],
"semi": 2,
"indent": ["error", 2],
"semi-style": ["error", "last"],
'react/jsx-no-useless-fragment': [
'error',
{
allowExpressions: true,
},
],
},
};