forked from sakitam-fdd/webpack-lib-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
41 lines (41 loc) · 1.09 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
module.exports = {
root: true,
parser: 'babel-eslint', //使用babel-eslint来作为eslint的解析器
parserOptions: { // 设置解析器选项
sourceType: 'module' // 表明自己的代码是ECMAScript模块
},
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
extends: 'standard', // 继承eslint-config-standard里面提供的lint规则
plugins: [ // 使用的插件eslint-plugin-html. 写配置文件的时候,可以省略eslint-plugin-
],
"ecmaFeatures": {
"globalReturn": true,
"jsx": true,
"modules": true
},
"env": {
"browser": true,
"es6": true,
"node": true
},
"globals": {
"document": true,
"Object": true,
"escape": false,
"navigator": false,
"unescape": false,
"window": true,
"describe": true,
"before": true,
"it": true,
"expect": true,
"sinon": true,
"define": true
},
"rules": {
"arrow-parens": 0,
"generator-star-spacing": 0,
"no-prototype-builtins": 0,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}