oxlint-plugin-vize 0.630.0 → 0.631.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.
|
@@ -57,9 +57,12 @@ function isIgnore(value) {
|
|
|
57
57
|
function isOptions(value, allowStyle) {
|
|
58
58
|
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
59
59
|
const options = value;
|
|
60
|
-
if (!Object.keys(options).every((key) => key === "ignore" || allowStyle && key === "style")) return false;
|
|
60
|
+
if (!Object.keys(options).every((key) => key === "ignore" || key === "ignoreTags" || allowStyle && key === "style")) return false;
|
|
61
61
|
if (allowStyle && options.style !== void 0 && options.style !== "always" && options.style !== "never") return false;
|
|
62
|
-
return isIgnore(options.ignore);
|
|
62
|
+
return isIgnore(options.ignore) && (options.ignoreTags === void 0 || Array.isArray(options.ignoreTags) && options.ignoreTags.every((tag, index, tags) => typeof tag === "string" && tags.indexOf(tag) === index));
|
|
63
|
+
}
|
|
64
|
+
function requireLiteralTags(tags) {
|
|
65
|
+
if (tags?.some((tag) => /^\/(.+)\/(.*)$/u.test(tag))) throw new TypeError("ignoreTags supports literal tag names only; regular-expression policies are unsupported");
|
|
63
66
|
}
|
|
64
67
|
/** Preserve the old style tuple; accept upstream's second ignore object and the canonical object. */
|
|
65
68
|
function getAttributeHyphenationOptions(options) {
|
|
@@ -68,13 +71,26 @@ function getAttributeHyphenationOptions(options) {
|
|
|
68
71
|
if (first === "always" || first === "never") {
|
|
69
72
|
if (second === void 0) return { attributeHyphenation: first };
|
|
70
73
|
if (!isOptions(second, false)) return void 0;
|
|
74
|
+
requireLiteralTags(second.ignoreTags);
|
|
71
75
|
return {
|
|
72
76
|
attributeHyphenation: first,
|
|
73
|
-
attributeHyphenationIgnore: [...second.ignore ?? []]
|
|
77
|
+
attributeHyphenationIgnore: [...second.ignore ?? []],
|
|
78
|
+
...second.ignoreTags === void 0 ? {} : { attributeHyphenationIgnoreTags: [...second.ignoreTags] }
|
|
74
79
|
};
|
|
75
80
|
}
|
|
76
81
|
if (isOptions(first, true) && second !== void 0) throw new TypeError("attribute-hyphenation accepts a canonical object or a style/ignore tuple, not both");
|
|
77
|
-
if (second === void 0 && isOptions(first, true))
|
|
82
|
+
if (second === void 0 && isOptions(first, true)) {
|
|
83
|
+
requireLiteralTags(first.ignoreTags);
|
|
84
|
+
return { ruleOptions: { "vue/attribute-hyphenation": structuredClone(first) } };
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function tagSchema() {
|
|
88
|
+
return {
|
|
89
|
+
type: "array",
|
|
90
|
+
uniqueItems: true,
|
|
91
|
+
items: { type: "string" },
|
|
92
|
+
description: "Exact authored tag names; regular-expression policies are unsupported."
|
|
93
|
+
};
|
|
78
94
|
}
|
|
79
95
|
function ignoreSchema() {
|
|
80
96
|
return {
|
|
@@ -91,12 +107,16 @@ function attributeHyphenationSchema() {
|
|
|
91
107
|
type: "object",
|
|
92
108
|
properties: {
|
|
93
109
|
style: { enum: ["always", "never"] },
|
|
94
|
-
ignore: ignoreSchema()
|
|
110
|
+
ignore: ignoreSchema(),
|
|
111
|
+
ignoreTags: tagSchema()
|
|
95
112
|
},
|
|
96
113
|
additionalProperties: false
|
|
97
114
|
}] }, {
|
|
98
115
|
type: "object",
|
|
99
|
-
properties: {
|
|
116
|
+
properties: {
|
|
117
|
+
ignore: ignoreSchema(),
|
|
118
|
+
ignoreTags: tagSchema()
|
|
119
|
+
},
|
|
100
120
|
additionalProperties: false
|
|
101
121
|
}];
|
|
102
122
|
}
|
|
@@ -9,6 +9,8 @@ interface VOnEventHyphenationOptions {
|
|
|
9
9
|
interface AttributeHyphenationOptions {
|
|
10
10
|
style?: HyphenationStyle;
|
|
11
11
|
ignore?: string[];
|
|
12
|
+
/** Exact authored tag names. Regular-expression policies are unsupported. */
|
|
13
|
+
ignoreTags?: string[];
|
|
12
14
|
}
|
|
13
15
|
//#endregion
|
|
14
16
|
//#region src/prop-name-options.d.ts
|
package/dist/eslint.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createVizeRuleConfig, s as configs } from "./configs-
|
|
1
|
+
import { c as createVizeRuleConfig, s as configs } from "./configs-DoDD2QlL.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/eslint.d.ts
|
|
4
4
|
/** ESLint rules over the complete source supplied by the configured parser. */
|
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-De9Y_xO7.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.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as VizeRuleConfigPreset, c as createVizeRuleConfig, d as VizeRuleOptions, i as VizeRuleConfigOptions, l as PatinaPreset, n as OxlintRuleEntry, o as VizeRuleConfigPresetInput, r as OxlintRuleSeverity, s as configs, t as OxlintRuleConfig, u as PatinaSettings } from "./configs-
|
|
1
|
+
import { a as VizeRuleConfigPreset, c as createVizeRuleConfig, d as VizeRuleOptions, i as VizeRuleConfigOptions, l as PatinaPreset, n as OxlintRuleEntry, o as VizeRuleConfigPresetInput, r as OxlintRuleSeverity, s as configs, t as OxlintRuleConfig, u as PatinaSettings } from "./configs-DoDD2QlL.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin.d.ts
|
|
4
4
|
declare const _default: import("@oxlint/plugins").Plugin;
|
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-De9Y_xO7.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.631.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.631.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.631.0",
|
|
59
|
+
"@vizejs/native-darwin-x64": "0.631.0",
|
|
60
|
+
"@vizejs/native-linux-arm64-gnu": "0.631.0",
|
|
61
|
+
"@vizejs/native-linux-arm64-musl": "0.631.0",
|
|
62
|
+
"@vizejs/native-linux-x64-gnu": "0.631.0",
|
|
63
|
+
"@vizejs/native-linux-x64-musl": "0.631.0",
|
|
64
|
+
"@vizejs/native-win32-arm64-msvc": "0.631.0",
|
|
65
|
+
"@vizejs/native-win32-x64-msvc": "0.631.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 && 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",
|
|
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",
|
|
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"
|