-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
60 lines (50 loc) · 1.29 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
module.exports = {
root: true,
env: {
node: true,
},
extends: ['eslint:recommended', 'plugin:vue/recommended', '@vue/airbnb'],
parserOptions: {
parser: 'babel-eslint',
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
// recommended by Vetur
'vue/html-self-closing': 'off',
// Disable max-len
'max-len': 'off',
// we don't want it
semi: ['error', 'never'],
// add parens ony when required in arrow function
'arrow-parens': ['error', 'as-needed'],
// add new line above comment
'lines-around-comment': [
'error',
{
beforeBlockComment: true,
beforeLineComment: true,
allowBlockStart: true,
allowClassStart: true,
allowObjectStart: true,
allowArrayStart: true,
},
],
'linebreak-style': 'off',
// add new line above comment
'newline-before-return': 'error',
// add new line below import
'import/newline-after-import': ['error', { count: 1 }],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'global-require': 'off',
},
}