forked from TaleLin/lin-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
45 lines (45 loc) · 1.18 KB
/
.eslintrc.js
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
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true,
"jest": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"globals": { // 脚本在执行期间访问的额外的全局变量
"Component": true,
"Page": true,
"wx": true,
},
"rules": { // 启用的规则及其各自的错误级别。
"indent": [ // 强制执行一致的缩进(4个空格)
1,
2
],
"linebreak-style": [
0,
"error",
"windows"
],
"quotes": [ // 强制一致使用反引号,双引号或单引号(反引号或单引号)
1,
"single",
{
"allowTemplateLiterals": true
}
],
"semi": [ // 要求或禁止使用分号代替 ASI (semi)
1,
"always"
],
"no-console": [1, {
allow: ["info", "warn", "error"]
}], // 不建议使用console.log
"no-undef": [2], // 禁用未声明的变量
}
}