oxlint-plugin-vize 0.729.0 → 0.730.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.
@@ -279,6 +279,21 @@ function getRuleOptions(ruleName, options) {
279
279
  if (isVBindStyle(firstOption)) return { ruleOptions: { "vue/v-bind-style": firstOption } };
280
280
  break;
281
281
  case "vue/attribute-hyphenation": return getAttributeHyphenationOptions(options);
282
+ case "vue/no-restricted-syntax":
283
+ if (options.every(isSupportedRestrictedSyntaxSelector)) return { ruleOptions: { "vue/no-restricted-syntax": { selectors: [...options] } } };
284
+ break;
285
+ case "vue/quote-props":
286
+ if (firstOption === "as-needed") return { ruleOptions: { "vue/quote-props": firstOption } };
287
+ break;
288
+ case "vue/sort-keys": {
289
+ if (firstOption !== void 0 && firstOption !== "asc" && firstOption !== "desc") break;
290
+ const secondOption = options[1];
291
+ if (secondOption !== void 0 && (!isRecord(secondOption) || !hasOnlyKeys(secondOption, ["caseSensitive", "natural"]) || !optionalBooleanField(secondOption.caseSensitive) || !optionalBooleanField(secondOption.natural))) break;
292
+ return { ruleOptions: { "vue/sort-keys": {
293
+ order: firstOption ?? "asc",
294
+ ...isRecord(secondOption) ? structuredClone(secondOption) : {}
295
+ } } };
296
+ }
282
297
  case "script/define-props-destructuring":
283
298
  case "html/no-empty-palpable-content":
284
299
  case "type/strict-boolean-expressions":
@@ -288,6 +303,7 @@ function getRuleOptions(ruleName, options) {
288
303
  case "vue/no-bare-strings-in-template":
289
304
  case "a11y/anchor-has-content":
290
305
  case "a11y/label-has-for":
306
+ case "vue/enforce-style-attribute":
291
307
  case "vue/require-component-registration":
292
308
  case "vue/valid-v-on":
293
309
  case "vue/valid-v-slot":
@@ -296,6 +312,16 @@ function getRuleOptions(ruleName, options) {
296
312
  break;
297
313
  }
298
314
  }
315
+ function isSupportedRestrictedSyntaxSelector(value) {
316
+ return isString(value) && [
317
+ "ArrayExpression",
318
+ "BinaryExpression",
319
+ "CallExpression",
320
+ "ConditionalExpression",
321
+ "ObjectExpression",
322
+ "UnaryExpression"
323
+ ].includes(value);
324
+ }
299
325
  function isDefineMacrosOrderOption(value) {
300
326
  if (!isRecord(value) || !hasOnlyKeys(value, ["order"])) return false;
301
327
  const order = value.order;
@@ -1005,6 +1031,32 @@ function ruleOptionsSchema(ruleName) {
1005
1031
  case "vue/no-bare-strings-in-template": return [objectSchema({ allowlist: stringArraySchema() })];
1006
1032
  case "a11y/anchor-has-content": return [objectSchema({ accessibleChildren: stringArraySchema() })];
1007
1033
  case "a11y/label-has-for": return [objectSchema({ controlComponents: stringArraySchema() })];
1034
+ case "vue/enforce-style-attribute": return [objectSchema({ allow: {
1035
+ type: "array",
1036
+ items: { enum: [
1037
+ "plain",
1038
+ "scoped",
1039
+ "module"
1040
+ ] },
1041
+ uniqueItems: true
1042
+ } })];
1043
+ case "vue/no-restricted-syntax": return {
1044
+ type: "array",
1045
+ items: { enum: [
1046
+ "ArrayExpression",
1047
+ "BinaryExpression",
1048
+ "CallExpression",
1049
+ "ConditionalExpression",
1050
+ "ObjectExpression",
1051
+ "UnaryExpression"
1052
+ ] },
1053
+ uniqueItems: true
1054
+ };
1055
+ case "vue/quote-props": return [{ enum: ["as-needed"] }];
1056
+ case "vue/sort-keys": return [{ enum: ["asc", "desc"] }, objectSchema({
1057
+ caseSensitive: { type: "boolean" },
1058
+ natural: { type: "boolean" }
1059
+ })];
1008
1060
  case "script/define-macros-order": return [defineMacrosOrderSchema()];
1009
1061
  case "vue/sfc-element-order": return [sfcElementOrderSchema()];
1010
1062
  case "vue/html-self-closing": return [htmlSelfClosingSchema()];
@@ -83,6 +83,18 @@ interface VizeRuleOptions {
83
83
  "a11y/label-has-for"?: {
84
84
  controlComponents?: string[];
85
85
  };
86
+ "vue/enforce-style-attribute"?: {
87
+ allow?: Array<"plain" | "scoped" | "module">;
88
+ };
89
+ "vue/no-restricted-syntax"?: {
90
+ selectors?: Array<"ArrayExpression" | "BinaryExpression" | "CallExpression" | "ConditionalExpression" | "ObjectExpression" | "UnaryExpression">;
91
+ };
92
+ "vue/quote-props"?: "as-needed";
93
+ "vue/sort-keys"?: {
94
+ order?: "asc" | "desc";
95
+ caseSensitive?: boolean;
96
+ natural?: boolean;
97
+ };
86
98
  "vue/require-component-registration"?: {
87
99
  globals?: string[];
88
100
  };
package/dist/eslint.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as createVizeRuleConfig, s as configs } from "./configs-C1P9iomw.mjs";
1
+ import { c as createVizeRuleConfig, s as configs } from "./configs-BodUXQCu.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-CRRkC_Gm.mjs";
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-BBl5BAJC.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-C1P9iomw.mjs";
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-BodUXQCu.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-CRRkC_Gm.mjs";
1
+ import { c as getPatinaRules, n as createVizeRuleConfig, p as selectVizeRuleConfig, r as plugin_default, t as configs } from "./configs-BBl5BAJC.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.729.0",
3
+ "version": "0.730.0",
4
4
  "description": "Oxlint JS plugin bridge for Vize Patina",
5
5
  "keywords": [
6
6
  "lint",
@@ -51,7 +51,7 @@
51
51
  "@tsdown/css": "0.22.14",
52
52
  "@types/node": "25.9.2",
53
53
  "@typescript-eslint/parser": "8.72.1",
54
- "@vizejs/native": "0.729.0",
54
+ "@vizejs/native": "0.730.0",
55
55
  "ajv": "8.20.0",
56
56
  "eslint": "10.14.0",
57
57
  "eslint-plugin-vue": "10.12.0",
@@ -63,14 +63,14 @@
63
63
  "vue-eslint-parser": "10.4.2"
64
64
  },
65
65
  "optionalDependencies": {
66
- "@vizejs/native-darwin-arm64": "0.729.0",
67
- "@vizejs/native-darwin-x64": "0.729.0",
68
- "@vizejs/native-linux-arm64-gnu": "0.729.0",
69
- "@vizejs/native-linux-arm64-musl": "0.729.0",
70
- "@vizejs/native-linux-x64-gnu": "0.729.0",
71
- "@vizejs/native-linux-x64-musl": "0.729.0",
72
- "@vizejs/native-win32-arm64-msvc": "0.729.0",
73
- "@vizejs/native-win32-x64-msvc": "0.729.0"
66
+ "@vizejs/native-darwin-arm64": "0.730.0",
67
+ "@vizejs/native-darwin-x64": "0.730.0",
68
+ "@vizejs/native-linux-arm64-gnu": "0.730.0",
69
+ "@vizejs/native-linux-arm64-musl": "0.730.0",
70
+ "@vizejs/native-linux-x64-gnu": "0.730.0",
71
+ "@vizejs/native-linux-x64-musl": "0.730.0",
72
+ "@vizejs/native-win32-arm64-msvc": "0.730.0",
73
+ "@vizejs/native-win32-x64-msvc": "0.730.0"
74
74
  },
75
75
  "engines": {
76
76
  "node": "^22 || >= 24"