@vue-jsx-vapor/eslint 2.3.0 → 2.3.1
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/dist/index.cjs +523 -597
- package/dist/index.d.cts +34 -39
- package/dist/index.d.ts +34 -39
- package/dist/index.js +496 -597
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,634 +1,533 @@
|
|
|
1
|
-
// src/rules/define-style/index.ts
|
|
2
1
|
import prettier from "@prettier/sync";
|
|
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
|
-
node: arg,
|
|
60
|
-
messageId: "define-style",
|
|
61
|
-
fix(fixer) {
|
|
62
|
-
return fixer.replaceTextRange(
|
|
63
|
-
[arg.range[0] + 1, arg.range[1] - 1],
|
|
64
|
-
result
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
}
|
|
2
|
+
|
|
3
|
+
//#region src/rules/define-style/index.ts
|
|
4
|
+
const rule$1 = {
|
|
5
|
+
defaultOptions: [{ tabWidth: 2 }],
|
|
6
|
+
meta: {
|
|
7
|
+
type: "layout",
|
|
8
|
+
docs: { description: "Enforce consistent formatting in defineStyle CSS" },
|
|
9
|
+
fixable: "code",
|
|
10
|
+
messages: {
|
|
11
|
+
"define-style": "Style in defineStyle should be properly formatted",
|
|
12
|
+
"define-style-syntax-error": "Syntax error in defineStyle"
|
|
13
|
+
},
|
|
14
|
+
schema: [{
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: { tabWidth: {
|
|
17
|
+
type: "number",
|
|
18
|
+
default: 2
|
|
19
|
+
} }
|
|
20
|
+
}]
|
|
21
|
+
},
|
|
22
|
+
create(context) {
|
|
23
|
+
const configuration = context.options[0] || {};
|
|
24
|
+
const tabWidth = configuration.tabWidth || 2;
|
|
25
|
+
return { CallExpression(node) {
|
|
26
|
+
const callee = node.callee.type === "MemberExpression" ? node.callee.object : node.callee;
|
|
27
|
+
const offset = callee.loc.start.column;
|
|
28
|
+
const parser = node.callee.type === "MemberExpression" && node.callee.property.type === "Identifier" ? node.callee.property.name : "css";
|
|
29
|
+
if (callee.type === "Identifier" && callee.name === "defineStyle") {
|
|
30
|
+
const arg = node.arguments[0];
|
|
31
|
+
if (arg?.type === "TemplateLiteral") {
|
|
32
|
+
const cssRaw = arg.quasis[0].value.raw;
|
|
33
|
+
let formattedCss = "";
|
|
34
|
+
try {
|
|
35
|
+
formattedCss = prettier.format(cssRaw, {
|
|
36
|
+
parser,
|
|
37
|
+
tabWidth
|
|
38
|
+
});
|
|
39
|
+
} catch {
|
|
40
|
+
return context.report({
|
|
41
|
+
node: arg,
|
|
42
|
+
messageId: "define-style-syntax-error"
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const placeholder = " ".repeat(offset + tabWidth);
|
|
46
|
+
const result = `\n${placeholder}${formattedCss.slice(0, -1).replaceAll("\n", `\n${placeholder}`)}\n${" ".repeat(offset)}`;
|
|
47
|
+
if (result !== cssRaw) context.report({
|
|
48
|
+
node: arg,
|
|
49
|
+
messageId: "define-style",
|
|
50
|
+
fix(fixer) {
|
|
51
|
+
return fixer.replaceTextRange([arg.range[0] + 1, arg.range[1] - 1], result);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
} };
|
|
57
|
+
}
|
|
74
58
|
};
|
|
75
|
-
var define_style_default = rule;
|
|
59
|
+
var define_style_default = rule$1;
|
|
76
60
|
|
|
77
|
-
|
|
78
|
-
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/rules/jsx-sort-props/index.ts
|
|
63
|
+
const COMPAT_TAG_REGEX = /^[a-z]/;
|
|
64
|
+
/**
|
|
65
|
+
* Checks if a node represents a DOM element according to React.
|
|
66
|
+
* @param node - JSXOpeningElement to check.
|
|
67
|
+
* @returns Whether or not the node corresponds to a DOM element.
|
|
68
|
+
*/
|
|
79
69
|
function isDOMComponent(node) {
|
|
80
|
-
|
|
81
|
-
|
|
70
|
+
const name = getElementType(node);
|
|
71
|
+
return COMPAT_TAG_REGEX.test(name);
|
|
82
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Returns the name of the prop given the JSXAttribute object.
|
|
75
|
+
*
|
|
76
|
+
* Ported from `jsx-ast-utils/propName` to reduce bundle size
|
|
77
|
+
* @see https://github.com/jsx-eslint/jsx-ast-utils/blob/main/src/propName.js
|
|
78
|
+
*/
|
|
83
79
|
function getPropName(prop) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
);
|
|
88
|
-
if (prop.name.type === "JSXNamespacedName")
|
|
89
|
-
return `${prop.name.namespace.name}:${prop.name.name.name}`;
|
|
90
|
-
return prop.name.name;
|
|
80
|
+
if (!prop.type || prop.type !== "JSXAttribute") throw new Error("The prop must be a JSXAttribute collected by the AST parser.");
|
|
81
|
+
if (prop.name.type === "JSXNamespacedName") return `${prop.name.namespace.name}:${prop.name.name.name}`;
|
|
82
|
+
return prop.name.name;
|
|
91
83
|
}
|
|
92
84
|
function resolveMemberExpressions(object, property) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return `${object.name}.${property.name}`;
|
|
85
|
+
if (object.type === "JSXMemberExpression") return `${resolveMemberExpressions(object.object, object.property)}.${property.name}`;
|
|
86
|
+
return `${object.name}.${property.name}`;
|
|
96
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Returns the tagName associated with a JSXElement.
|
|
90
|
+
*
|
|
91
|
+
* Ported from `jsx-ast-utils/elementType` to reduce bundle size
|
|
92
|
+
* @see https://github.com/jsx-eslint/jsx-ast-utils/blob/main/src/elementType.js
|
|
93
|
+
*/
|
|
97
94
|
function getElementType(node) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return node.name.name;
|
|
95
|
+
if (node.type === "JSXOpeningFragment") return "<>";
|
|
96
|
+
const { name } = node;
|
|
97
|
+
if (!name) throw new Error("The argument provided is not a JSXElement node.");
|
|
98
|
+
if (name.type === "JSXMemberExpression") {
|
|
99
|
+
const { object, property } = name;
|
|
100
|
+
return resolveMemberExpressions(object, property);
|
|
101
|
+
}
|
|
102
|
+
if (name.type === "JSXNamespacedName") return `${name.namespace.name}:${name.name.name}`;
|
|
103
|
+
return node.name.name;
|
|
108
104
|
}
|
|
109
105
|
function isCallbackPropName(name) {
|
|
110
|
-
|
|
106
|
+
return /^on[A-Z]/.test(name);
|
|
111
107
|
}
|
|
112
108
|
function isMultilineProp(node) {
|
|
113
|
-
|
|
109
|
+
return node.loc.start.line !== node.loc.end.line;
|
|
114
110
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
111
|
+
const messages = {
|
|
112
|
+
listIsEmpty: "A customized reserved first list must not be empty",
|
|
113
|
+
listReservedPropsFirst: "Reserved props must be listed before all other props",
|
|
114
|
+
listReservedPropsLast: "Reserved props must be listed after all other props",
|
|
115
|
+
listCallbacksLast: "Callbacks must be listed after all other props",
|
|
116
|
+
listShorthandFirst: "Shorthand props must be listed before all other props",
|
|
117
|
+
listShorthandLast: "Shorthand props must be listed after all other props",
|
|
118
|
+
listMultilineFirst: "Multiline props must be listed before all other props",
|
|
119
|
+
listMultilineLast: "Multiline props must be listed after all other props",
|
|
120
|
+
sortPropsByAlpha: "Props should be sorted alphabetically"
|
|
125
121
|
};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
122
|
+
const RESERVED_PROPS_LIST = [
|
|
123
|
+
"children",
|
|
124
|
+
"dangerouslySetInnerHTML",
|
|
125
|
+
"key",
|
|
126
|
+
"ref"
|
|
131
127
|
];
|
|
132
128
|
function getReservedPropIndex(name, list) {
|
|
133
|
-
|
|
129
|
+
return list.indexOf(name.split(":")[0]);
|
|
134
130
|
}
|
|
135
|
-
|
|
131
|
+
let attributeMap;
|
|
136
132
|
function shouldSortToEnd(node) {
|
|
137
|
-
|
|
138
|
-
|
|
133
|
+
const attr = attributeMap.get(node);
|
|
134
|
+
return !!attr && !!attr.hasComment;
|
|
139
135
|
}
|
|
140
136
|
function contextCompare(a, b, options) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
if (options.locale === "auto") return aProp < bProp ? -1 : 1;
|
|
192
|
-
return aProp.localeCompare(bProp, actualLocale);
|
|
137
|
+
let aProp = getPropName(a);
|
|
138
|
+
let bProp = getPropName(b);
|
|
139
|
+
const aPropWithoutNamespace = aProp.split(":")[0];
|
|
140
|
+
const bPropWithoutNamespace = bProp.split(":")[0];
|
|
141
|
+
const aSortToEnd = shouldSortToEnd(a);
|
|
142
|
+
const bSortToEnd = shouldSortToEnd(b);
|
|
143
|
+
if (aSortToEnd && !bSortToEnd) return 1;
|
|
144
|
+
if (!aSortToEnd && bSortToEnd) return -1;
|
|
145
|
+
if (options.reservedFirst) {
|
|
146
|
+
const aIndex = getReservedPropIndex(aProp, options.reservedList);
|
|
147
|
+
const bIndex = getReservedPropIndex(bProp, options.reservedList);
|
|
148
|
+
if (aIndex > -1 && bIndex === -1) return -1;
|
|
149
|
+
if (aIndex === -1 && bIndex > -1) return 1;
|
|
150
|
+
if (aIndex > -1 && bIndex > -1 && aPropWithoutNamespace !== bPropWithoutNamespace) return aIndex > bIndex ? 1 : -1;
|
|
151
|
+
}
|
|
152
|
+
if (options.reservedLast.length > 0) {
|
|
153
|
+
const aLastIndex = getReservedPropIndex(aProp, options.reservedLast);
|
|
154
|
+
const bLastIndex = getReservedPropIndex(bProp, options.reservedLast);
|
|
155
|
+
if (aLastIndex > -1 && bLastIndex === -1) return 1;
|
|
156
|
+
if (aLastIndex === -1 && bLastIndex > -1) return -1;
|
|
157
|
+
if (aLastIndex > -1 && bLastIndex > -1 && aPropWithoutNamespace !== bPropWithoutNamespace) return aLastIndex > bLastIndex ? 1 : -1;
|
|
158
|
+
}
|
|
159
|
+
if (options.callbacksLast) {
|
|
160
|
+
const aIsCallback = isCallbackPropName(aProp);
|
|
161
|
+
const bIsCallback = isCallbackPropName(bProp);
|
|
162
|
+
if (aIsCallback && !bIsCallback) return 1;
|
|
163
|
+
if (!aIsCallback && bIsCallback) return -1;
|
|
164
|
+
}
|
|
165
|
+
if (options.shorthandFirst || options.shorthandLast) {
|
|
166
|
+
const shorthandSign = options.shorthandFirst ? -1 : 1;
|
|
167
|
+
if (!a.value && b.value) return shorthandSign;
|
|
168
|
+
if (a.value && !b.value) return -shorthandSign;
|
|
169
|
+
}
|
|
170
|
+
if (options.multiline !== "ignore") {
|
|
171
|
+
const multilineSign = options.multiline === "first" ? -1 : 1;
|
|
172
|
+
const aIsMultiline = isMultilineProp(a);
|
|
173
|
+
const bIsMultiline = isMultilineProp(b);
|
|
174
|
+
if (aIsMultiline && !bIsMultiline) return multilineSign;
|
|
175
|
+
if (!aIsMultiline && bIsMultiline) return -multilineSign;
|
|
176
|
+
}
|
|
177
|
+
if (options.noSortAlphabetically) return 0;
|
|
178
|
+
const actualLocale = options.locale === "auto" ? void 0 : options.locale;
|
|
179
|
+
if (options.ignoreCase) {
|
|
180
|
+
aProp = aProp.toLowerCase();
|
|
181
|
+
bProp = bProp.toLowerCase();
|
|
182
|
+
return aProp.localeCompare(bProp, actualLocale);
|
|
183
|
+
}
|
|
184
|
+
if (aProp === bProp) return 0;
|
|
185
|
+
if (options.locale === "auto") return aProp < bProp ? -1 : 1;
|
|
186
|
+
return aProp.localeCompare(bProp, actualLocale);
|
|
193
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* Create an array of arrays where each subarray is composed of attributes
|
|
190
|
+
* that are considered sortable.
|
|
191
|
+
* @param attributes
|
|
192
|
+
* @param context The context of the rule
|
|
193
|
+
*/
|
|
194
194
|
function getGroupsOfSortableAttributes(attributes, context) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
addtoSortableAttributeGroups(attribute);
|
|
267
|
-
i += 1;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
return sortableAttributeGroups;
|
|
195
|
+
const sourceCode = context.sourceCode;
|
|
196
|
+
const sortableAttributeGroups = [];
|
|
197
|
+
let groupCount = 0;
|
|
198
|
+
function addtoSortableAttributeGroups(attribute) {
|
|
199
|
+
sortableAttributeGroups[groupCount - 1].push(attribute);
|
|
200
|
+
}
|
|
201
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
202
|
+
const attribute = attributes[i];
|
|
203
|
+
const nextAttribute = attributes[i + 1];
|
|
204
|
+
const attributeline = attribute.loc.start.line;
|
|
205
|
+
let comment = [];
|
|
206
|
+
try {
|
|
207
|
+
comment = sourceCode.getCommentsAfter(attribute);
|
|
208
|
+
} catch {}
|
|
209
|
+
const lastAttr = attributes[i - 1];
|
|
210
|
+
const attrIsSpread = attribute.type === "JSXSpreadAttribute";
|
|
211
|
+
if (!lastAttr || lastAttr.type === "JSXSpreadAttribute" && !attrIsSpread) {
|
|
212
|
+
groupCount += 1;
|
|
213
|
+
sortableAttributeGroups[groupCount - 1] = [];
|
|
214
|
+
}
|
|
215
|
+
if (!attrIsSpread) if (comment.length === 0) {
|
|
216
|
+
attributeMap.set(attribute, {
|
|
217
|
+
end: attribute.range[1],
|
|
218
|
+
hasComment: false
|
|
219
|
+
});
|
|
220
|
+
addtoSortableAttributeGroups(attribute);
|
|
221
|
+
} else {
|
|
222
|
+
const firstComment = comment[0];
|
|
223
|
+
const commentline = firstComment.loc.start.line;
|
|
224
|
+
if (comment.length === 1) {
|
|
225
|
+
if (attributeline + 1 === commentline && nextAttribute) {
|
|
226
|
+
attributeMap.set(attribute, {
|
|
227
|
+
end: nextAttribute.range[1],
|
|
228
|
+
hasComment: true
|
|
229
|
+
});
|
|
230
|
+
addtoSortableAttributeGroups(attribute);
|
|
231
|
+
i += 1;
|
|
232
|
+
} else if (attributeline === commentline) {
|
|
233
|
+
if (firstComment.type === "Block" && nextAttribute) {
|
|
234
|
+
attributeMap.set(attribute, {
|
|
235
|
+
end: nextAttribute.range[1],
|
|
236
|
+
hasComment: true
|
|
237
|
+
});
|
|
238
|
+
i += 1;
|
|
239
|
+
} else if (firstComment.type === "Block") attributeMap.set(attribute, {
|
|
240
|
+
end: firstComment.range[1],
|
|
241
|
+
hasComment: true
|
|
242
|
+
});
|
|
243
|
+
else attributeMap.set(attribute, {
|
|
244
|
+
end: firstComment.range[1],
|
|
245
|
+
hasComment: false
|
|
246
|
+
});
|
|
247
|
+
addtoSortableAttributeGroups(attribute);
|
|
248
|
+
}
|
|
249
|
+
} else if (comment.length > 1 && attributeline + 1 === comment[1].loc.start.line && nextAttribute) {
|
|
250
|
+
const commentNextAttribute = sourceCode.getCommentsAfter(nextAttribute);
|
|
251
|
+
attributeMap.set(attribute, {
|
|
252
|
+
end: nextAttribute.range[1],
|
|
253
|
+
hasComment: true
|
|
254
|
+
});
|
|
255
|
+
if (commentNextAttribute.length === 1 && nextAttribute.loc.start.line === commentNextAttribute[0].loc.start.line) attributeMap.set(attribute, {
|
|
256
|
+
end: commentNextAttribute[0].range[1],
|
|
257
|
+
hasComment: true
|
|
258
|
+
});
|
|
259
|
+
addtoSortableAttributeGroups(attribute);
|
|
260
|
+
i += 1;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return sortableAttributeGroups;
|
|
273
265
|
}
|
|
274
266
|
function generateFixerFunction(node, context, reservedList) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
const rangeEnd = firstFixer ? firstFixer.range[1] : -0;
|
|
325
|
-
fixers.forEach((fix) => {
|
|
326
|
-
source = `${source.slice(0, fix.range[0])}${fix.text}${source.slice(fix.range[1])}`;
|
|
327
|
-
});
|
|
328
|
-
return fixer.replaceTextRange(
|
|
329
|
-
[rangeStart, rangeEnd],
|
|
330
|
-
source.slice(rangeStart, rangeEnd)
|
|
331
|
-
);
|
|
332
|
-
};
|
|
267
|
+
const sourceCode = context.sourceCode;
|
|
268
|
+
const attributes = node.attributes.slice(0);
|
|
269
|
+
const configuration = context.options[0] || {};
|
|
270
|
+
const ignoreCase = configuration.ignoreCase || false;
|
|
271
|
+
const callbacksLast = configuration.callbacksLast || false;
|
|
272
|
+
const shorthandFirst = configuration.shorthandFirst || false;
|
|
273
|
+
const shorthandLast = configuration.shorthandLast || false;
|
|
274
|
+
const multiline = configuration.multiline || "ignore";
|
|
275
|
+
const noSortAlphabetically = configuration.noSortAlphabetically || false;
|
|
276
|
+
const reservedFirst = configuration.reservedFirst || false;
|
|
277
|
+
const reservedLast = configuration.reservedLast || [];
|
|
278
|
+
const locale = configuration.locale || "auto";
|
|
279
|
+
const options = {
|
|
280
|
+
ignoreCase,
|
|
281
|
+
callbacksLast,
|
|
282
|
+
shorthandFirst,
|
|
283
|
+
shorthandLast,
|
|
284
|
+
multiline,
|
|
285
|
+
noSortAlphabetically,
|
|
286
|
+
reservedFirst,
|
|
287
|
+
reservedList,
|
|
288
|
+
reservedLast,
|
|
289
|
+
locale
|
|
290
|
+
};
|
|
291
|
+
const sortableAttributeGroups = getGroupsOfSortableAttributes(attributes, context);
|
|
292
|
+
const sortedAttributeGroups = sortableAttributeGroups.slice(0).map((group) => [...group].sort((a, b) => contextCompare(a, b, options)));
|
|
293
|
+
return function fixFunction(fixer) {
|
|
294
|
+
const fixers = [];
|
|
295
|
+
let source = sourceCode.getText();
|
|
296
|
+
sortableAttributeGroups.forEach((sortableGroup, ii) => {
|
|
297
|
+
sortableGroup.forEach((attr, jj) => {
|
|
298
|
+
const sortedAttr = sortedAttributeGroups[ii][jj];
|
|
299
|
+
const sortedAttrText = source.slice(sortedAttr.range[0], attributeMap.get(sortedAttr).end);
|
|
300
|
+
fixers.push({
|
|
301
|
+
range: [attr.range[0], attributeMap.get(attr).end],
|
|
302
|
+
text: sortedAttrText
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
fixers.sort((a, b) => b.range[0] - a.range[0]);
|
|
307
|
+
const firstFixer = fixers[0];
|
|
308
|
+
const lastFixer = fixers.at(-1);
|
|
309
|
+
const rangeStart = lastFixer ? lastFixer.range[0] : 0;
|
|
310
|
+
const rangeEnd = firstFixer ? firstFixer.range[1] : -0;
|
|
311
|
+
fixers.forEach((fix) => {
|
|
312
|
+
source = `${source.slice(0, fix.range[0])}${fix.text}${source.slice(fix.range[1])}`;
|
|
313
|
+
});
|
|
314
|
+
return fixer.replaceTextRange([rangeStart, rangeEnd], source.slice(rangeStart, rangeEnd));
|
|
315
|
+
};
|
|
333
316
|
}
|
|
317
|
+
/**
|
|
318
|
+
* Checks if the `reservedFirst` option is valid
|
|
319
|
+
* @param context The context of the rule
|
|
320
|
+
* @param reservedFirst The `reservedFirst` option
|
|
321
|
+
* @return {Function|undefined} If an error is detected, a function to generate the error message, otherwise, `undefined`
|
|
322
|
+
*/
|
|
334
323
|
function validateReservedFirstConfig(context, reservedFirst) {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
};
|
|
342
|
-
}
|
|
324
|
+
if (reservedFirst && Array.isArray(reservedFirst) && reservedFirst.length === 0) return function Report(decl) {
|
|
325
|
+
context.report({
|
|
326
|
+
node: decl,
|
|
327
|
+
messageId: "listIsEmpty"
|
|
328
|
+
});
|
|
329
|
+
};
|
|
343
330
|
}
|
|
344
|
-
|
|
331
|
+
const reportedNodeAttributes = new WeakMap();
|
|
332
|
+
/**
|
|
333
|
+
* Check if the current node attribute has already been reported with the same error type
|
|
334
|
+
* if that's the case then we don't report a new error
|
|
335
|
+
* otherwise we report the error
|
|
336
|
+
* @param nodeAttribute The node attribute to be reported
|
|
337
|
+
* @param errorType The error type to be reported
|
|
338
|
+
* @param node The parent node for the node attribute
|
|
339
|
+
* @param context The context of the rule
|
|
340
|
+
* @param reservedList The list of reserved props
|
|
341
|
+
*/
|
|
345
342
|
function reportNodeAttribute(nodeAttribute, errorType, node, context, reservedList) {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
343
|
+
const errors = reportedNodeAttributes.get(nodeAttribute) || [];
|
|
344
|
+
if (errors.includes(errorType)) return;
|
|
345
|
+
errors.push(errorType);
|
|
346
|
+
reportedNodeAttributes.set(nodeAttribute, errors);
|
|
347
|
+
context.report({
|
|
348
|
+
node: nodeAttribute.name ?? "",
|
|
349
|
+
messageId: errorType,
|
|
350
|
+
fix: generateFixerFunction(node, context, reservedList)
|
|
351
|
+
});
|
|
355
352
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
context,
|
|
492
|
-
nodeReservedList
|
|
493
|
-
);
|
|
494
|
-
return memo;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
if (callbacksLast) {
|
|
498
|
-
if (!previousIsCallback && currentIsCallback) {
|
|
499
|
-
return decl;
|
|
500
|
-
}
|
|
501
|
-
if (previousIsCallback && !currentIsCallback) {
|
|
502
|
-
reportNodeAttribute(
|
|
503
|
-
memo,
|
|
504
|
-
"listCallbacksLast",
|
|
505
|
-
node,
|
|
506
|
-
context,
|
|
507
|
-
nodeReservedList
|
|
508
|
-
);
|
|
509
|
-
return memo;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
if (shorthandFirst) {
|
|
513
|
-
if (currentValue && !previousValue) return decl;
|
|
514
|
-
if (!currentValue && previousValue) {
|
|
515
|
-
reportNodeAttribute(
|
|
516
|
-
decl,
|
|
517
|
-
"listShorthandFirst",
|
|
518
|
-
node,
|
|
519
|
-
context,
|
|
520
|
-
nodeReservedList
|
|
521
|
-
);
|
|
522
|
-
return memo;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
if (shorthandLast) {
|
|
526
|
-
if (!currentValue && previousValue) return decl;
|
|
527
|
-
if (currentValue && !previousValue) {
|
|
528
|
-
reportNodeAttribute(
|
|
529
|
-
memo,
|
|
530
|
-
"listShorthandLast",
|
|
531
|
-
node,
|
|
532
|
-
context,
|
|
533
|
-
nodeReservedList
|
|
534
|
-
);
|
|
535
|
-
return memo;
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
const previousIsMultiline = isMultilineProp(memo);
|
|
539
|
-
const currentIsMultiline = isMultilineProp(decl);
|
|
540
|
-
if (multiline === "first") {
|
|
541
|
-
if (previousIsMultiline && !currentIsMultiline) {
|
|
542
|
-
return decl;
|
|
543
|
-
}
|
|
544
|
-
if (!previousIsMultiline && currentIsMultiline) {
|
|
545
|
-
reportNodeAttribute(
|
|
546
|
-
decl,
|
|
547
|
-
"listMultilineFirst",
|
|
548
|
-
node,
|
|
549
|
-
context,
|
|
550
|
-
nodeReservedList
|
|
551
|
-
);
|
|
552
|
-
return memo;
|
|
553
|
-
}
|
|
554
|
-
} else if (multiline === "last") {
|
|
555
|
-
if (!previousIsMultiline && currentIsMultiline) {
|
|
556
|
-
return decl;
|
|
557
|
-
}
|
|
558
|
-
if (previousIsMultiline && !currentIsMultiline) {
|
|
559
|
-
reportNodeAttribute(
|
|
560
|
-
memo,
|
|
561
|
-
"listMultilineLast",
|
|
562
|
-
node,
|
|
563
|
-
context,
|
|
564
|
-
nodeReservedList
|
|
565
|
-
);
|
|
566
|
-
return memo;
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
if (!noSortAlphabetically && (ignoreCase || locale !== "auto" ? previousPropName.localeCompare(
|
|
570
|
-
currentPropName,
|
|
571
|
-
locale === "auto" ? void 0 : locale
|
|
572
|
-
) > 0 : previousPropName > currentPropName)) {
|
|
573
|
-
reportNodeAttribute(
|
|
574
|
-
decl,
|
|
575
|
-
"sortPropsByAlpha",
|
|
576
|
-
node,
|
|
577
|
-
context,
|
|
578
|
-
nodeReservedList
|
|
579
|
-
);
|
|
580
|
-
return memo;
|
|
581
|
-
}
|
|
582
|
-
return decl;
|
|
583
|
-
}, node.attributes[0]);
|
|
584
|
-
}
|
|
585
|
-
};
|
|
586
|
-
}
|
|
353
|
+
const rule = {
|
|
354
|
+
defaultOptions: [{
|
|
355
|
+
multiline: "ignore",
|
|
356
|
+
locale: "auto"
|
|
357
|
+
}],
|
|
358
|
+
meta: {
|
|
359
|
+
type: "layout",
|
|
360
|
+
docs: { description: "Enforce props alphabetical sorting" },
|
|
361
|
+
fixable: "code",
|
|
362
|
+
messages,
|
|
363
|
+
schema: [{
|
|
364
|
+
type: "object",
|
|
365
|
+
properties: {
|
|
366
|
+
callbacksLast: { type: "boolean" },
|
|
367
|
+
shorthandFirst: { type: "boolean" },
|
|
368
|
+
shorthandLast: { type: "boolean" },
|
|
369
|
+
multiline: {
|
|
370
|
+
type: "string",
|
|
371
|
+
enum: [
|
|
372
|
+
"ignore",
|
|
373
|
+
"first",
|
|
374
|
+
"last"
|
|
375
|
+
],
|
|
376
|
+
default: "ignore"
|
|
377
|
+
},
|
|
378
|
+
ignoreCase: { type: "boolean" },
|
|
379
|
+
noSortAlphabetically: { type: "boolean" },
|
|
380
|
+
reservedFirst: { type: ["array", "boolean"] },
|
|
381
|
+
reservedLast: { type: "array" },
|
|
382
|
+
locale: {
|
|
383
|
+
type: "string",
|
|
384
|
+
default: "auto"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
additionalProperties: false
|
|
388
|
+
}]
|
|
389
|
+
},
|
|
390
|
+
create(context) {
|
|
391
|
+
const configuration = context.options[0] || {};
|
|
392
|
+
const ignoreCase = configuration.ignoreCase || false;
|
|
393
|
+
const callbacksLast = configuration.callbacksLast || false;
|
|
394
|
+
const shorthandFirst = configuration.shorthandFirst || false;
|
|
395
|
+
const shorthandLast = configuration.shorthandLast || false;
|
|
396
|
+
const multiline = configuration.multiline || "ignore";
|
|
397
|
+
const noSortAlphabetically = configuration.noSortAlphabetically || false;
|
|
398
|
+
const reservedFirst = configuration.reservedFirst || false;
|
|
399
|
+
const reservedFirstError = validateReservedFirstConfig(context, reservedFirst);
|
|
400
|
+
const reservedList = Array.isArray(reservedFirst) ? reservedFirst : RESERVED_PROPS_LIST;
|
|
401
|
+
const reservedLastList = configuration.reservedLast || [];
|
|
402
|
+
const locale = configuration.locale || "auto";
|
|
403
|
+
return {
|
|
404
|
+
Program() {
|
|
405
|
+
attributeMap = new WeakMap();
|
|
406
|
+
},
|
|
407
|
+
JSXOpeningElement(node) {
|
|
408
|
+
const nodeReservedList = reservedFirst && !isDOMComponent(node) ? reservedList.filter((prop) => prop !== "dangerouslySetInnerHTML") : reservedList;
|
|
409
|
+
node.attributes.reduce((memo, decl, idx, attrs) => {
|
|
410
|
+
if (decl.type === "JSXSpreadAttribute") return attrs[idx + 1];
|
|
411
|
+
let previousPropName = getPropName(memo);
|
|
412
|
+
let currentPropName = getPropName(decl);
|
|
413
|
+
const previousValue = memo.value;
|
|
414
|
+
const currentValue = decl.value;
|
|
415
|
+
const previousIsCallback = isCallbackPropName(previousPropName);
|
|
416
|
+
const currentIsCallback = isCallbackPropName(currentPropName);
|
|
417
|
+
if (ignoreCase) {
|
|
418
|
+
previousPropName = previousPropName.toLowerCase();
|
|
419
|
+
currentPropName = currentPropName.toLowerCase();
|
|
420
|
+
}
|
|
421
|
+
if (reservedFirst) {
|
|
422
|
+
if (reservedFirstError) {
|
|
423
|
+
reservedFirstError(decl);
|
|
424
|
+
return memo;
|
|
425
|
+
}
|
|
426
|
+
const previousReservedIndex = getReservedPropIndex(previousPropName, nodeReservedList);
|
|
427
|
+
const currentReservedIndex = getReservedPropIndex(currentPropName, nodeReservedList);
|
|
428
|
+
if (previousReservedIndex > -1 && currentReservedIndex === -1) return decl;
|
|
429
|
+
if (reservedFirst !== true && previousReservedIndex > currentReservedIndex || previousReservedIndex === -1 && currentReservedIndex > -1) {
|
|
430
|
+
reportNodeAttribute(decl, "listReservedPropsFirst", node, context, nodeReservedList);
|
|
431
|
+
return memo;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
if (reservedLastList.length > 0) {
|
|
435
|
+
const previousReservedIndex = getReservedPropIndex(previousPropName, reservedLastList);
|
|
436
|
+
const currentReservedIndex = getReservedPropIndex(currentPropName, reservedLastList);
|
|
437
|
+
if (previousReservedIndex === -1 && currentReservedIndex > -1) return decl;
|
|
438
|
+
if (previousReservedIndex < currentReservedIndex || previousReservedIndex > -1 && currentReservedIndex === -1) {
|
|
439
|
+
reportNodeAttribute(decl, "listReservedPropsLast", node, context, nodeReservedList);
|
|
440
|
+
return memo;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
if (callbacksLast) {
|
|
444
|
+
if (!previousIsCallback && currentIsCallback) return decl;
|
|
445
|
+
if (previousIsCallback && !currentIsCallback) {
|
|
446
|
+
reportNodeAttribute(memo, "listCallbacksLast", node, context, nodeReservedList);
|
|
447
|
+
return memo;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
if (shorthandFirst) {
|
|
451
|
+
if (currentValue && !previousValue) return decl;
|
|
452
|
+
if (!currentValue && previousValue) {
|
|
453
|
+
reportNodeAttribute(decl, "listShorthandFirst", node, context, nodeReservedList);
|
|
454
|
+
return memo;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
if (shorthandLast) {
|
|
458
|
+
if (!currentValue && previousValue) return decl;
|
|
459
|
+
if (currentValue && !previousValue) {
|
|
460
|
+
reportNodeAttribute(memo, "listShorthandLast", node, context, nodeReservedList);
|
|
461
|
+
return memo;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
const previousIsMultiline = isMultilineProp(memo);
|
|
465
|
+
const currentIsMultiline = isMultilineProp(decl);
|
|
466
|
+
if (multiline === "first") {
|
|
467
|
+
if (previousIsMultiline && !currentIsMultiline) return decl;
|
|
468
|
+
if (!previousIsMultiline && currentIsMultiline) {
|
|
469
|
+
reportNodeAttribute(decl, "listMultilineFirst", node, context, nodeReservedList);
|
|
470
|
+
return memo;
|
|
471
|
+
}
|
|
472
|
+
} else if (multiline === "last") {
|
|
473
|
+
if (!previousIsMultiline && currentIsMultiline) return decl;
|
|
474
|
+
if (previousIsMultiline && !currentIsMultiline) {
|
|
475
|
+
reportNodeAttribute(memo, "listMultilineLast", node, context, nodeReservedList);
|
|
476
|
+
return memo;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
if (!noSortAlphabetically && (ignoreCase || locale !== "auto" ? previousPropName.localeCompare(currentPropName, locale === "auto" ? void 0 : locale) > 0 : previousPropName > currentPropName)) {
|
|
480
|
+
reportNodeAttribute(decl, "sortPropsByAlpha", node, context, nodeReservedList);
|
|
481
|
+
return memo;
|
|
482
|
+
}
|
|
483
|
+
return decl;
|
|
484
|
+
}, node.attributes[0]);
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
}
|
|
587
488
|
};
|
|
588
|
-
var jsx_sort_props_default =
|
|
489
|
+
var jsx_sort_props_default = rule;
|
|
589
490
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region src/rules/index.ts
|
|
493
|
+
const ruleOptions = {
|
|
494
|
+
"jsx-sort-props": jsx_sort_props_default,
|
|
495
|
+
"define-style": define_style_default
|
|
594
496
|
};
|
|
595
497
|
var rules_default = ruleOptions;
|
|
596
498
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
...options
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region src/index.ts
|
|
501
|
+
const plugins = { "vue-jsx-vapor": { rules: rules_default } };
|
|
502
|
+
var src_default = ({ rules = {},...options } = {}) => ({
|
|
503
|
+
name: "vue-jsx-vapor",
|
|
504
|
+
plugins,
|
|
505
|
+
rules: {
|
|
506
|
+
"style/jsx-sort-props": "off",
|
|
507
|
+
"react/jsx-sort-props": "off",
|
|
508
|
+
"vue-jsx-vapor/jsx-sort-props": rules["vue-jsx-vapor/jsx-sort-props"] || ["warn", {
|
|
509
|
+
callbacksLast: true,
|
|
510
|
+
shorthandFirst: true,
|
|
511
|
+
reservedFirst: [
|
|
512
|
+
"v-if",
|
|
513
|
+
"v-else-if",
|
|
514
|
+
"v-else",
|
|
515
|
+
"v-for",
|
|
516
|
+
"key",
|
|
517
|
+
"ref",
|
|
518
|
+
"v-model"
|
|
519
|
+
],
|
|
520
|
+
reservedLast: [
|
|
521
|
+
"v-text",
|
|
522
|
+
"v-html",
|
|
523
|
+
"v-slots",
|
|
524
|
+
"v-slot"
|
|
525
|
+
]
|
|
526
|
+
}],
|
|
527
|
+
"vue-jsx-vapor/define-style": rules["vue-jsx-vapor/define-style"] || "warn"
|
|
528
|
+
},
|
|
529
|
+
...options
|
|
629
530
|
});
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
rules_default as rules
|
|
634
|
-
};
|
|
531
|
+
|
|
532
|
+
//#endregion
|
|
533
|
+
export { src_default as default, plugins, rules_default as rules };
|