-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
72 lines (71 loc) · 1.69 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
const poi = require('poi')
const poiConfig = require('./.poirc.js')
const poiApp = poi(poiConfig)
const webpackConfig = poiApp.createWebpackConfig()
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 2017,
sourceType: 'module'
},
env: {
browser: true,
commonjs: true,
node: true,
es6: true
},
extends: [
'standard',
'plugin:import/errors',
'plugin:promise/recommended',
'plugin:prettier/recommended',
'plugin:vue/recommended'
],
settings: {
'import/resolver': {
webpack: {
config: webpackConfig
}
}
},
rules: {
'promise/catch-or-return': 0,
'promise/avoid-new': 0,
'arrow-parens': 0,
'capitalized-comments': 0,
'no-var': 2,
'no-new': 0,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-unused-vars': [2, { vars: 'all', args: 'none' }],
'vue/max-attributes-per-line': 0,
'no-unused-vars': process.env.NODE_ENV === 'production' ? 2 : 1,
'no-console': process.env.NODE_ENV === 'production' ? 2 : 1,
'padding-line-between-statements': [
2,
{
blankLine: 'always',
prev: '*',
next: ['import', 'directive', 'export', 'block', 'block-like', 'if', 'const', 'let']
},
{
blankLine: 'always',
prev: ['import', 'directive', 'export', 'block', 'block-like', 'if', 'const', 'let'],
next: '*'
},
{
blankLine: 'never',
prev: ['import', 'directive'],
next: ['import', 'directive']
},
{
blankLine: 'never',
prev: ['const', 'let'],
next: ['const', 'let']
}
]
}
}