oxlint-plugin-vize 0.740.0 → 0.742.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.
@@ -87,7 +87,10 @@ interface VizeRuleOptions {
87
87
  allow?: Array<"plain" | "scoped" | "module">;
88
88
  };
89
89
  "vue/no-restricted-syntax"?: {
90
- selectors?: Array<"ArrayExpression" | "BinaryExpression" | "CallExpression" | "ConditionalExpression" | "ObjectExpression" | "UnaryExpression">;
90
+ selectors?: Array<string | {
91
+ selector: string;
92
+ message?: string;
93
+ }>;
91
94
  };
92
95
  "vue/quote-props"?: "as-needed";
93
96
  "vue/sort-keys"?: {
@@ -280,7 +280,7 @@ function getRuleOptions(ruleName, options) {
280
280
  break;
281
281
  case "vue/attribute-hyphenation": return getAttributeHyphenationOptions(options);
282
282
  case "vue/no-restricted-syntax":
283
- if (options.every(isSupportedRestrictedSyntaxSelector)) return { ruleOptions: { "vue/no-restricted-syntax": { selectors: [...options] } } };
283
+ if (options.every(isSupportedRestrictedSyntaxEntry)) return { ruleOptions: { "vue/no-restricted-syntax": { selectors: [...options] } } };
284
284
  break;
285
285
  case "vue/quote-props":
286
286
  if (firstOption === "as-needed") return { ruleOptions: { "vue/quote-props": firstOption } };
@@ -312,15 +312,11 @@ function getRuleOptions(ruleName, options) {
312
312
  break;
313
313
  }
314
314
  }
315
- function isSupportedRestrictedSyntaxSelector(value) {
316
- return isString(value) && [
317
- "ArrayExpression",
318
- "BinaryExpression",
319
- "CallExpression",
320
- "ConditionalExpression",
321
- "ObjectExpression",
322
- "UnaryExpression"
323
- ].includes(value);
315
+ const UNSUPPORTED_PSEUDO_CLASS = /:(?!(?:matches|is|not|has|nth-child|nth-last-child)\(|(?:first-child|last-child|statement|expression|declaration|function|pattern)\b)/u;
316
+ /** A string or `{ selector, message }` entry within Patina's esquery subset. */
317
+ function isSupportedRestrictedSyntaxEntry(value) {
318
+ const selector = isString(value) ? value : isRecord(value) && hasOnlyKeys(value, ["selector", "message"]) && isString(value.selector) && (value.message === void 0 || isString(value.message)) ? value.selector : void 0;
319
+ return selector !== void 0 && selector.trim() !== "" && !UNSUPPORTED_PSEUDO_CLASS.test(selector.replace(/(["'])(?:\\.|(?!\1).)*\1|\/(?:\\.|[^/])*\//gu, ""));
324
320
  }
325
321
  function isDefineMacrosOrderOption(value) {
326
322
  if (!isRecord(value) || !hasOnlyKeys(value, ["order"])) return false;
@@ -1042,14 +1038,15 @@ function ruleOptionsSchema(ruleName) {
1042
1038
  } })];
1043
1039
  case "vue/no-restricted-syntax": return {
1044
1040
  type: "array",
1045
- items: { enum: [
1046
- "ArrayExpression",
1047
- "BinaryExpression",
1048
- "CallExpression",
1049
- "ConditionalExpression",
1050
- "ObjectExpression",
1051
- "UnaryExpression"
1052
- ] },
1041
+ items: { oneOf: [{ type: "string" }, {
1042
+ type: "object",
1043
+ properties: {
1044
+ selector: { type: "string" },
1045
+ message: { type: "string" }
1046
+ },
1047
+ required: ["selector"],
1048
+ additionalProperties: false
1049
+ }] },
1053
1050
  uniqueItems: true
1054
1051
  };
1055
1052
  case "vue/quote-props": return [{ enum: ["as-needed"] }];
package/dist/eslint.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as createVizeRuleConfig, s as configs } from "./configs-BodUXQCu.mjs";
1
+ import { c as createVizeRuleConfig, s as configs } from "./configs-10eAJ8Lb.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-BBl5BAJC.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-CFIDpbq9.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-BodUXQCu.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-10eAJ8Lb.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-BBl5BAJC.mjs";
1
+ import { c as getPatinaRules, n as createVizeRuleConfig, p as selectVizeRuleConfig, r as plugin_default, t as configs } from "./configs-CFIDpbq9.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.740.0",
3
+ "version": "0.742.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.740.0",
54
+ "@vizejs/native": "0.742.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.740.0",
67
- "@vizejs/native-darwin-x64": "0.740.0",
68
- "@vizejs/native-linux-arm64-gnu": "0.740.0",
69
- "@vizejs/native-linux-arm64-musl": "0.740.0",
70
- "@vizejs/native-linux-x64-gnu": "0.740.0",
71
- "@vizejs/native-linux-x64-musl": "0.740.0",
72
- "@vizejs/native-win32-arm64-msvc": "0.740.0",
73
- "@vizejs/native-win32-x64-msvc": "0.740.0"
66
+ "@vizejs/native-darwin-arm64": "0.742.0",
67
+ "@vizejs/native-darwin-x64": "0.742.0",
68
+ "@vizejs/native-linux-arm64-gnu": "0.742.0",
69
+ "@vizejs/native-linux-arm64-musl": "0.742.0",
70
+ "@vizejs/native-linux-x64-gnu": "0.742.0",
71
+ "@vizejs/native-linux-x64-musl": "0.742.0",
72
+ "@vizejs/native-win32-arm64-msvc": "0.742.0",
73
+ "@vizejs/native-win32-x64-msvc": "0.742.0"
74
74
  },
75
75
  "engines": {
76
76
  "node": "^22 || >= 24"