-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
41 lines (41 loc) · 960 Bytes
/
.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,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
extends: 'airbnb-base', // 所用的规范
globals: { // 可以使用的为在当前 js 内声明的变量
document: true,
navigator: true,
window:true,
node:true
},
plugins: [ // 对 html 文件的规则处理
'html'
],
settings: {
'import/resolver': {
webpack: { config: 'build/webpack.base.conf.js' }
}
},
rules: { // 除了规预设范外的自定义规则
'import/extensions': ['error', 'always', {
js: 'never',
}],
'max-len': ['error', {
code: 9999,
tabWidth: 2
}],
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
"linebreak-style": ["error", "windows"],
// "allowShortCircuit": false,
"allowTernary": false,
"allowShortCircuit": true,
"treatUndefinedAsUnspecified": true,
"no-console": "off",
"no-underscore-dangle": "off"
}
};