-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvue.js
66 lines (65 loc) · 1.55 KB
/
vue.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
/** @type {import("eslint").Linter.Config} */
const vue = {
extends: [
'plugin:vue/vue3-recommended',
'plugin:vuejs-accessibility/recommended',
'@sparing-software/eslint-config',
'@vue/eslint-config-typescript/recommended'
],
plugins: ['vuejs-accessibility'],
/*
This parser safe us from extra eslint problem after
adding @typescript-eslint/prefer-nullish-coalescing flag into index.js
https://stackoverflow.com/a/66598327
*/
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
project: true
},
rules: {
'import/order': [
'warn',
{
groups: [
'builtin',
'external',
'internal',
['parent', 'sibling', 'index']
],
alphabetize: {
order: 'asc'
},
'newlines-between': 'always'
}
],
'@typescript-eslint/ban-ts-comment': 'off',
'vue/no-v-html': 'off',
'vue/html-self-closing': [
'warn',
{
html: {
void: 'always', // prettier
normal: 'always',
component: 'always'
}
}
],
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
'vue/prefer-true-attribute-shorthand': ['warn', 'always'],
'vue/component-tags-order': [
'warn',
{
order: ['template', 'script', 'style']
}
],
'vue/define-props-declaration': 'warn',
'vuejs-accessibility/anchor-has-content': [
'error',
{
components: ['RouterLink']
}
]
}
}
module.exports = vue