-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue3.js
More file actions
75 lines (64 loc) · 1.88 KB
/
Copy pathvue3.js
File metadata and controls
75 lines (64 loc) · 1.88 KB
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
module.exports = {
extends: [
'plugin:vue/vue3-recommended',
],
// required to lint *.vue files
plugins: [
'vue',
],
rules: {
'vue/first-attribute-linebreak': ['error', {
singleline: 'beside',
multiline: 'beside',
}],
'vue/html-closing-bracket-newline': ['error', {
singleline: 'never',
multiline: 'never',
}],
// Use 4 spaces for indents in HTML (maybe only applies in Vue templates?)
'vue/html-indent': [
'error',
4,
{
baseIndent: 1,
},
],
'vue/html-self-closing': 'off',
// https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/max-attributes-per-line.md
// https://vuejs.org/v2/style-guide/#Multi-attribute-elements-strongly-recommended
'vue/max-attributes-per-line': ['error', {
singleline: {
max: 1,
},
multiline: {
max: 1,
},
}],
'vue/multi-word-component-names': 'off',
// We're big boys. We know what data to not display as raw HTML.
'vue/no-v-html': 'off',
'vue/script-indent': [
'error',
4,
{
baseIndent: 0,
switchCase: 1,
},
],
'vue/v-slot-style': ['error', {
atComponent: 'longform',
default: 'longform',
named: 'longform',
}],
},
overrides: [
// For .vue files disable the indent rule otherwise there are errors about indentation in <script> tags.
// https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/script-indent.md
{
files: ['*.vue'],
rules: {
indent: 'off',
},
},
],
};