forked from TeamFleet/WhoCallsTheFleet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
99 lines (99 loc) · 2.62 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
{
"extends": "eslint:recommended",
"plugins": [
// "react"
],
// 环境定义了预定义的全局变量。
"env": {
//环境定义了预定义的全局变量。更多在官网查看
"browser": true,
"node": true,
"commonjs": true,
"amd": true,
"es6": true,
"mocha": true,
"jquery": true
},
// "parser": "babel-eslint",
// JavaScript 语言选项
"parserOptions": {
// ECMAScript 版本
"ecmaVersion": 7,
"sourceType": "module", //script
// 想使用的额外的语言特性:
"ecmaFeatures": {
// 允许在全局作用域下使用 return 语句
"globalReturn": true,
// impliedStric
"impliedStrict": true,
// 启用 JSX
// "jsx": true,
"experimentalObjectRestSpread": true
}
},
// 全局变量
// ture 可以被重写,false 不可以被重写
"globals": {
"_g": false,
"_frame": false,
"_p": false,
"_db": false,
"app": false,
"angular": false,
"node": false,
"Lockr": false,
"$html": true,
"_config": true,
"launcherOptions": true,
"TablelistEquipments": true
},
"settings": {
"import/ignore": [
"node_modules"
]
},
/**
* "off" 或 0 - 关闭规则
* "warn" 或 1 - 开启规则,使用警告级别的错误:warn (不会导致程序退出),
* "error" 或 2 - 开启规则,使用错误级别的错误:error (当被触发的时候,程序会退出)
*/
"rules": {
"no-const-assign": 1,
"no-extra-semi": 2,
//"semi": [2, "always", { "omitLastInOneLineBlock": true}],
"semi": 0,
"no-case-declarations": 2,
"no-console": 0,
"no-fallthrough": 0,
"no-empty": 0,
"no-empty-pattern": 2,
"no-mixed-spaces-and-tabs": 0,
"no-octal": 2,
"no-redeclare": [
2,
{
"builtinGlobals": true
}
],
"no-self-assign": 2,
"no-this-before-super": 1,
"no-undef": 1,
"no-unreachable": 1,
"no-unused-vars": 1,
"no-use-before-define": 0,
"constructor-super": 1,
"curly": 0,
"eqeqeq": 0,
"func-names": 0,
"valid-typeof": 1,
"indent": [
"error",
4,
{
"SwitchCase": 1
}
]
// "react/jsx-uses-react": "error",
// "react/jsx-uses-vars": "error"
}
}