@useinsider/eslint-config 1.0.0-beta.1 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/rules/core.cjs +5 -0
- package/src/rules/stylistic.cjs +4 -0
- package/src/rules/typescript.cjs +1 -11
- package/src/rules/vue.cjs +161 -175
- package/src/typescript/index.cjs +2 -0
- package/src/typescript-dom/README.md +21 -0
- package/src/typescript-dom/index.cjs +2 -1
- package/src/vue3-typescript/index.cjs +16 -0
package/package.json
CHANGED
package/src/rules/core.cjs
CHANGED
|
@@ -13,9 +13,13 @@ module.exports = {
|
|
|
13
13
|
'guard-for-in': 'error',
|
|
14
14
|
'handle-callback-err': ['error'],
|
|
15
15
|
'import/extensions': ['error', {
|
|
16
|
+
css: 'always',
|
|
16
17
|
js: 'never',
|
|
17
18
|
json: 'always',
|
|
18
19
|
jsx: 'never',
|
|
20
|
+
sass: 'always',
|
|
21
|
+
scss: 'always',
|
|
22
|
+
svg: 'always',
|
|
19
23
|
ts: 'never',
|
|
20
24
|
tsx: 'never',
|
|
21
25
|
vue: 'always',
|
|
@@ -64,6 +68,7 @@ module.exports = {
|
|
|
64
68
|
}],
|
|
65
69
|
'no-invalid-regexp': ['error'],
|
|
66
70
|
'no-iterator': ['error'],
|
|
71
|
+
'no-mixed-operators': 'off',
|
|
67
72
|
'no-multi-str': ['error'],
|
|
68
73
|
'no-native-reassign': 'error',
|
|
69
74
|
'no-nested-ternary': ['error'],
|
package/src/rules/stylistic.cjs
CHANGED
|
@@ -24,6 +24,10 @@ module.exports = {
|
|
|
24
24
|
'@stylistic/implicit-arrow-linebreak': ['error', 'beside'],
|
|
25
25
|
'@stylistic/indent': ['error', 4, {
|
|
26
26
|
SwitchCase: 1,
|
|
27
|
+
ignoredNodes: [
|
|
28
|
+
'PropertyDefinition[decorators]',
|
|
29
|
+
'TSUnionType',
|
|
30
|
+
],
|
|
27
31
|
}],
|
|
28
32
|
'@stylistic/key-spacing': ['error'],
|
|
29
33
|
'@stylistic/keyword-spacing': ['error'],
|
package/src/rules/typescript.cjs
CHANGED
|
@@ -24,13 +24,7 @@ module.exports = {
|
|
|
24
24
|
'no-useless-constructor': 'off',
|
|
25
25
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
26
26
|
'@typescript-eslint/array-type': ['error', { default: 'array', readonly: 'array' }],
|
|
27
|
-
'@typescript-eslint/indent':
|
|
28
|
-
SwitchCase: 1,
|
|
29
|
-
ignoredNodes: [
|
|
30
|
-
'PropertyDefinition[decorators]',
|
|
31
|
-
'TSUnionType',
|
|
32
|
-
],
|
|
33
|
-
}],
|
|
27
|
+
'@typescript-eslint/indent': 'off',
|
|
34
28
|
semi: 'off',
|
|
35
29
|
'@typescript-eslint/semi': ['error', 'always'],
|
|
36
30
|
'@typescript-eslint/no-misused-promises': ['error', {
|
|
@@ -42,9 +36,5 @@ module.exports = {
|
|
|
42
36
|
'@typescript-eslint/lines-between-class-members': ['error', 'always', {
|
|
43
37
|
exceptAfterSingleLine: true,
|
|
44
38
|
}],
|
|
45
|
-
|
|
46
|
-
// TODO enable after SD-80950
|
|
47
|
-
'@typescript-eslint/no-empty-function': 'off',
|
|
48
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
49
39
|
},
|
|
50
40
|
};
|
package/src/rules/vue.cjs
CHANGED
|
@@ -1,180 +1,166 @@
|
|
|
1
|
-
/** @type {import("eslint").Linter.RulesRecord} */
|
|
2
|
-
const vueRules = {
|
|
3
|
-
'vue/array-bracket-newline': ['error'],
|
|
4
|
-
'vue/array-bracket-spacing': ['error', 'never'],
|
|
5
|
-
'vue/arrow-spacing': ['error'],
|
|
6
|
-
'vue/attribute-hyphenation': ['error', 'always'],
|
|
7
|
-
'vue/attributes-order': ['error', {
|
|
8
|
-
alphabetical: false,
|
|
9
|
-
order: [
|
|
10
|
-
'DEFINITION',
|
|
11
|
-
'LIST_RENDERING',
|
|
12
|
-
'CONDITIONALS',
|
|
13
|
-
'RENDER_MODIFIERS',
|
|
14
|
-
'GLOBAL',
|
|
15
|
-
'UNIQUE',
|
|
16
|
-
'TWO_WAY_BINDING',
|
|
17
|
-
'OTHER_DIRECTIVES',
|
|
18
|
-
'OTHER_ATTR',
|
|
19
|
-
'EVENTS',
|
|
20
|
-
'CONTENT',
|
|
21
|
-
],
|
|
22
|
-
}],
|
|
23
|
-
'vue/brace-style': ['error', '1tbs'],
|
|
24
|
-
'vue/comma-dangle': ['error', {
|
|
25
|
-
arrays: 'always-multiline',
|
|
26
|
-
exports: 'always-multiline',
|
|
27
|
-
functions: 'never',
|
|
28
|
-
imports: 'always-multiline',
|
|
29
|
-
objects: 'always-multiline',
|
|
30
|
-
}],
|
|
31
|
-
'vue/comma-spacing': ['error'],
|
|
32
|
-
'vue/comma-style': ['error', 'last'],
|
|
33
|
-
'vue/component-definition-name-casing': ['error', 'PascalCase'],
|
|
34
|
-
'vue/component-name-in-template-casing': ['error', 'PascalCase', {
|
|
35
|
-
registeredComponentsOnly: false,
|
|
36
|
-
ignores: [
|
|
37
|
-
'component',
|
|
38
|
-
'transition',
|
|
39
|
-
],
|
|
40
|
-
}],
|
|
41
|
-
'vue/component-tags-order': ['error', {
|
|
42
|
-
order: [
|
|
43
|
-
'script[setup]',
|
|
44
|
-
'template',
|
|
45
|
-
'script:not([setup])',
|
|
46
|
-
'style',
|
|
47
|
-
],
|
|
48
|
-
}],
|
|
49
|
-
'vue/dot-location': ['error'],
|
|
50
|
-
'vue/dot-notation': ['error'],
|
|
51
|
-
'vue/eqeqeq': ['error'],
|
|
52
|
-
'vue/func-call-spacing': ['error'],
|
|
53
|
-
'vue/html-closing-bracket-newline': ['error', {
|
|
54
|
-
multiline: 'never',
|
|
55
|
-
singleline: 'never',
|
|
56
|
-
}],
|
|
57
|
-
'vue/html-end-tags': ['error'],
|
|
58
|
-
'vue/html-indent': ['error', 4],
|
|
59
|
-
'vue/html-quotes': ['error', 'double'],
|
|
60
|
-
'vue/html-self-closing': ['error'],
|
|
61
|
-
'vue/html-closing-bracket-spacing': ['error'],
|
|
62
|
-
'vue/key-spacing': ['error'],
|
|
63
|
-
'vue/keyword-spacing': ['error'],
|
|
64
|
-
'vue/max-attributes-per-line': ['error', {
|
|
65
|
-
multiline: {
|
|
66
|
-
max: 1,
|
|
67
|
-
},
|
|
68
|
-
singleline: 1,
|
|
69
|
-
}],
|
|
70
|
-
'vue/max-len': ['error', 120, {
|
|
71
|
-
ignoreComments: true,
|
|
72
|
-
ignoreRegExpLiterals: true,
|
|
73
|
-
ignoreTemplateLiterals: true,
|
|
74
|
-
ignoreTrailingComments: true,
|
|
75
|
-
ignoreUrls: true,
|
|
76
|
-
}],
|
|
77
|
-
'vue/multi-word-component-names': 'off',
|
|
78
|
-
'vue/mustache-interpolation-spacing': ['error', 'always'],
|
|
79
|
-
'vue/no-bare-strings-in-template': ['error'],
|
|
80
|
-
'vue/no-constant-condition': ['error'],
|
|
81
|
-
'vue/no-empty-component-block': ['error'],
|
|
82
|
-
'vue/no-empty-pattern': ['error'],
|
|
83
|
-
'vue/no-extra-parens': ['error'],
|
|
84
|
-
'vue/no-irregular-whitespace': ['error'],
|
|
85
|
-
'vue/no-multi-spaces': ['error'],
|
|
86
|
-
'vue/no-multiple-objects-in-class': ['error'],
|
|
87
|
-
'vue/no-potential-component-option-typo': ['error'],
|
|
88
|
-
'vue/no-reserved-component-names': ['error'],
|
|
89
|
-
'vue/no-restricted-syntax': ['error'],
|
|
90
|
-
'vue/no-spaces-around-equal-signs-in-attribute': ['error'],
|
|
91
|
-
'vue/no-sparse-arrays': ['error'],
|
|
92
|
-
'vue/no-undef-components': ['error'],
|
|
93
|
-
'vue/no-unsupported-features': ['error'],
|
|
94
|
-
'vue/no-unused-properties': ['error'],
|
|
95
|
-
'vue/no-unused-refs': ['error'],
|
|
96
|
-
'vue/no-use-computed-property-like-method': ['error'],
|
|
97
|
-
'vue/no-use-v-if-with-v-for': 'error',
|
|
98
|
-
'vue/no-useless-concat': ['error'],
|
|
99
|
-
'vue/no-useless-mustaches': ['error'],
|
|
100
|
-
'vue/no-useless-v-bind': ['error'],
|
|
101
|
-
'vue/no-v-text': ['error'],
|
|
102
|
-
'vue/object-curly-newline': ['error', {
|
|
103
|
-
consistent: true,
|
|
104
|
-
}],
|
|
105
|
-
'vue/object-curly-spacing': ['error', 'always'],
|
|
106
|
-
'vue/object-property-newline': ['error', {
|
|
107
|
-
allowAllPropertiesOnSameLine: true,
|
|
108
|
-
}],
|
|
109
|
-
'vue/object-shorthand': ['error', 'always'],
|
|
110
|
-
'vue/order-in-components': ['error', {
|
|
111
|
-
order: [
|
|
112
|
-
'el',
|
|
113
|
-
'name',
|
|
114
|
-
'parent',
|
|
115
|
-
'functional',
|
|
116
|
-
['delimiters', 'comments'],
|
|
117
|
-
['components', 'directives', 'filters'],
|
|
118
|
-
'extends',
|
|
119
|
-
'mixins',
|
|
120
|
-
'inheritAttrs',
|
|
121
|
-
'model',
|
|
122
|
-
['props', 'propsData'],
|
|
123
|
-
'data',
|
|
124
|
-
'computed',
|
|
125
|
-
'watch',
|
|
126
|
-
'LIFECYCLE_HOOKS',
|
|
127
|
-
'methods',
|
|
128
|
-
['template', 'render'],
|
|
129
|
-
'renderError',
|
|
130
|
-
],
|
|
131
|
-
}],
|
|
132
|
-
'vue/padding-line-between-blocks': ['error'],
|
|
133
|
-
'vue/prefer-separate-static-class': ['error'],
|
|
134
|
-
'vue/prefer-template': ['error'],
|
|
135
|
-
'vue/prefer-true-attribute-shorthand': ['error'],
|
|
136
|
-
'vue/prop-name-casing': ['error', 'camelCase'],
|
|
137
|
-
'vue/quote-props': ['error', 'as-needed'],
|
|
138
|
-
'vue/require-default-prop': ['error'],
|
|
139
|
-
'vue/require-prop-type-constructor': 'error',
|
|
140
|
-
'vue/require-prop-types': ['error'],
|
|
141
|
-
'vue/script-indent': ['error', 4, {
|
|
142
|
-
switchCase: 1,
|
|
143
|
-
}],
|
|
144
|
-
'vue/space-in-parens': ['error', 'never'],
|
|
145
|
-
'vue/space-infix-ops': ['error'],
|
|
146
|
-
'vue/space-unary-ops': ['error'],
|
|
147
|
-
'vue/template-curly-spacing': ['error'],
|
|
148
|
-
'vue/this-in-template': ['error', 'never'],
|
|
149
|
-
'vue/v-bind-style': ['error', 'shorthand'],
|
|
150
|
-
'vue/v-on-function-call': 'off',
|
|
151
|
-
'vue/v-on-style': ['error', 'shorthand'],
|
|
152
|
-
'vue/v-on-event-hyphenation': 'off',
|
|
153
|
-
'vue/no-setup-props-destructure': 'off',
|
|
154
|
-
'vue/block-tag-newline': ['error', {
|
|
155
|
-
singleline: 'always',
|
|
156
|
-
multiline: 'always',
|
|
157
|
-
}],
|
|
158
|
-
'vue/require-explicit-emits': ['error'],
|
|
159
|
-
'vue/no-required-prop-with-default': ['error'],
|
|
160
|
-
'vue/no-ref-object-destructure': ['error'],
|
|
161
|
-
'vue/no-template-target-blank': ['error'],
|
|
162
|
-
'vue/define-emits-declaration': ['error', 'type-based'],
|
|
163
|
-
'vue/define-props-declaration': ['error', 'type-based'],
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
// Following rules will be refactored within SD-71639
|
|
167
|
-
const vueCSSRules = {
|
|
168
|
-
'vue-scoped-css/enforce-style-type': 'off',
|
|
169
|
-
'vue-scoped-css/require-v-deep-argument': 'off',
|
|
170
|
-
'vue-scoped-css/no-unused-selector': 'off',
|
|
171
|
-
'vue-scoped-css/no-deprecated-deep-combinator': ['error'],
|
|
172
|
-
};
|
|
173
|
-
|
|
174
1
|
/** @type {import("eslint").Linter.Config} */
|
|
175
2
|
module.exports = {
|
|
176
3
|
rules: {
|
|
177
|
-
|
|
178
|
-
|
|
4
|
+
'vue/array-bracket-newline': ['error'],
|
|
5
|
+
'vue/array-bracket-spacing': ['error', 'never'],
|
|
6
|
+
'vue/arrow-spacing': ['error'],
|
|
7
|
+
'vue/attribute-hyphenation': ['error', 'always'],
|
|
8
|
+
'vue/attributes-order': ['error', {
|
|
9
|
+
alphabetical: false,
|
|
10
|
+
order: [
|
|
11
|
+
'DEFINITION',
|
|
12
|
+
'LIST_RENDERING',
|
|
13
|
+
'CONDITIONALS',
|
|
14
|
+
'RENDER_MODIFIERS',
|
|
15
|
+
'GLOBAL',
|
|
16
|
+
'UNIQUE',
|
|
17
|
+
'TWO_WAY_BINDING',
|
|
18
|
+
'OTHER_DIRECTIVES',
|
|
19
|
+
'OTHER_ATTR',
|
|
20
|
+
'EVENTS',
|
|
21
|
+
'CONTENT',
|
|
22
|
+
],
|
|
23
|
+
}],
|
|
24
|
+
'vue/brace-style': ['error', '1tbs'],
|
|
25
|
+
'vue/comma-dangle': ['error', {
|
|
26
|
+
arrays: 'always-multiline',
|
|
27
|
+
exports: 'always-multiline',
|
|
28
|
+
functions: 'never',
|
|
29
|
+
imports: 'always-multiline',
|
|
30
|
+
objects: 'always-multiline',
|
|
31
|
+
}],
|
|
32
|
+
'vue/comma-spacing': ['error'],
|
|
33
|
+
'vue/comma-style': ['error', 'last'],
|
|
34
|
+
'vue/component-definition-name-casing': ['error', 'PascalCase'],
|
|
35
|
+
'vue/component-name-in-template-casing': ['error', 'PascalCase', {
|
|
36
|
+
registeredComponentsOnly: false,
|
|
37
|
+
ignores: [
|
|
38
|
+
'component',
|
|
39
|
+
'transition',
|
|
40
|
+
],
|
|
41
|
+
}],
|
|
42
|
+
'vue/component-tags-order': ['error', {
|
|
43
|
+
order: [
|
|
44
|
+
'script[setup]',
|
|
45
|
+
'template',
|
|
46
|
+
'script:not([setup])',
|
|
47
|
+
'style',
|
|
48
|
+
],
|
|
49
|
+
}],
|
|
50
|
+
'vue/dot-location': ['error'],
|
|
51
|
+
'vue/dot-notation': ['error'],
|
|
52
|
+
'vue/eqeqeq': ['error'],
|
|
53
|
+
'vue/func-call-spacing': ['error'],
|
|
54
|
+
'vue/html-closing-bracket-newline': ['error', {
|
|
55
|
+
multiline: 'never',
|
|
56
|
+
singleline: 'never',
|
|
57
|
+
}],
|
|
58
|
+
'vue/html-end-tags': ['error'],
|
|
59
|
+
'vue/html-indent': ['error', 4],
|
|
60
|
+
'vue/html-quotes': ['error', 'double'],
|
|
61
|
+
'vue/html-self-closing': ['error'],
|
|
62
|
+
'vue/html-closing-bracket-spacing': ['error'],
|
|
63
|
+
'vue/key-spacing': ['error'],
|
|
64
|
+
'vue/keyword-spacing': ['error'],
|
|
65
|
+
'vue/max-attributes-per-line': ['error', {
|
|
66
|
+
multiline: {
|
|
67
|
+
max: 1,
|
|
68
|
+
},
|
|
69
|
+
singleline: 1,
|
|
70
|
+
}],
|
|
71
|
+
'vue/max-len': ['error', 120, {
|
|
72
|
+
ignoreComments: true,
|
|
73
|
+
ignoreRegExpLiterals: true,
|
|
74
|
+
ignoreTemplateLiterals: true,
|
|
75
|
+
ignoreTrailingComments: true,
|
|
76
|
+
ignoreUrls: true,
|
|
77
|
+
}],
|
|
78
|
+
'vue/multi-word-component-names': 'off',
|
|
79
|
+
'vue/mustache-interpolation-spacing': ['error', 'always'],
|
|
80
|
+
'vue/no-bare-strings-in-template': ['error'],
|
|
81
|
+
'vue/no-constant-condition': ['error'],
|
|
82
|
+
'vue/no-empty-component-block': ['error'],
|
|
83
|
+
'vue/no-empty-pattern': ['error'],
|
|
84
|
+
'vue/no-extra-parens': ['error'],
|
|
85
|
+
'vue/no-irregular-whitespace': ['error'],
|
|
86
|
+
'vue/no-multi-spaces': ['error'],
|
|
87
|
+
'vue/no-multiple-objects-in-class': ['error'],
|
|
88
|
+
'vue/no-potential-component-option-typo': ['error'],
|
|
89
|
+
'vue/no-reserved-component-names': ['error'],
|
|
90
|
+
'vue/no-restricted-syntax': ['error'],
|
|
91
|
+
'vue/no-spaces-around-equal-signs-in-attribute': ['error'],
|
|
92
|
+
'vue/no-sparse-arrays': ['error'],
|
|
93
|
+
'vue/no-undef-components': ['error'],
|
|
94
|
+
'vue/no-unsupported-features': ['error'],
|
|
95
|
+
'vue/no-unused-properties': ['error'],
|
|
96
|
+
'vue/no-unused-refs': ['error'],
|
|
97
|
+
'vue/no-use-computed-property-like-method': ['error'],
|
|
98
|
+
'vue/no-use-v-if-with-v-for': 'error',
|
|
99
|
+
'vue/no-useless-concat': ['error'],
|
|
100
|
+
'vue/no-useless-mustaches': ['error'],
|
|
101
|
+
'vue/no-useless-v-bind': ['error'],
|
|
102
|
+
'vue/no-v-text': ['error'],
|
|
103
|
+
'vue/object-curly-newline': ['error', {
|
|
104
|
+
consistent: true,
|
|
105
|
+
}],
|
|
106
|
+
'vue/object-curly-spacing': ['error', 'always'],
|
|
107
|
+
'vue/object-property-newline': ['error', {
|
|
108
|
+
allowAllPropertiesOnSameLine: true,
|
|
109
|
+
}],
|
|
110
|
+
'vue/object-shorthand': ['error', 'always'],
|
|
111
|
+
'vue/order-in-components': ['error', {
|
|
112
|
+
order: [
|
|
113
|
+
'el',
|
|
114
|
+
'name',
|
|
115
|
+
'parent',
|
|
116
|
+
'functional',
|
|
117
|
+
['delimiters', 'comments'],
|
|
118
|
+
['components', 'directives', 'filters'],
|
|
119
|
+
'extends',
|
|
120
|
+
'mixins',
|
|
121
|
+
'inheritAttrs',
|
|
122
|
+
'model',
|
|
123
|
+
['props', 'propsData'],
|
|
124
|
+
'data',
|
|
125
|
+
'computed',
|
|
126
|
+
'watch',
|
|
127
|
+
'LIFECYCLE_HOOKS',
|
|
128
|
+
'methods',
|
|
129
|
+
['template', 'render'],
|
|
130
|
+
'renderError',
|
|
131
|
+
],
|
|
132
|
+
}],
|
|
133
|
+
'vue/padding-line-between-blocks': ['error'],
|
|
134
|
+
'vue/prefer-separate-static-class': ['error'],
|
|
135
|
+
'vue/prefer-template': ['error'],
|
|
136
|
+
'vue/prefer-true-attribute-shorthand': ['error'],
|
|
137
|
+
'vue/prop-name-casing': ['error', 'camelCase'],
|
|
138
|
+
'vue/quote-props': ['error', 'as-needed'],
|
|
139
|
+
'vue/require-default-prop': ['error'],
|
|
140
|
+
'vue/require-prop-type-constructor': 'error',
|
|
141
|
+
'vue/require-prop-types': ['error'],
|
|
142
|
+
'vue/script-indent': ['error', 4, {
|
|
143
|
+
switchCase: 1,
|
|
144
|
+
}],
|
|
145
|
+
'vue/space-in-parens': ['error', 'never'],
|
|
146
|
+
'vue/space-infix-ops': ['error'],
|
|
147
|
+
'vue/space-unary-ops': ['error'],
|
|
148
|
+
'vue/template-curly-spacing': ['error'],
|
|
149
|
+
'vue/this-in-template': ['error', 'never'],
|
|
150
|
+
'vue/v-bind-style': ['error', 'shorthand'],
|
|
151
|
+
'vue/v-on-function-call': 'off',
|
|
152
|
+
'vue/v-on-style': ['error', 'shorthand'],
|
|
153
|
+
'vue/v-on-event-hyphenation': 'off',
|
|
154
|
+
'vue/no-setup-props-destructure': 'off',
|
|
155
|
+
'vue/block-tag-newline': ['error', {
|
|
156
|
+
singleline: 'always',
|
|
157
|
+
multiline: 'always',
|
|
158
|
+
}],
|
|
159
|
+
'vue/require-explicit-emits': ['error'],
|
|
160
|
+
'vue/no-required-prop-with-default': ['error'],
|
|
161
|
+
'vue/no-ref-object-destructure': ['error'],
|
|
162
|
+
'vue/no-template-target-blank': ['error'],
|
|
163
|
+
'vue/define-emits-declaration': ['error', 'type-based'],
|
|
164
|
+
'vue/define-props-declaration': ['error', 'type-based'],
|
|
179
165
|
},
|
|
180
166
|
};
|
package/src/typescript/index.cjs
CHANGED
|
@@ -62,3 +62,24 @@ module.exports = {
|
|
|
62
62
|
],
|
|
63
63
|
};
|
|
64
64
|
```
|
|
65
|
+
|
|
66
|
+
### Vue Extension Configuration
|
|
67
|
+
|
|
68
|
+
To properly lint `.vue` files imported within `.ts` files, it's essential to
|
|
69
|
+
update the `parserOptions` in your ESLint configuration. This adjustment helps
|
|
70
|
+
prevent ESLint errors that may arise due to the import of Vue components. Add
|
|
71
|
+
the following configuration to your `.eslintrc` file:
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
{
|
|
75
|
+
// Existing configuration...
|
|
76
|
+
parserOptions: {
|
|
77
|
+
// Other existing parser options...
|
|
78
|
+
extraFileExtensions: ['.vue'], // Add this line
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
This change ensures that ESLint correctly processes .vue files alongside
|
|
84
|
+
TypeScript files, maintaining consistent code quality and style across your
|
|
85
|
+
project.
|
|
@@ -26,12 +26,13 @@ module.exports = {
|
|
|
26
26
|
ecmaFeatures: {
|
|
27
27
|
jsx: true,
|
|
28
28
|
},
|
|
29
|
-
extraFileExtensions: ['.vue'],
|
|
30
29
|
},
|
|
31
30
|
rules: {
|
|
32
31
|
'jsdoc/require-param': 'off',
|
|
33
32
|
'jsdoc/require-jsdoc': 'off',
|
|
34
33
|
'jsdoc/require-returns': 'off',
|
|
34
|
+
'jsdoc/require-param-type': 'off',
|
|
35
|
+
'jsdoc/check-param-names': 'off',
|
|
35
36
|
},
|
|
36
37
|
settings: {
|
|
37
38
|
jsdoc: {
|
|
@@ -30,4 +30,20 @@ module.exports = {
|
|
|
30
30
|
},
|
|
31
31
|
extraFileExtensions: ['.vue'],
|
|
32
32
|
},
|
|
33
|
+
rules: {
|
|
34
|
+
'jsdoc/require-param': 'off',
|
|
35
|
+
'jsdoc/require-jsdoc': 'off',
|
|
36
|
+
'jsdoc/require-returns': 'off',
|
|
37
|
+
'jsdoc/require-param-type': 'off',
|
|
38
|
+
'jsdoc/check-param-names': 'off',
|
|
39
|
+
},
|
|
40
|
+
settings: {
|
|
41
|
+
jsdoc: {
|
|
42
|
+
mode: 'typescript',
|
|
43
|
+
tagNamePreference: {
|
|
44
|
+
callback: 'watch',
|
|
45
|
+
desc: 'use',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
33
49
|
};
|