@vue-jsx-vapor/eslint 2.6.8 → 2.7.4
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 +12 -21
- package/dist/index.d.cts +10 -11
- package/dist/index.d.ts +10 -11
- package/dist/index.js +10 -20
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22,7 +22,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
25
|
-
|
|
25
|
+
let __prettier_sync = require("@prettier/sync");
|
|
26
|
+
__prettier_sync = __toESM(__prettier_sync);
|
|
26
27
|
|
|
27
28
|
//#region src/rules/define-style/index.ts
|
|
28
29
|
const rule$1 = {
|
|
@@ -44,8 +45,7 @@ const rule$1 = {
|
|
|
44
45
|
}]
|
|
45
46
|
},
|
|
46
47
|
create(context) {
|
|
47
|
-
const
|
|
48
|
-
const tabWidth = configuration.tabWidth || 2;
|
|
48
|
+
const tabWidth = (context.options[0] || {}).tabWidth || 2;
|
|
49
49
|
return { CallExpression(node) {
|
|
50
50
|
const callee = node.callee.type === "MemberExpression" ? node.callee.object : node.callee;
|
|
51
51
|
const parser = node.callee.type === "MemberExpression" && node.callee.property.type === "Identifier" ? node.callee.property.name : "css";
|
|
@@ -297,26 +297,17 @@ function generateFixerFunction(node, context, reservedList) {
|
|
|
297
297
|
const sourceCode = context.sourceCode;
|
|
298
298
|
const attributes = node.attributes.slice(0);
|
|
299
299
|
const configuration = context.options[0] || {};
|
|
300
|
-
const ignoreCase = configuration.ignoreCase || false;
|
|
301
|
-
const callbacksLast = configuration.callbacksLast || false;
|
|
302
|
-
const shorthandFirst = configuration.shorthandFirst || false;
|
|
303
|
-
const shorthandLast = configuration.shorthandLast || false;
|
|
304
|
-
const multiline = configuration.multiline || "ignore";
|
|
305
|
-
const noSortAlphabetically = configuration.noSortAlphabetically || false;
|
|
306
|
-
const reservedFirst = configuration.reservedFirst || false;
|
|
307
|
-
const reservedLast = configuration.reservedLast || [];
|
|
308
|
-
const locale = configuration.locale || "auto";
|
|
309
300
|
const options = {
|
|
310
|
-
ignoreCase,
|
|
311
|
-
callbacksLast,
|
|
312
|
-
shorthandFirst,
|
|
313
|
-
shorthandLast,
|
|
314
|
-
multiline,
|
|
315
|
-
noSortAlphabetically,
|
|
316
|
-
reservedFirst,
|
|
301
|
+
ignoreCase: configuration.ignoreCase || false,
|
|
302
|
+
callbacksLast: configuration.callbacksLast || false,
|
|
303
|
+
shorthandFirst: configuration.shorthandFirst || false,
|
|
304
|
+
shorthandLast: configuration.shorthandLast || false,
|
|
305
|
+
multiline: configuration.multiline || "ignore",
|
|
306
|
+
noSortAlphabetically: configuration.noSortAlphabetically || false,
|
|
307
|
+
reservedFirst: configuration.reservedFirst || false,
|
|
317
308
|
reservedList,
|
|
318
|
-
reservedLast,
|
|
319
|
-
locale
|
|
309
|
+
reservedLast: configuration.reservedLast || [],
|
|
310
|
+
locale: configuration.locale || "auto"
|
|
320
311
|
};
|
|
321
312
|
const sortableAttributeGroups = getGroupsOfSortableAttributes(attributes, context);
|
|
322
313
|
const sortedAttributeGroups = sortableAttributeGroups.slice(0).map((group) => [...group].sort((a, b) => contextCompare(a, b, options)));
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as eslint16 from "eslint";
|
|
1
|
+
import * as _typescript_eslint_utils_ts_eslint7 from "@typescript-eslint/utils/ts-eslint";
|
|
2
|
+
import * as eslint0 from "eslint";
|
|
4
3
|
import { Linter } from "eslint";
|
|
5
4
|
|
|
6
5
|
//#region src/rules/jsx-sort-props/types.d.ts
|
|
@@ -27,8 +26,8 @@ type MessageIds = 'define-style' | 'define-style-syntax-error';
|
|
|
27
26
|
//#endregion
|
|
28
27
|
//#region src/rules/index.d.ts
|
|
29
28
|
declare const ruleOptions: {
|
|
30
|
-
'jsx-sort-props':
|
|
31
|
-
'define-style':
|
|
29
|
+
'jsx-sort-props': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds$1, JsxSortPropsRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
30
|
+
'define-style': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds, DefineStyleRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
32
31
|
};
|
|
33
32
|
interface RuleOptions {
|
|
34
33
|
'vue-jsx-vapor/jsx-sort-props': JsxSortPropsRuleOptions;
|
|
@@ -40,8 +39,8 @@ type Rules = Partial<{ [K in keyof RuleOptions]: Linter.RuleSeverity | [Linter.R
|
|
|
40
39
|
declare const plugins: {
|
|
41
40
|
'vue-jsx-vapor': {
|
|
42
41
|
rules: {
|
|
43
|
-
'jsx-sort-props':
|
|
44
|
-
'define-style':
|
|
42
|
+
'jsx-sort-props': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds$1, JsxSortPropsRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
43
|
+
'define-style': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds, DefineStyleRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
45
44
|
};
|
|
46
45
|
};
|
|
47
46
|
};
|
|
@@ -60,11 +59,11 @@ declare const _default: ({
|
|
|
60
59
|
plugins: {
|
|
61
60
|
'vue-jsx-vapor': {
|
|
62
61
|
rules: {
|
|
63
|
-
'jsx-sort-props':
|
|
64
|
-
'define-style':
|
|
62
|
+
'jsx-sort-props': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds$1, JsxSortPropsRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
63
|
+
'define-style': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds, DefineStyleRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
65
64
|
};
|
|
66
65
|
};
|
|
67
|
-
} | Record<string,
|
|
66
|
+
} | Record<string, eslint0.ESLint.Plugin>;
|
|
68
67
|
settings?: Record<string, unknown>;
|
|
69
68
|
rules: {
|
|
70
69
|
'style/jsx-sort-props': string;
|
|
@@ -74,4 +73,4 @@ declare const _default: ({
|
|
|
74
73
|
};
|
|
75
74
|
};
|
|
76
75
|
//#endregion
|
|
77
|
-
export { Rules, _default as default, plugins, ruleOptions as rules };
|
|
76
|
+
export { type Rules, _default as default, plugins, ruleOptions as rules };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as eslint16 from "eslint";
|
|
1
|
+
import * as _typescript_eslint_utils_ts_eslint7 from "@typescript-eslint/utils/ts-eslint";
|
|
2
|
+
import * as eslint0 from "eslint";
|
|
4
3
|
import { Linter } from "eslint";
|
|
5
4
|
|
|
6
5
|
//#region src/rules/jsx-sort-props/types.d.ts
|
|
@@ -27,8 +26,8 @@ type MessageIds = 'define-style' | 'define-style-syntax-error';
|
|
|
27
26
|
//#endregion
|
|
28
27
|
//#region src/rules/index.d.ts
|
|
29
28
|
declare const ruleOptions: {
|
|
30
|
-
'jsx-sort-props':
|
|
31
|
-
'define-style':
|
|
29
|
+
'jsx-sort-props': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds$1, JsxSortPropsRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
30
|
+
'define-style': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds, DefineStyleRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
32
31
|
};
|
|
33
32
|
interface RuleOptions {
|
|
34
33
|
'vue-jsx-vapor/jsx-sort-props': JsxSortPropsRuleOptions;
|
|
@@ -40,8 +39,8 @@ type Rules = Partial<{ [K in keyof RuleOptions]: Linter.RuleSeverity | [Linter.R
|
|
|
40
39
|
declare const plugins: {
|
|
41
40
|
'vue-jsx-vapor': {
|
|
42
41
|
rules: {
|
|
43
|
-
'jsx-sort-props':
|
|
44
|
-
'define-style':
|
|
42
|
+
'jsx-sort-props': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds$1, JsxSortPropsRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
43
|
+
'define-style': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds, DefineStyleRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
45
44
|
};
|
|
46
45
|
};
|
|
47
46
|
};
|
|
@@ -60,11 +59,11 @@ declare const _default: ({
|
|
|
60
59
|
plugins: {
|
|
61
60
|
'vue-jsx-vapor': {
|
|
62
61
|
rules: {
|
|
63
|
-
'jsx-sort-props':
|
|
64
|
-
'define-style':
|
|
62
|
+
'jsx-sort-props': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds$1, JsxSortPropsRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
63
|
+
'define-style': _typescript_eslint_utils_ts_eslint7.RuleModule<MessageIds, DefineStyleRuleOptions, unknown, _typescript_eslint_utils_ts_eslint7.RuleListener>;
|
|
65
64
|
};
|
|
66
65
|
};
|
|
67
|
-
} | Record<string,
|
|
66
|
+
} | Record<string, eslint0.ESLint.Plugin>;
|
|
68
67
|
settings?: Record<string, unknown>;
|
|
69
68
|
rules: {
|
|
70
69
|
'style/jsx-sort-props': string;
|
|
@@ -74,4 +73,4 @@ declare const _default: ({
|
|
|
74
73
|
};
|
|
75
74
|
};
|
|
76
75
|
//#endregion
|
|
77
|
-
export { Rules, _default as default, plugins, ruleOptions as rules };
|
|
76
|
+
export { type Rules, _default as default, plugins, ruleOptions as rules };
|
package/dist/index.js
CHANGED
|
@@ -20,8 +20,7 @@ const rule$1 = {
|
|
|
20
20
|
}]
|
|
21
21
|
},
|
|
22
22
|
create(context) {
|
|
23
|
-
const
|
|
24
|
-
const tabWidth = configuration.tabWidth || 2;
|
|
23
|
+
const tabWidth = (context.options[0] || {}).tabWidth || 2;
|
|
25
24
|
return { CallExpression(node) {
|
|
26
25
|
const callee = node.callee.type === "MemberExpression" ? node.callee.object : node.callee;
|
|
27
26
|
const parser = node.callee.type === "MemberExpression" && node.callee.property.type === "Identifier" ? node.callee.property.name : "css";
|
|
@@ -273,26 +272,17 @@ function generateFixerFunction(node, context, reservedList) {
|
|
|
273
272
|
const sourceCode = context.sourceCode;
|
|
274
273
|
const attributes = node.attributes.slice(0);
|
|
275
274
|
const configuration = context.options[0] || {};
|
|
276
|
-
const ignoreCase = configuration.ignoreCase || false;
|
|
277
|
-
const callbacksLast = configuration.callbacksLast || false;
|
|
278
|
-
const shorthandFirst = configuration.shorthandFirst || false;
|
|
279
|
-
const shorthandLast = configuration.shorthandLast || false;
|
|
280
|
-
const multiline = configuration.multiline || "ignore";
|
|
281
|
-
const noSortAlphabetically = configuration.noSortAlphabetically || false;
|
|
282
|
-
const reservedFirst = configuration.reservedFirst || false;
|
|
283
|
-
const reservedLast = configuration.reservedLast || [];
|
|
284
|
-
const locale = configuration.locale || "auto";
|
|
285
275
|
const options = {
|
|
286
|
-
ignoreCase,
|
|
287
|
-
callbacksLast,
|
|
288
|
-
shorthandFirst,
|
|
289
|
-
shorthandLast,
|
|
290
|
-
multiline,
|
|
291
|
-
noSortAlphabetically,
|
|
292
|
-
reservedFirst,
|
|
276
|
+
ignoreCase: configuration.ignoreCase || false,
|
|
277
|
+
callbacksLast: configuration.callbacksLast || false,
|
|
278
|
+
shorthandFirst: configuration.shorthandFirst || false,
|
|
279
|
+
shorthandLast: configuration.shorthandLast || false,
|
|
280
|
+
multiline: configuration.multiline || "ignore",
|
|
281
|
+
noSortAlphabetically: configuration.noSortAlphabetically || false,
|
|
282
|
+
reservedFirst: configuration.reservedFirst || false,
|
|
293
283
|
reservedList,
|
|
294
|
-
reservedLast,
|
|
295
|
-
locale
|
|
284
|
+
reservedLast: configuration.reservedLast || [],
|
|
285
|
+
locale: configuration.locale || "auto"
|
|
296
286
|
};
|
|
297
287
|
const sortableAttributeGroups = getGroupsOfSortableAttributes(attributes, context);
|
|
298
288
|
const sortedAttributeGroups = sortableAttributeGroups.slice(0).map((group) => [...group].sort((a, b) => contextCompare(a, b, options)));
|