oxlint-plugin-vize 0.638.0 → 0.639.0
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/{configs-De9Y_xO7.mjs → configs-Dx4NwRyF.mjs} +36 -13
- package/dist/eslint.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +11 -11
|
@@ -30,12 +30,24 @@ function isVOnEventHyphenationOptions(value) {
|
|
|
30
30
|
const ignore = option.ignore;
|
|
31
31
|
return ignore === void 0 || Array.isArray(ignore) && ignore.every((entry, index) => typeof entry === "string" && !/^\s*$/u.test(entry) && !entry.endsWith(":exit") && ignore.indexOf(entry) === index);
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
34
|
-
function
|
|
35
|
-
|
|
33
|
+
/** Carry the supported official tuple without changing canonical/default policy. */
|
|
34
|
+
function getVOnEventHyphenationOptions(options) {
|
|
35
|
+
const first = options[0];
|
|
36
|
+
const isStyle = first === "always" || first === "never";
|
|
37
|
+
if (options.length === 1 && isStyle) return { vOnEventHyphenation: first };
|
|
38
|
+
if (options.length === 1 && isVOnEventHyphenationOptions(first)) return { ruleOptions: { "vue/v-on-event-hyphenation": structuredClone(first) } };
|
|
39
|
+
const second = options[1];
|
|
40
|
+
if (options.length === 2 && isStyle && isVOnEventHyphenationOptions(second) && !Object.hasOwn(second, "style")) return { ruleOptions: { "vue/v-on-event-hyphenation": {
|
|
41
|
+
style: first,
|
|
42
|
+
...structuredClone(second)
|
|
43
|
+
} } };
|
|
44
|
+
}
|
|
45
|
+
/** Canonical object policies remain one item; the official style accepts a policy. */
|
|
46
|
+
function vOnEventHyphenationRuleSchema() {
|
|
47
|
+
const style = { enum: ["always", "never"] };
|
|
48
|
+
const policy = {
|
|
36
49
|
type: "object",
|
|
37
50
|
properties: {
|
|
38
|
-
style: { enum: ["always", "never"] },
|
|
39
51
|
autofix: { type: "boolean" },
|
|
40
52
|
ignore: {
|
|
41
53
|
type: "array",
|
|
@@ -47,7 +59,24 @@ function vOnEventHyphenationSchema() {
|
|
|
47
59
|
}
|
|
48
60
|
},
|
|
49
61
|
additionalProperties: false
|
|
50
|
-
}
|
|
62
|
+
};
|
|
63
|
+
return {
|
|
64
|
+
type: "array",
|
|
65
|
+
oneOf: [{
|
|
66
|
+
items: [style, policy],
|
|
67
|
+
maxItems: 2
|
|
68
|
+
}, {
|
|
69
|
+
items: [{
|
|
70
|
+
...policy,
|
|
71
|
+
properties: {
|
|
72
|
+
style,
|
|
73
|
+
...policy.properties
|
|
74
|
+
}
|
|
75
|
+
}],
|
|
76
|
+
minItems: 1,
|
|
77
|
+
maxItems: 1
|
|
78
|
+
}]
|
|
79
|
+
};
|
|
51
80
|
}
|
|
52
81
|
//#endregion
|
|
53
82
|
//#region src/attribute-options.ts
|
|
@@ -239,10 +268,7 @@ function getRuleOptions(ruleName, options) {
|
|
|
239
268
|
case "vue/mustache-interpolation-spacing":
|
|
240
269
|
if (isMustacheInterpolationSpacingStyle(firstOption)) return { ruleOptions: { "vue/mustache-interpolation-spacing": firstOption } };
|
|
241
270
|
break;
|
|
242
|
-
case "vue/v-on-event-hyphenation":
|
|
243
|
-
if (isHyphenationStyle(firstOption)) return { vOnEventHyphenation: firstOption };
|
|
244
|
-
if (isRecord(firstOption) && isVOnEventHyphenationOptions(firstOption)) return cliRuleOptions(ruleName, firstOption);
|
|
245
|
-
break;
|
|
271
|
+
case "vue/v-on-event-hyphenation": return getVOnEventHyphenationOptions(options);
|
|
246
272
|
case "vue/v-on-style":
|
|
247
273
|
if (isVOnStyle(firstOption)) return { ruleOptions: { "vue/v-on-style": firstOption } };
|
|
248
274
|
break;
|
|
@@ -306,9 +332,6 @@ function isHtmlQuoteStyle(value) {
|
|
|
306
332
|
function isMustacheInterpolationSpacingStyle(value) {
|
|
307
333
|
return value === "always" || value === "never";
|
|
308
334
|
}
|
|
309
|
-
function isHyphenationStyle(value) {
|
|
310
|
-
return value === "always" || value === "never";
|
|
311
|
-
}
|
|
312
335
|
function isVOnStyle(value) {
|
|
313
336
|
return value === "shorthand" || value === "longform";
|
|
314
337
|
}
|
|
@@ -971,7 +994,7 @@ function ruleOptionsSchema(ruleName) {
|
|
|
971
994
|
case "vue/html-self-closing": return [htmlSelfClosingSchema()];
|
|
972
995
|
case "vue/html-quotes": return [{ enum: ["double", "single"] }, objectSchema({ avoidEscape: { type: "boolean" } })];
|
|
973
996
|
case "vue/mustache-interpolation-spacing": return [{ enum: ["always", "never"] }];
|
|
974
|
-
case "vue/v-on-event-hyphenation": return
|
|
997
|
+
case "vue/v-on-event-hyphenation": return vOnEventHyphenationRuleSchema();
|
|
975
998
|
case "vue/attribute-hyphenation": return attributeHyphenationSchema();
|
|
976
999
|
case "vue/v-on-style": return [{ enum: ["shorthand", "longform"] }];
|
|
977
1000
|
case "vue/v-slot-style": return [{ oneOf: [{ enum: ["shorthand", "longform"] }, objectSchema({
|
package/dist/eslint.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as getPatinaRules, d as isTypeAwareRuleName, f as createRuleSelection, i as formatPatinaMessage, l as getActivePreset, m as getRuleOptions, n as createVizeRuleConfig, o as diagnosticsForRule, r as plugin_default, s as indexDiagnosticsByRule, t as configs, u as getVizeSettings } from "./configs-
|
|
1
|
+
import { c as getPatinaRules, d as isTypeAwareRuleName, f as createRuleSelection, i as formatPatinaMessage, l as getActivePreset, m as getRuleOptions, n as createVizeRuleConfig, o as diagnosticsForRule, r as plugin_default, s as indexDiagnosticsByRule, t as configs, u as getVizeSettings } from "./configs-Dx4NwRyF.mjs";
|
|
2
2
|
import { d as isPatinaFile, m as loadBinding } from "./workaround-Byh3ja-i.mjs";
|
|
3
3
|
import { definePlugin, defineRule, eslintCompatPlugin } from "@oxlint/plugins";
|
|
4
4
|
//#region src/eslint-source.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as getPatinaRules, n as createVizeRuleConfig, p as selectVizeRuleConfig, r as plugin_default, t as configs } from "./configs-
|
|
1
|
+
import { c as getPatinaRules, n as createVizeRuleConfig, p as selectVizeRuleConfig, r as plugin_default, t as configs } from "./configs-Dx4NwRyF.mjs";
|
|
2
2
|
//#region src/vite-plus.ts
|
|
3
3
|
/**
|
|
4
4
|
* Bare specifier Oxlint uses to load this bridge as a JS plugin.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint-plugin-vize",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.639.0",
|
|
4
4
|
"description": "Oxlint JS plugin bridge for Vize Patina",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lint",
|
|
@@ -48,21 +48,21 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@tsdown/css": "0.22.14",
|
|
50
50
|
"@types/node": "25.9.2",
|
|
51
|
-
"@vizejs/native": "0.
|
|
51
|
+
"@vizejs/native": "0.639.0",
|
|
52
52
|
"tsdown": "0.22.14",
|
|
53
53
|
"typescript": "6.0.3",
|
|
54
54
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.24",
|
|
55
55
|
"vite-plus": "0.1.24"
|
|
56
56
|
},
|
|
57
57
|
"optionalDependencies": {
|
|
58
|
-
"@vizejs/native-darwin-arm64": "0.
|
|
59
|
-
"@vizejs/native-darwin-x64": "0.
|
|
60
|
-
"@vizejs/native-linux-arm64-gnu": "0.
|
|
61
|
-
"@vizejs/native-linux-arm64-musl": "0.
|
|
62
|
-
"@vizejs/native-linux-x64-gnu": "0.
|
|
63
|
-
"@vizejs/native-linux-x64-musl": "0.
|
|
64
|
-
"@vizejs/native-win32-arm64-msvc": "0.
|
|
65
|
-
"@vizejs/native-win32-x64-msvc": "0.
|
|
58
|
+
"@vizejs/native-darwin-arm64": "0.639.0",
|
|
59
|
+
"@vizejs/native-darwin-x64": "0.639.0",
|
|
60
|
+
"@vizejs/native-linux-arm64-gnu": "0.639.0",
|
|
61
|
+
"@vizejs/native-linux-arm64-musl": "0.639.0",
|
|
62
|
+
"@vizejs/native-linux-x64-gnu": "0.639.0",
|
|
63
|
+
"@vizejs/native-linux-x64-musl": "0.639.0",
|
|
64
|
+
"@vizejs/native-win32-arm64-msvc": "0.639.0",
|
|
65
|
+
"@vizejs/native-win32-x64-msvc": "0.639.0"
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|
|
68
68
|
"node": "^22 || >= 24"
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "vp pack",
|
|
78
|
-
"test": "vp pack && vp test run src/file-state.test.ts src/batched-rules.test.ts src/script-safe-source.test.ts src/active-rule-collection.test.ts src/v-on-event-options.test.ts src/prop-name-options.test.ts src/component-name-options.test.ts && node src/test.ts && node src/script-location.test.ts && node src/casing-options.test.ts && node src/router-globals.test.ts && node src/template-style-fixes.test.mjs && node src/html-binding.test.mjs && node --test src/eslint-source.test.ts src/attribute-options.test.ts src/attribute-ignore-tags.test.ts && node src/eslint-acceptance.test.mjs && node src/v-on-event-autofix-host.test.ts && node src/attribute-eslint.test.ts && node src/prop-name-eslint.test.ts && node src/component-name-eslint.test.ts && node src/attribute-ignore-tags-eslint.test.ts && node src/attribute-ignore-tags-oxlint.test.ts",
|
|
78
|
+
"test": "vp pack && vp test run src/file-state.test.ts src/batched-rules.test.ts src/script-safe-source.test.ts src/active-rule-collection.test.ts src/v-on-event-options.test.ts src/v-on-event-tuple-options.test.ts src/prop-name-options.test.ts src/component-name-options.test.ts && node src/test.ts && node src/script-location.test.ts && node src/casing-options.test.ts && node src/router-globals.test.ts && node src/template-style-fixes.test.mjs && node src/html-binding.test.mjs && node --test src/eslint-source.test.ts src/attribute-options.test.ts src/attribute-ignore-tags.test.ts && node src/eslint-acceptance.test.mjs && node src/v-on-event-autofix-host.test.ts && node src/v-on-event-tuple-eslint.test.ts && node src/attribute-eslint.test.ts && node src/prop-name-eslint.test.ts && node src/component-name-eslint.test.ts && node src/attribute-ignore-tags-eslint.test.ts && node src/attribute-ignore-tags-oxlint.test.ts",
|
|
79
79
|
"check": "vp check src vite.config.ts",
|
|
80
80
|
"check:fix": "vp check --fix src vite.config.ts",
|
|
81
81
|
"fmt": "vp fmt --write src vite.config.ts"
|