-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path.eslintrc.js
108 lines (106 loc) · 3.26 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parserOptions: {
parser: '@babel/eslint-parser',
requireConfigFile: false,
},
extends: [
'eslint:recommended',
// https://github.com/vuejs/eslint-plugin-vue
'plugin:vue/recommended',
],
// required to lint *.vue files
plugins: [
'vue',
],
// add your custom rules here
rules: {
'arrow-parens': ["error", "always"],
'no-unused-vars': 0,
'no-undef': 0,
'no-console': 0,
'no-empty': 0,
'comma-dangle': ["error", "always-multiline"],
'comma-spacing': ["error", { "before": false, "after": true }],
'semi': ["error", "always"],
'semi-spacing': "error",
'space-before-function-paren': ["error", {"anonymous": "never", "named": "never", "asyncArrow": "always"}],
// VUE STRONGLY-RECOMMENDED
'vue/html-closing-bracket-spacing': 0,
// 'vue/html-indent': 0,
'vue/html-indent': ["warn", 4, {
"attribute": 1,
"baseIndent": 1,
"closeBracket": 0,
"alignAttributesVertically": true,
"ignores": [],
}],
'vue/html-self-closing': 0,
// 'vue/html-self-closing': ["warn", {
// "html": {
// "void": "never",
// "normal": "never",
// "component": "always"
// },
// "svg": "any",
// "math": "any"
// }],
'vue/max-attributes-per-line': 0,
'vue/singleline-html-element-content-newline': 0,
'vue/v-bind-style': 0,
'vue/v-on-style': 0,
'vue/v-slot-style': 0,
'vue/no-unused-vars': 0,
// allow `$value`
'vue/prop-name-casing': ["warn"],
'vue/multi-word-component-names': 0,
// VUE RECOMMENDED
'vue/no-v-html': 0,
'vue/attribute-hyphenation': 0,
"vue/attributes-order": 0,
// "vue/attributes-order": ["warn", {
// "order": [
// "DEFINITION",
// "LIST_RENDERING",
// "CONDITIONALS",
// "RENDER_MODIFIERS",
// // "GLOBAL", // allow to be first
// "UNIQUE",
// "TWO_WAY_BINDING",
// // "OTHER_DIRECTIVES", // allow to be first
// // "OTHER_ATTR", // allow html attributes to be first
// "EVENTS",
// "CONTENT"
// ]
// }],
"vue/order-in-components": ["error", {
"order": [
'el',
'name',
'parent',
'functional',
['delimiters', 'comments'],
['components', 'directives', 'filters'],
'extends',
'mixins',
'inheritAttrs',
'model',
['props', 'propsData'],
"fetch",
"asyncData",
"head",
'data',
'computed',
'watch',
'LIFECYCLE_HOOKS',
'methods',
['template', 'render'],
'renderError',
],
}],
},
};