@alicevia/eslint-config-vue 1.0.19 → 1.0.21
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +88 -9
- package/package.json +1 -1
package/index.js
CHANGED
@@ -6,19 +6,90 @@ module.exports = {
|
|
6
6
|
},
|
7
7
|
extends: [
|
8
8
|
'eslint:recommended',
|
9
|
-
'plugin:vue/vue3-
|
9
|
+
'plugin:vue/vue3-recommended',
|
10
10
|
'plugin:@typescript-eslint/recommended',
|
11
11
|
],
|
12
12
|
overrides: [
|
13
13
|
{
|
14
14
|
files: ['*.vue'],
|
15
15
|
rules: {
|
16
|
-
'vue/
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
'vue/v-on-event-hyphenation': 0,
|
17
|
+
'vue/attribute-hyphenation': 0,
|
18
|
+
'vue/max-attributes-per-line': 'off',
|
19
|
+
'vue/no-v-html': 'off',
|
20
|
+
'vue/require-prop-types': 'off',
|
21
|
+
'vue/require-default-prop': 'off',
|
22
|
+
'vue/multi-word-component-names': 'off',
|
23
|
+
'vue/prefer-import-from-vue': 'off',
|
24
|
+
|
25
|
+
// reactivity transform
|
26
|
+
'vue/no-setup-props-destructure': 'off',
|
27
|
+
'vue/block-tag-newline': ['error', {
|
28
|
+
singleline: 'always',
|
29
|
+
multiline: 'always',
|
30
|
+
}],
|
31
|
+
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
|
32
|
+
'vue/component-options-name-casing': ['error', 'PascalCase'],
|
33
|
+
'vue/custom-event-name-casing': ['error', 'camelCase'],
|
34
|
+
'vue/define-macros-order': ['error', {
|
35
|
+
order: ['defineProps', 'defineEmits'],
|
36
|
+
}],
|
37
|
+
'vue/html-comment-content-spacing': ['error', 'always', {
|
38
|
+
exceptions: ['-'],
|
39
|
+
}],
|
40
|
+
'vue/no-restricted-v-bind': ['error', '/^v-/'],
|
41
|
+
'vue/no-useless-v-bind': 'error',
|
42
|
+
'vue/no-v-text-v-html-on-component': 'error',
|
43
|
+
'vue/padding-line-between-blocks': ['error', 'always'],
|
44
|
+
'vue/prefer-separate-static-class': 'error',
|
45
|
+
'vue/html-self-closing': ['error', {
|
46
|
+
html: {
|
47
|
+
void: 'never',
|
48
|
+
normal: 'never',
|
49
|
+
component: 'never',
|
20
50
|
},
|
21
|
-
|
51
|
+
svg: 'always',
|
52
|
+
math: 'always',
|
53
|
+
}],
|
54
|
+
// // extensions
|
55
|
+
// 'vue/array-bracket-spacing': ['error', 'never'],
|
56
|
+
// 'vue/arrow-spacing': ['error', { before: true, after: true }],
|
57
|
+
// 'vue/block-spacing': ['error', 'always'],
|
58
|
+
// 'vue/brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
|
59
|
+
// 'vue/comma-dangle': ['error', 'always-multiline'],
|
60
|
+
// 'vue/comma-style': ['error', 'last'],
|
61
|
+
// 'vue/dot-location': ['error', 'property'],
|
62
|
+
// 'vue/dot-notation': ['error', { allowKeywords: true }],
|
63
|
+
// 'vue/eqeqeq': ['error', 'smart'],
|
64
|
+
// // 'vue/func-call-spacing': ['off', 'never'],
|
65
|
+
// 'vue/no-constant-condition': 'warn',
|
66
|
+
// 'vue/no-empty-pattern': 'error',
|
67
|
+
// 'vue/no-extra-parens': ['error', 'functions'],
|
68
|
+
// 'vue/no-irregular-whitespace': 'error',
|
69
|
+
// 'vue/no-loss-of-precision': 'error',
|
70
|
+
// 'vue/no-restricted-syntax': [
|
71
|
+
// 'error',
|
72
|
+
// 'DebuggerStatement',
|
73
|
+
// 'LabeledStatement',
|
74
|
+
// 'WithStatement',
|
75
|
+
// ],
|
76
|
+
// 'vue/no-sparse-arrays': 'error',
|
77
|
+
// 'vue/object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }],
|
78
|
+
// 'vue/object-shorthand': [
|
79
|
+
// 'error',
|
80
|
+
// 'always',
|
81
|
+
// {
|
82
|
+
// ignoreConstructors: false,
|
83
|
+
// avoidQuotes: true,
|
84
|
+
// },
|
85
|
+
// ],
|
86
|
+
// 'vue/operator-linebreak': ['error', 'before'],
|
87
|
+
// 'vue/prefer-template': 'error',
|
88
|
+
// 'vue/quote-props': ['error', 'consistent-as-needed'],
|
89
|
+
// 'vue/space-in-parens': ['error', 'never'],
|
90
|
+
// 'vue/space-infix-ops': 'error',
|
91
|
+
// 'vue/space-unary-ops': ['error', { words: true, nonwords: false }],
|
92
|
+
// 'vue/template-curly-spacing': 'error',
|
22
93
|
},
|
23
94
|
},
|
24
95
|
],
|
@@ -33,17 +104,25 @@ module.exports = {
|
|
33
104
|
'@typescript-eslint',
|
34
105
|
],
|
35
106
|
rules: {
|
36
|
-
quotes: ['error', 'single'],
|
107
|
+
quotes: ['error', 'single', { allowTemplateLiterals: true }],
|
37
108
|
'quote-props': ['error', 'as-needed'],
|
38
109
|
indent: ['error', 2],
|
39
110
|
semi: ['error', 'never'],
|
40
111
|
'comma-dangle': ['error', 'always-multiline'],
|
41
112
|
'comma-spacing': ['error', { before: false, after: true }],
|
42
113
|
'space-before-function-paren': ['error', 'always'],
|
43
|
-
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0,maxBOF: 0 }],
|
114
|
+
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0, maxBOF: 0 }],
|
44
115
|
'key-spacing': ['error', { mode: 'strict' }],
|
45
|
-
'arrow-spacing': ['error',{ before: true, after: true }],
|
116
|
+
'arrow-spacing': ['error', { before: true, after: true }],
|
46
117
|
'object-curly-spacing': ['error', 'always'],
|
47
118
|
'no-console': ['error', { allow: ['warn', 'error'] }],
|
119
|
+
|
120
|
+
},
|
121
|
+
globals: {
|
122
|
+
__dirname: true,
|
123
|
+
process: true,
|
124
|
+
defineProps: true,
|
125
|
+
defineEmits: true,
|
126
|
+
defineExpose: true,
|
48
127
|
},
|
49
128
|
}
|