-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
63 lines (61 loc) · 1.55 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
{
// 环境定义了预定义的全局变量。
"env": {
//环境定义了预定义的全局变量。更多在官网查看
"browser": true,
"node": true,
"commonjs": true,
"amd": true,
"es6": true,
"mocha": true
},
// JavaScript 语言选项
"parserOptions": {
// ECMAScript 版本
"ecmaVersion": 6,
"sourceType": "module", //设置为 "script" (默认) 或 "module"(如果你的代码是 ECMAScript 模块)。
//想使用的额外的语言特性:
"ecmaFeatures": {
// 允许在全局作用域下使用 return 语句
"globalReturn": true,
// impliedStric
"impliedStrict": true,
// 启用 JSX
"jsx": true,
"modules": true
}
},
//-----让eslint支持 JSX start
"plugins": [
"react"
],
"extends": [
"umi",
"eslint:recommended",
"plugin:react/recommended"
],
//-----让eslint支持 JSX end
/**
* "off" 或 0 - 关闭规则
* "warn" 或 1 - 开启规则,使用警告级别的错误:warn (不会导致程序退出),
* "error" 或 2 - 开启规则,使用错误级别的错误:error (当被触发的时候,程序会退出)
*/
"rules": {
"no-console": 0,
"no-debugger": 0,
"indent": 0,
"space-before-function-paren":0,
"no-unused-vars":0,
"prefer-const": 0,
"object-curly-spacing": 0,
"no-multiple-empty-lines":0,
"quotes": 0,
"semi":0,
"no-empty-pattern":0,
"react/prop-types":0,
"no-undef":0,
"react/style-prop-object":0,
"no-unused-labels":0,
"display-name":0
}
}