This repository has been archived by the owner on Feb 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
115 lines (112 loc) · 2.7 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
module.exports = {
root: true,
env: {
browser: true,
},
extends: [
'plugin:vue/essential',
'@vue/airbnb',
],
parserOptions: {
parser: 'babel-eslint',
},
extends: [
'plugin:vue/recommended',
'plugin:import/recommended',
'airbnb-base',
],
plugins: [
'vue',
],
settings: {
'import/resolver': {
alias: {
map: [
['@', './src'],
],
extensions: ['index.js', '.js', '.vue', '.json']
}
},
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 2 : 1,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 1,
'sort-imports': 'off',
'no-plusplus': [0, { 'allowForLoopAfterthoughts': true }],
'no-void': 0,
'default-case': 0,
'max-len': ['error', {
'code': 120,
'ignoreComments': true,
'ignoreUrls': true,
'ignoreStrings': true,
'ignoreTemplateLiterals': true
}],
'no-param-reassign': ['error', {
'props': true,
'ignorePropertyModificationsFor': [
'state',
'acc',
'e'
]
}],
'import/first': 0,
'import/order': [0, {
'groups': ['builtin', 'external', 'parent', 'sibling', 'index'],
'newlines-between': 'never'
}],
'import/named': 2,
'import/namespace': 2,
'import/default': 2,
'import/export': 2,
'import/no-unresolved': 2,
'import/no-cycle': 2,
'import/no-extraneous-dependencies': 0,
'import/prefer-default-export': 0,
'import/extensions': ['error', {
'js': 'never',
'json': 'always',
'vue': 'always',
}],
'vue/require-default-prop': 'off',
'vue/max-attributes-per-line': ['error', {
singleline: 5,
multiline: { max: 1, allowFirstLine: false },
}],
'vue/name-property-casing': ['error', 'kebab-case'],
'vue/prop-name-casing': 'off',
'vue/no-v-html': 'off',
'vue/this-in-template': ['error', 'never'],
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
'vue/order-in-components': ['error', {
order: [
'el',
'name',
'parent',
'functional',
'validations',
['delimiters', 'comments'],
['components', 'directives', 'filters'],
'extends',
'mixins',
'inheritAttrs',
'model',
['props', 'propsData'],
'data',
'computed',
'watch',
'LIFECYCLE_HOOKS',
'methods',
['template', 'render'],
'renderError'
]
}],
'vue/html-closing-bracket-newline': ['error', {
'singleline': 'never',
'multiline': 'always'
}],
'vue/html-closing-bracket-spacing': ['error', {
'selfClosingTag': 'always',
}],
},
};