generated from santiagoaloi/simple-vue3-vuetify3-boilerplate
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
153 lines (135 loc) · 3.66 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/* eslint-env node */
// Specify that the linting environment is Node.js.
require('@rushstack/eslint-patch/modern-module-resolution')
// Apply the modern module resolution patch for ESLint.
module.exports = {
root: true,
// Set the root of the configuration.
extends: [
'plugin:vue/vue3-strongly-recommended',
// Extend the recommended Vue 3 ruleset.
'eslint:strongly-recommended',
// Extend the recommended ESLint rules.
'@vue/eslint-config-prettier/skip-formatting',
// Skip ESLint formatting rules that conflict with Prettier.
'./.eslintrc-auto-import.json'
// Extend rules for auto-imports from the specified configuration file.
// 'plugin:tailwindcss/recommended'
// Uncomment the line above if you want to extend the recommended Tailwind CSS rules.
],
parserOptions: {
ecmaVersion: 'latest'
// Specify the ECMAScript version to parse.
},
rules: {
'vue/block-tag-newline': [
'error',
{
singleline: 'always' | 'never' | 'consistent' | 'ignore',
multiline: 'always' | 'never' | 'consistent' | 'ignore',
maxEmptyLines: 0,
blocks: {
template: {
singleline: 'always' | 'never' | 'consistent' | 'ignore',
multiline: 'always' | 'never' | 'consistent' | 'ignore',
maxEmptyLines: 0
},
script: {
singleline: 'always' | 'never' | 'consistent' | 'ignore',
multiline: 'always' | 'never' | 'consistent' | 'ignore',
maxEmptyLines: 0
},
'my-block': {
singleline: 'always' | 'never' | 'consistent' | 'ignore',
multiline: 'always' | 'never' | 'consistent' | 'ignore',
maxEmptyLines: 0
}
}
}
],
'vue/singleline-html-element-content-newline': [
'error',
{
ignoreWhenNoAttributes: true,
ignoreWhenEmpty: true,
ignores: ['pre', 'textarea']
}
],
'vue/html-indent': [
'error',
{
attribute: 1,
baseIndent: 1,
closeBracket: 0,
alignAttributesVertically: true,
ignores: []
}
],
'vue/max-attributes-per-line': [
'error',
{
singleline: {
max: 1
},
multiline: {
max: 1
}
}
],
'vue/multiline-html-element-content-newline': [
'error',
{
ignoreWhenEmpty: true,
ignores: ['pre', 'textarea'],
allowEmptyLines: false
}
],
'vue/html-self-closing': [
'error',
{
html: {
void: 'never',
normal: 'always',
component: 'always'
},
svg: 'always',
math: 'always'
}
],
// <some-component /> becomes <SomeComponent />
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
{
registeredComponentsOnly: false,
ignores: []
}
],
// Enforce PascalCase for component names in templates.
'vue/attributes-order': [
'error',
{
order: [
'DEFINITION',
'LIST_RENDERING',
'CONDITIONALS',
'RENDER_MODIFIERS',
'GLOBAL',
['UNIQUE', 'SLOT'],
'TWO_WAY_BINDING',
'ATTR_DYNAMIC',
'OTHER_DIRECTIVES',
['ATTR_STATIC', 'ATTR_SHORTHAND_BOOL'],
'EVENTS',
'CONTENT'
],
alphabetical: true
}
],
// Enforce a specific order for Vue component attributes.
'vue/multi-word-component-names': 'off',
// Allow multi-word component names.
'no-irregular-whitespace': 'off'
// Allow irregular whitespace characters.
}
}