-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.eslintrc.js
52 lines (44 loc) · 1.02 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
46
47
48
49
50
51
52
/**
* eslint config file
*/
module.exports = {
root: true,
env: {
node: true
},
globals: {
//
},
extends: [
'plugin:vue/essential',
'eslint:recommended',
'airbnb',
],
rules: {
// 4 space indent
'indent': ['error', 4],
// max character in single line
'max-len': [1, 150, 4],
// allow console
'no-console': 0,
// allow debugger in development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// allow alert in development
'no-alert': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// max nest callback 3
'max-nested-callbacks': ['error', 3],
// allow underscore variable
// such as: __INITIAL_STATE__, __VUE_SSR_CONTEXT__
'no-underscore-dangle': ['error', {
allow: [
'__INITIAL_STATE__',
'__VUE_SSR_CONTEXT__',
],
}],
// allow modify param property
'no-param-reassign': ['error', { 'props': false }],
},
parserOptions: {
parser: 'babel-eslint',
},
};