forked from D-xuanmo/blog-miniprogram-wordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
44 lines (44 loc) · 996 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
42
43
44
module.exports = {
root: true,
env: {
node: true,
browser: true,
es6: true
},
extends: [
'eslint:recommended'
],
globals: {
getApp: true,
App: true,
wx: true,
Page: true,
Component: true
},
rules: {
semi: ['error', 'never'],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
indent: ['error', 2],
'max-len': ['error', {
code: 150,
tabWidth: 2
}],
'comma-spacing': 'error',
'arrow-spacing': 'error',
'key-spacing': 'error',
'no-mixed-spaces-and-tabs': 'error',
'space-before-function-paren': 'error',
'space-infix-ops': 'error',
'space-unary-ops': 'error',
'spaced-comment': 'error',
'no-var': 'error',
'no-useless-constructor': 'error',
quotes: ['error', 'single']
},
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module',
ecmaVersion: 2018
}
}