-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
95 lines (95 loc) · 2.18 KB
/
.eslintrc.cjs
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
/** @type {import('eslint').Linter.Config} */
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
'prettier',
'plugin:tailwindcss/recommended',
],
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
sourceType: 'module',
extraFileExtensions: ['.vue'],
},
plugins: ['@typescript-eslint'],
rules: {
'prettier/prettier': 0,
'@typescript-eslint/no-empty-function': 'off',
'no-extra-parens': 'off',
'@typescript-eslint/no-extra-parens': ['warn', 'all'],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
},
],
'vue/no-mutating-props': 'off',
'vue/no-setup-props-destructure': 0,
'vue/multi-word-component-names': 0,
'vue/component-tags-order': [
1,
{
order: ['script:not([setup])', 'script[setup]', 'template', 'style'],
},
],
'vue/max-attributes-per-line': [
1,
{
singleline: {
max: 1,
},
multiline: {
max: 1,
},
},
],
'vue/padding-line-between-blocks': ['warn', 'always'],
'vue/no-unused-refs': ['warn'],
'vue/component-name-in-template-casing': [
'warn',
'PascalCase',
{
registeredComponentsOnly: false,
ignores: [],
},
],
'vue/attributes-order': [
'warn',
{
order: [
'DEFINITION',
'LIST_RENDERING',
'CONDITIONALS',
'RENDER_MODIFIERS',
'GLOBAL',
['UNIQUE', 'SLOT'],
'TWO_WAY_BINDING',
'OTHER_DIRECTIVES',
'OTHER_ATTR',
'EVENTS',
'CONTENT',
],
alphabetical: false,
},
],
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'never',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
},
};