-
Notifications
You must be signed in to change notification settings - Fork 10
/
.eslintrc.js
39 lines (39 loc) · 1.03 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true
},
globals: {
wx: true,
App: true,
Page: true,
Component: true,
getApp: true,
requirePlugin: true
},
extends: [
'standard'
],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
// 来自 https://juejin.im/post/5d270196f265da1ba2528a6d
'no-async-promise-executor': 'off',
'no-misleading-character-class': 'off',
'no-prototype-builtins': 'off',
'no-shadow-restricted-names': 'off',
'no-useless-catch': 'off',
'no-with': 'off',
'require-atomic-updates': 'off',
// 自定义
// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-console': 'off',
'no-debugger': 'off',
'standard/no-callback-literal': 0,
indent: ['error', 4]
}
}