@vizejs/nuxt 0.776.0 → 0.778.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/index.mjs +1 -1
- package/dist/lint/index.d.mts +3 -1
- package/dist/lint/index.mjs +1 -1
- package/dist/plugin-host-DceWq7qc.mjs +2 -0
- package/dist/plugin-plan-BP7D94hI.mjs +721 -0
- package/dist/plugin-tools-BIfO2-qs.mjs +127 -0
- package/dist/{setup-CA6DHcgG.mjs → setup-BzMA5sFo.mjs} +215 -12
- package/package.json +7 -7
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { a as PLUGIN_REGISTRY, o as VizePluginPlanError, s as deepFreeze, t as callbackKey } from "./plugin-plan-BP7D94hI.mjs";
|
|
2
|
+
//#region ../../../crates/vize_carton/src/config/loader/plugin-inspect.js
|
|
3
|
+
/**
|
|
4
|
+
* Capabilities addressed to `product` that it does not implement. A product
|
|
5
|
+
* that receives any of them must refuse the plan instead of ignoring them.
|
|
6
|
+
*/
|
|
7
|
+
function pluginPlanRefusals(plan, product, { output } = {}) {
|
|
8
|
+
if (!PLUGIN_REGISTRY.products.includes(product)) throw new VizePluginPlanError("product-unknown", product, "is not a Vize product");
|
|
9
|
+
const refused = [];
|
|
10
|
+
for (const plugin of plan.plugins) for (const capability of plugin.capabilities) {
|
|
11
|
+
const known = PLUGIN_REGISTRY.capabilities[capability.id];
|
|
12
|
+
if (!known.consumers.includes(product)) continue;
|
|
13
|
+
if (!known.admittedBy.includes(product)) refused.push({
|
|
14
|
+
capability: capability.id,
|
|
15
|
+
key: capability.key,
|
|
16
|
+
plugin: plugin.name,
|
|
17
|
+
reason: "unadmitted"
|
|
18
|
+
});
|
|
19
|
+
else if (output !== void 0 && plugin.supports && !plugin.supports.outputs.includes(output)) refused.push({
|
|
20
|
+
capability: capability.id,
|
|
21
|
+
key: capability.key,
|
|
22
|
+
plugin: plugin.name,
|
|
23
|
+
reason: `output:${output}`
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return refused;
|
|
27
|
+
}
|
|
28
|
+
/** The `vize plugin inspect --json` view: the plan plus per-product admission. */
|
|
29
|
+
function inspectPluginPlan({ plan, digest }) {
|
|
30
|
+
return deepFreeze({
|
|
31
|
+
admission: Object.fromEntries(PLUGIN_REGISTRY.products.map((product) => {
|
|
32
|
+
const refused = pluginPlanRefusals(plan, product);
|
|
33
|
+
const used = plan.plugins.some((plugin) => plugin.capabilities.some((capability) => PLUGIN_REGISTRY.capabilities[capability.id].consumers.includes(product)));
|
|
34
|
+
return [product, {
|
|
35
|
+
refused,
|
|
36
|
+
status: refused.length ? "refused" : used ? "ready" : "unused"
|
|
37
|
+
}];
|
|
38
|
+
})),
|
|
39
|
+
claims: plan.claims,
|
|
40
|
+
digest,
|
|
41
|
+
order: plan.plugins.map((plugin) => plugin.name),
|
|
42
|
+
planSchema: plan.planSchema,
|
|
43
|
+
plugins: plan.plugins
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region ../../../crates/vize_carton/src/config/loader/plugin-lint.js
|
|
48
|
+
const LINT_CAPABILITIES = ["lint.plugin-v1", "lint.rule"];
|
|
49
|
+
/** Execute `request.jobs` against the plan this process resolved itself. */
|
|
50
|
+
function runPluginLintJobs(resolved, request) {
|
|
51
|
+
if (resolved === void 0) throw new VizePluginPlanError("plan-stale", "plan", "vite.config.* no longer lists plugins");
|
|
52
|
+
if (request?.digest !== resolved.digest) throw new VizePluginPlanError("plan-stale", "plan", `the lint request was planned for ${request?.digest}, but vite.config.* now resolves to ${resolved.digest}`);
|
|
53
|
+
return {
|
|
54
|
+
digest: resolved.digest,
|
|
55
|
+
jobs: request.jobs.map((job) => runJob(resolved, job))
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function runJob(resolved, job) {
|
|
59
|
+
const plugin = resolved.plan.plugins.find((candidate) => candidate.name === job.plugin);
|
|
60
|
+
const capability = plugin?.capabilities.find((candidate) => candidate.id === job.capability && candidate.key === job.key);
|
|
61
|
+
if (!capability || !LINT_CAPABILITIES.includes(capability.id)) throw new VizePluginPlanError("plan-stale", `${job.plugin} ${job.capability} ${job.key}`, "is not a lint capability of the resolved plan");
|
|
62
|
+
const run = resolved.callbacks.get(callbackKey(plugin.name, capability.id, capability.key, "run"));
|
|
63
|
+
const where = `${plugin.name} ${capability.key}`;
|
|
64
|
+
const started = process.hrtime.bigint();
|
|
65
|
+
const documents = job.documents.map(({ file, batch }) => {
|
|
66
|
+
try {
|
|
67
|
+
return {
|
|
68
|
+
file,
|
|
69
|
+
reports: capability.id === "lint.plugin-v1" ? run(batch) : runRule(run, plugin, capability.data, JSON.parse(batch))
|
|
70
|
+
};
|
|
71
|
+
} catch (error) {
|
|
72
|
+
if (error instanceof VizePluginPlanError) throw error;
|
|
73
|
+
throw new VizePluginPlanError("rule-failed", where, `${file}: ${error instanceof Error ? error.message : String(error)}`);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return {
|
|
77
|
+
capability: capability.id,
|
|
78
|
+
documents,
|
|
79
|
+
jsNs: Number(process.hrtime.bigint() - started),
|
|
80
|
+
key: capability.key,
|
|
81
|
+
plugin: plugin.name
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function runRule(run, plugin, rule, batch) {
|
|
85
|
+
deepFreeze(batch);
|
|
86
|
+
const where = `${plugin.name}/${rule.id}`;
|
|
87
|
+
const byId = new Map(batch.nodes.map((node) => [node.id, node]));
|
|
88
|
+
const reports = [];
|
|
89
|
+
if (run(Object.freeze({
|
|
90
|
+
file: batch.file,
|
|
91
|
+
nodes: batch.nodes,
|
|
92
|
+
options: plugin.options,
|
|
93
|
+
facts(name) {
|
|
94
|
+
if (!rule.demands.includes(name)) throw new VizePluginPlanError("report-invalid", where, `fact group \`${name}\` was not demanded`);
|
|
95
|
+
return new Map(batch.facts[name]);
|
|
96
|
+
},
|
|
97
|
+
*ancestors(node, kind) {
|
|
98
|
+
if (!rule.visit.includes(kind)) throw new VizePluginPlanError("report-invalid", where, `ancestors of kind ${kind} need ${kind} in visit`);
|
|
99
|
+
for (let id = batch.parents[node.id]; id !== void 0 && id !== -1; id = batch.parents[id]) {
|
|
100
|
+
const found = byId.get(id);
|
|
101
|
+
if (found && found.kind === kind) yield found;
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
report(report) {
|
|
105
|
+
const node = report?.node;
|
|
106
|
+
if (!node || byId.get(node.id) !== node) throw new VizePluginPlanError("report-invalid", where, "a report needs a visited node");
|
|
107
|
+
if (!Object.hasOwn(rule.messages, report.messageId)) throw new VizePluginPlanError("report-invalid", where, `undeclared message id \`${report.messageId}\``);
|
|
108
|
+
const data = report.data ?? void 0;
|
|
109
|
+
if (data !== void 0 && (data === null || typeof data !== "object" || Object.values(data).some((value) => ![
|
|
110
|
+
"string",
|
|
111
|
+
"number",
|
|
112
|
+
"boolean"
|
|
113
|
+
].includes(typeof value)))) throw new VizePluginPlanError("report-invalid", where, "report data values must be strings, numbers or booleans");
|
|
114
|
+
if (report.fix !== void 0 && typeof report.fix !== "string") throw new VizePluginPlanError("report-invalid", where, "a fix is replacement text for the reported node");
|
|
115
|
+
if (report.fix !== void 0 && rule.fixable === "none") throw new VizePluginPlanError("report-invalid", where, "fixes need meta.fixable \"safe\" or \"unsafe\"");
|
|
116
|
+
reports.push({
|
|
117
|
+
...data === void 0 ? {} : { data: { ...data } },
|
|
118
|
+
...report.fix === void 0 ? {} : { fix: report.fix },
|
|
119
|
+
messageId: report.messageId,
|
|
120
|
+
node: node.id
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
})) !== void 0) throw new VizePluginPlanError("report-invalid", where, "a rule returns nothing; report through context.report");
|
|
124
|
+
return reports;
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
export { inspectPluginPlan, runPluginLintJobs };
|
|
@@ -176,7 +176,7 @@ function mergeRules(target, source) {
|
|
|
176
176
|
Object.assign(target, prefixVizeRules(source));
|
|
177
177
|
}
|
|
178
178
|
/** Render the complete generated oxlint config, including its trailing newline. */
|
|
179
|
-
function renderNuxtOxlintConfig(items, pluginSpecifier, globBase, projectJsPlugins = []) {
|
|
179
|
+
function renderNuxtOxlintConfig(items, pluginSpecifier, globBase, projectJsPlugins = [], pluginRules = false) {
|
|
180
180
|
if (globBase) {
|
|
181
181
|
const root = path.relative(globBase.configDir, globBase.rootDir);
|
|
182
182
|
if (root === ".." || root.startsWith(`..${path.sep}`) || path.isAbsolute(root)) throw new Error("Generated oxlint config must be in the lint root or an ancestor directory");
|
|
@@ -211,7 +211,8 @@ function renderNuxtOxlintConfig(items, pluginSpecifier, globBase, projectJsPlugi
|
|
|
211
211
|
}, ...projectJsPlugins.map((specifier) => rebaseJsPlugin(specifier, globBase?.configDir))],
|
|
212
212
|
settings: { vize: {
|
|
213
213
|
preset: "incremental",
|
|
214
|
-
...globBase?.owner ? { generatedBy: globBase.owner } : {}
|
|
214
|
+
...globBase?.owner ? { generatedBy: globBase.owner } : {},
|
|
215
|
+
...pluginRules ? { pluginRules: true } : {}
|
|
215
216
|
} }
|
|
216
217
|
};
|
|
217
218
|
if (ignorePatterns.length > 0) config.ignorePatterns = ignorePatterns;
|
|
@@ -615,6 +616,60 @@ async function importConfigModuleWithDependencies(configPath, registerModuleHook
|
|
|
615
616
|
}
|
|
616
617
|
}
|
|
617
618
|
//#endregion
|
|
619
|
+
//#region ../../../crates/vize_carton/src/config/loader/vite-runtime-validation.js
|
|
620
|
+
function createVueOptionValidator(definitions, object, attributePolicy) {
|
|
621
|
+
function validateVueOption(value, schema, label) {
|
|
622
|
+
if (schema === attributePolicy && typeof value === "string") return validateVueOption(value, schema.oneOf[0], label);
|
|
623
|
+
const refuse = (reason) => {
|
|
624
|
+
throw new TypeError(`${label}: ${reason}`);
|
|
625
|
+
};
|
|
626
|
+
if (schema.$ref) return validateVueOption(value, definitions[schema.$ref.split("/").at(-1)], label);
|
|
627
|
+
if (schema.oneOf) {
|
|
628
|
+
if (schema.oneOf.filter((candidate) => {
|
|
629
|
+
try {
|
|
630
|
+
validateVueOption(value, candidate, label);
|
|
631
|
+
return true;
|
|
632
|
+
} catch (error) {
|
|
633
|
+
if (!(error instanceof TypeError)) throw error;
|
|
634
|
+
return false;
|
|
635
|
+
}
|
|
636
|
+
}).length !== 1) refuse("must match one documented native option type");
|
|
637
|
+
if (schema === attributePolicy && object(value) && Array.isArray(value.ignoreTags) && value.ignoreTags.some((tag) => /^\/(.+)\/(.*)$/u.test(tag))) refuse("ignoreTags supports literal tag names only; regular-expression policies are unsupported");
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
640
|
+
if (schema.enum && !schema.enum.includes(value)) refuse("unsupported native option value");
|
|
641
|
+
const valid = {
|
|
642
|
+
object: object(value),
|
|
643
|
+
array: Array.isArray(value),
|
|
644
|
+
string: typeof value === "string",
|
|
645
|
+
boolean: typeof value === "boolean",
|
|
646
|
+
integer: Number.isInteger(value),
|
|
647
|
+
number: typeof value === "number" && Number.isFinite(value),
|
|
648
|
+
null: value === null
|
|
649
|
+
};
|
|
650
|
+
if (schema.type && !valid[schema.type]) refuse(`must be ${schema.type}`);
|
|
651
|
+
if (schema.minimum !== void 0 && value < schema.minimum) refuse(`must be >= ${schema.minimum}`);
|
|
652
|
+
if (schema.maximum !== void 0 && value > schema.maximum) refuse(`must be <= ${schema.maximum}`);
|
|
653
|
+
if (typeof value === "string" && schema.pattern && !new RegExp(schema.pattern).test(value)) refuse(`must match ${schema.pattern}`);
|
|
654
|
+
if (Array.isArray(value) && schema.items) for (let index = 0; index < value.length; index++) validateVueOption(value[index], schema.items, `${label}[${index}]`);
|
|
655
|
+
if (Array.isArray(value) && schema.uniqueItems) {
|
|
656
|
+
const keys = value.map((item) => JSON.stringify(item, (_key, entry) => object(entry) ? Object.fromEntries(Object.entries(entry).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0)) : entry));
|
|
657
|
+
if (new Set(keys).size !== keys.length) refuse("must contain unique items");
|
|
658
|
+
}
|
|
659
|
+
if (object(value)) {
|
|
660
|
+
for (const required of schema.required ?? []) if (!Object.hasOwn(value, required) || value[required] === void 0) refuse(`missing ${required}`);
|
|
661
|
+
for (const [key, item] of Object.entries(value)) {
|
|
662
|
+
const documented = Object.hasOwn(schema.properties ?? {}, key);
|
|
663
|
+
if (!documented && schema.additionalProperties === false) refuse(`unknown option "${key}"`);
|
|
664
|
+
if (schema.propertyNames?.pattern && !new RegExp(schema.propertyNames.pattern).test(key)) refuse(`invalid native option name ${key}`);
|
|
665
|
+
const rule = documented ? schema.properties[key] : schema.additionalProperties;
|
|
666
|
+
if (item !== void 0 && object(rule)) validateVueOption(item, rule, `${label}.${key}`);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
return validateVueOption;
|
|
671
|
+
}
|
|
672
|
+
//#endregion
|
|
618
673
|
//#region ../../../crates/vize_carton/src/config/loader/vite-runtime.mjs
|
|
619
674
|
const vueOptionSchema = JSON.parse("{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"compiler\":{\"$ref\":\"#/definitions/CompilerConfig\"},\"experimentals\":{\"type\":\"object\",\"additionalProperties\":{\"oneOf\":[{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":true},{\"type\":\"null\"}]}},\"dialect\":{\"type\":\"string\",\"enum\":[\"vue\",\"petite-vue\"]},\"vite\":{\"$ref\":\"#/definitions/VitePluginConfig\"},\"musea\":{\"$ref\":\"#/definitions/MuseaConfig\"},\"typeChecker\":{\"$ref\":\"#/definitions/TypeCheckerConfig\"},\"linter\":{\"$ref\":\"#/definitions/LinterConfig\"},\"formatter\":{\"$ref\":\"#/definitions/FormatterConfig\"},\"languageServer\":{\"$ref\":\"#/definitions/LanguageServerConfig\"},\"globalTypes\":{\"$ref\":\"#/definitions/GlobalTypesConfig\"},\"files\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"ignores\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"basePath\":{\"type\":\"string\"},\"lib\":{\"$ref\":\"#/definitions/LibConfig\"},\"compile\":{\"$ref\":\"#/definitions/CompilerConfig\"},\"typeCheck\":{\"$ref\":\"#/definitions/TypeCheckerConfig\"},\"fmt\":{\"$ref\":\"#/definitions/FormatterConfig\"},\"lint\":{\"type\":\"object\",\"required\":[\"jsPlugins\",\"plugins\",\"rules\",\"settings\"],\"properties\":{\"jsPlugins\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"plugins\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"rules\":{\"type\":\"object\",\"additionalProperties\":true},\"settings\":{\"type\":\"object\",\"additionalProperties\":true},\"ignorePatterns\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"overrides\":{\"type\":\"array\"}},\"additionalProperties\":true},\"version\":{\"$ref\":\"#/definitions/VueVersion\"},\"entries\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"basePath\":{\"type\":\"string\"},\"files\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"ignores\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"compiler\":{\"$ref\":\"#/definitions/CompilerConfig\"},\"linter\":{\"$ref\":\"#/definitions/LinterConfig\"}},\"additionalProperties\":false}}},\"additionalProperties\":false,\"definitions\":{\"CompilerConfig\":{\"type\":\"object\",\"properties\":{\"mode\":{\"type\":\"string\",\"enum\":[\"module\",\"function\"]},\"vapor\":{\"type\":\"boolean\"},\"jsxMode\":{\"type\":\"string\",\"enum\":[\"vdom\",\"vapor\"]},\"jsxCompat\":{\"type\":\"string\",\"enum\":[\"native\",\"babel\"]},\"customRenderer\":{\"type\":\"boolean\"},\"customElements\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"ssr\":{\"type\":\"boolean\"},\"templateSyntax\":{\"type\":\"string\",\"enum\":[\"standard\",\"strict\",\"quirks\"]},\"whitespace\":{\"type\":\"string\",\"enum\":[\"condense\",\"preserve\",\"vue2-line-breaks\",\"vue2-preserve\"]},\"sourceMap\":{\"type\":\"boolean\"},\"prefixIdentifiers\":{\"type\":\"boolean\"},\"hoistStatic\":{\"type\":\"boolean\"},\"cacheHandlers\":{\"type\":\"boolean\"},\"comments\":{\"type\":\"boolean\"},\"isTs\":{\"type\":\"boolean\"},\"scriptExt\":{\"type\":\"string\",\"enum\":[\"ts\",\"js\"]},\"runtimeModuleName\":{\"type\":\"string\"},\"runtimeGlobalName\":{\"type\":\"string\"},\"compatibility\":{\"$ref\":\"#/definitions/CompilerCompatibilityConfig\"}},\"additionalProperties\":false},\"CompilerCompatibilityConfig\":{\"type\":\"object\",\"properties\":{\"vueVersion\":{\"$ref\":\"#/definitions/VueVersion\"},\"hostCompiler\":{\"type\":\"boolean\"},\"scriptSetupInStandalone\":{\"type\":\"boolean\"},\"optionsApiVapor\":{\"type\":\"boolean\"},\"nuxtVersion\":{\"type\":\"integer\",\"enum\":[2,3,4]},\"webpackVersion\":{\"type\":\"integer\",\"enum\":[4,5]}},\"additionalProperties\":false},\"VueVersion\":{\"type\":\"string\",\"enum\":[\"3\",\"2.7\",\"2\",\"1\",\"0.11\",\"0.10\"]},\"VitePluginConfig\":{\"type\":\"object\",\"properties\":{\"include\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"exclude\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"scanPatterns\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"ignorePatterns\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"MuseaConfig\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"exclude\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"basePath\":{\"type\":\"string\"},\"storybookCompat\":{\"type\":\"boolean\"},\"inlineArt\":{\"type\":\"boolean\"},\"vrt\":{\"$ref\":\"#/definitions/MuseaVrtConfig\"},\"a11y\":{\"$ref\":\"#/definitions/MuseaA11yConfig\"},\"autogen\":{\"$ref\":\"#/definitions/MuseaAutogenConfig\"}},\"additionalProperties\":false},\"MuseaVrtConfig\":{\"type\":\"object\",\"properties\":{\"threshold\":{\"type\":\"number\"},\"outDir\":{\"type\":\"string\"},\"viewports\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/MuseaViewport\"}}},\"additionalProperties\":false},\"MuseaViewport\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\"},\"height\":{\"type\":\"integer\"},\"name\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"width\",\"height\"]},\"MuseaA11yConfig\":{\"type\":\"object\",\"properties\":{\"enabled\":{\"type\":\"boolean\"},\"rules\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"boolean\"}}},\"additionalProperties\":false},\"MuseaAutogenConfig\":{\"type\":\"object\",\"properties\":{\"enabled\":{\"type\":\"boolean\"},\"maxVariants\":{\"type\":\"integer\"}},\"additionalProperties\":false},\"TypeCheckerConfig\":{\"type\":\"object\",\"properties\":{\"enabled\":{\"type\":\"boolean\"},\"strict\":{\"type\":\"boolean\"},\"checkProps\":{\"type\":\"boolean\"},\"checkEmits\":{\"type\":\"boolean\"},\"checkTemplateBindings\":{\"type\":\"boolean\"},\"checkReactivity\":{\"type\":\"boolean\"},\"checkSetupContext\":{\"type\":\"boolean\"},\"checkInvalidExports\":{\"type\":\"boolean\"},\"checkFallthroughAttrs\":{\"type\":\"boolean\"},\"optionsApi\":{\"type\":\"boolean\"},\"legacyVue2\":{\"type\":\"boolean\"},\"jsxTypecheck\":{\"type\":\"boolean\"},\"tsconfig\":{\"type\":\"string\"},\"corsaPath\":{\"type\":\"string\"},\"tsgoPath\":{\"type\":\"string\"},\"tsrsPath\":{\"type\":\"string\"},\"globalsFile\":{\"type\":\"string\"},\"servers\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":32},\"lspRequestTimeoutMs\":{\"type\":\"integer\",\"minimum\":1}},\"additionalProperties\":false},\"LinterConfig\":{\"type\":\"object\",\"properties\":{\"enabled\":{\"type\":\"boolean\"},\"preset\":{\"type\":\"string\",\"enum\":[\"general-recommended\",\"general_recommended\",\"generalRecommended\",\"happy-path\",\"happy_path\",\"happy\",\"default\",\"recommended\",\"opinionated\",\"strict\",\"all\",\"essential\",\"incremental\",\"ecosystem\",\"nuxt\"]},\"typeAware\":{\"type\":\"boolean\"},\"crossFile\":{\"type\":\"boolean\"},\"crossFileTree\":{\"type\":\"boolean\"},\"crossFileComplexity\":{\"type\":\"boolean\"},\"strictReactivity\":{\"type\":\"boolean\"},\"maxWarnings\":{\"type\":\"integer\",\"minimum\":0},\"noInlineConfig\":{\"type\":\"boolean\"},\"reportUnusedDisableDirectives\":{\"type\":\"boolean\"},\"rules\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]}},\"ruleOptions\":{\"$ref\":\"#/definitions/LintRuleOptions\"},\"categories\":{\"type\":\"object\",\"properties\":{\"correctness\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]},\"suspicious\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]},\"style\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]},\"perf\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]},\"a11y\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]},\"security\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]}},\"additionalProperties\":false}},\"additionalProperties\":false},\"LintRuleOptions\":{\"type\":\"object\",\"properties\":{\"script/define-macros-order\":{\"type\":\"object\",\"properties\":{\"order\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1},\"uniqueItems\":true},\"defineExposeLast\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"script/define-props-destructuring\":{\"type\":\"object\",\"properties\":{\"destructure\":{\"type\":\"string\",\"enum\":[\"only-when-assigned\",\"always\",\"never\"]}},\"additionalProperties\":false},\"html/no-empty-palpable-content\":{\"type\":\"object\",\"properties\":{\"contentDirectives\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"type/strict-boolean-expressions\":{\"type\":\"object\",\"properties\":{\"allowString\":{\"type\":\"boolean\"},\"allowNumber\":{\"type\":\"boolean\"},\"allowNullableObject\":{\"type\":\"boolean\"},\"allowNullableBoolean\":{\"type\":\"boolean\"},\"allowNullableString\":{\"type\":\"boolean\"},\"allowNullableNumber\":{\"type\":\"boolean\"},\"allowNullableEnum\":{\"type\":\"boolean\"},\"allowAny\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"script/no-restricted-globals\":{\"$ref\":\"#/definitions/NoRestrictedGlobalsOptions\"},\"script/no-restricted-members\":{\"$ref\":\"#/definitions/NoRestrictedMembersOptions\"},\"vue/component-name-in-template-casing\":{\"type\":\"object\",\"properties\":{\"casing\":{\"type\":\"string\",\"enum\":[\"PascalCase\",\"kebab-case\"]},\"registeredComponentsOnly\":{\"type\":\"boolean\"},\"globals\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"script/custom-event-name-casing\":{\"type\":\"object\",\"properties\":{\"casing\":{\"type\":\"string\",\"enum\":[\"lowercase\",\"camelCase\",\"kebab-case\"]}},\"additionalProperties\":false},\"vue/prop-name-casing\":{\"type\":\"object\",\"properties\":{\"casing\":{\"type\":\"string\",\"enum\":[\"camelCase\",\"snake_case\"]}},\"additionalProperties\":false},\"vue/slot-name-casing\":{\"type\":\"string\",\"enum\":[\"camelCase\",\"kebab-case\",\"singleword\"]},\"vue/no-mutating-props\":{\"type\":\"object\",\"properties\":{\"shallowOnly\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"vue/multi-word-component-names\":{\"type\":\"object\",\"properties\":{\"ignores\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"uniqueItems\":true}},\"additionalProperties\":false},\"vue/warn-custom-directive\":{\"type\":\"object\",\"properties\":{\"ignore\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"vue/no-bare-strings-in-template\":{\"type\":\"object\",\"properties\":{\"allowlist\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"a11y/anchor-has-content\":{\"type\":\"object\",\"properties\":{\"components\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"accessibleChildren\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"accessibleDirectives\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"a11y/heading-has-content\":{\"type\":\"object\",\"properties\":{\"components\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"accessibleChildren\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"accessibleDirectives\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"a11y/label-has-for\":{\"type\":\"object\",\"properties\":{\"controlComponents\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"vue/block-lang\":{\"type\":\"object\",\"properties\":{\"script\":{\"type\":\"object\",\"properties\":{\"lang\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"uniqueItems\":true}]},\"allowNoLang\":{\"type\":\"boolean\"},\"required\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"template\":{\"type\":\"object\",\"properties\":{\"lang\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"uniqueItems\":true}]},\"allowNoLang\":{\"type\":\"boolean\"},\"required\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"style\":{\"type\":\"object\",\"properties\":{\"lang\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"uniqueItems\":true}]},\"allowNoLang\":{\"type\":\"boolean\"},\"required\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false},\"max-lines\":{\"oneOf\":[{\"type\":\"integer\",\"minimum\":0},{\"type\":\"object\",\"properties\":{\"max\":{\"type\":\"integer\",\"minimum\":0},\"skipComments\":{\"type\":\"boolean\"},\"skipBlankLines\":{\"type\":\"boolean\"}},\"additionalProperties\":false}]},\"vue/max-lines-per-block\":{\"type\":\"object\",\"properties\":{\"style\":{\"type\":\"integer\",\"minimum\":1},\"template\":{\"type\":\"integer\",\"minimum\":1},\"script\":{\"type\":\"integer\",\"minimum\":1},\"skipBlankLines\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"vue/max-props\":{\"type\":\"object\",\"properties\":{\"maxProps\":{\"type\":\"integer\"}},\"additionalProperties\":false},\"vue/max-template-depth\":{\"type\":\"object\",\"properties\":{\"maxDepth\":{\"type\":\"integer\"}},\"additionalProperties\":false},\"vue/no-restricted-block\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"vue/no-restricted-call-after-await\":{\"oneOf\":[{\"type\":\"object\",\"properties\":{\"module\":{\"type\":\"string\"},\"path\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"message\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"module\"]},{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"module\":{\"type\":\"string\"},\"path\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"message\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"module\"]}}]},\"vue/no-restricted-class\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"vue/no-restricted-component-names\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"vue/no-restricted-component-options\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"vue/no-restricted-custom-event\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"vue/no-restricted-html-elements\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"vue/no-restricted-props\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"vue/no-restricted-static-attribute\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"vue/no-restricted-v-on\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"vue/no-unsupported-features\":{\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"string\"},\"ignores\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"type/await-thenable\":{\"type\":\"object\",\"properties\":{\"allowMixedPromiseArrays\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"type/no-base-to-string\":{\"type\":\"object\",\"properties\":{\"checkUnknown\":{\"type\":\"boolean\"},\"ignoredTypeNames\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"type/no-confusing-void-expression\":{\"type\":\"object\",\"properties\":{\"ignoreArrowShorthand\":{\"type\":\"boolean\"},\"ignoreVoidOperator\":{\"type\":\"boolean\"},\"ignoreVoidReturningFunctions\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"type/no-deprecated\":{\"type\":\"object\",\"properties\":{\"allow\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"file\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"path\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"lib\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"package\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"package\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\",\"package\"]}]}}},\"additionalProperties\":false},\"type/no-duplicate-type-constituents\":{\"type\":\"object\",\"properties\":{\"ignoreIntersections\":{\"type\":\"boolean\"},\"ignoreUnions\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"type/no-floating-promises\":{\"type\":\"object\",\"properties\":{\"allowForKnownSafeCalls\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"file\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"path\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"lib\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"package\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"package\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\",\"package\"]}]}},\"allowForKnownSafePromises\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"file\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"path\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"lib\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"package\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"package\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\",\"package\"]}]}},\"checkThenables\":{\"type\":\"boolean\"},\"ignoreIIFE\":{\"type\":\"boolean\"},\"ignoreVoid\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"type/no-meaningless-void-operator\":{\"type\":\"object\",\"properties\":{\"checkNever\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"type/no-misused-promises\":{\"type\":\"object\",\"properties\":{\"checksConditionals\":{\"oneOf\":[{\"type\":\"boolean\"},{\"type\":\"object\",\"properties\":{\"flagUnions\":{\"type\":\"string\",\"enum\":[\"all\",\"strict\",\"none\"]}},\"additionalProperties\":false}]},\"checksSpreads\":{\"type\":\"boolean\"},\"checksVoidReturn\":{\"oneOf\":[{\"type\":\"boolean\"},{\"type\":\"object\",\"properties\":{\"arguments\":{\"type\":\"boolean\"},\"attributes\":{\"type\":\"boolean\"},\"inheritedMethods\":{\"type\":\"boolean\"},\"properties\":{\"description\":\"Disables checking an asynchronous function passed as an object property expected to be a function that returns `void`.\",\"type\":\"boolean\"},\"returns\":{\"type\":\"boolean\"},\"variables\":{\"type\":\"boolean\"}},\"additionalProperties\":false}]}},\"additionalProperties\":false},\"type/no-misused-spread\":{\"type\":\"object\",\"properties\":{\"allow\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"file\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"path\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"lib\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"package\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"package\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\",\"package\"]}]}}},\"additionalProperties\":false},\"type/no-unnecessary-boolean-literal-compare\":{\"type\":\"object\",\"properties\":{\"allowComparingNullableBooleansToFalse\":{\"type\":\"boolean\"},\"allowComparingNullableBooleansToTrue\":{\"type\":\"boolean\"},\"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"type/no-unnecessary-condition\":{\"type\":\"object\",\"properties\":{\"allowConstantLoopConditions\":{\"oneOf\":[{\"type\":\"boolean\"},{\"type\":\"string\",\"enum\":[\"always\",\"never\",\"only-allowed-literals\"]}]},\"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing\":{\"type\":\"boolean\"},\"checkTypePredicates\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"type/no-unnecessary-type-assertion\":{\"type\":\"object\",\"properties\":{\"checkLiteralConstAssertions\":{\"type\":\"boolean\"},\"typesToIgnore\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"type/no-unsafe-member-access\":{\"type\":\"object\",\"properties\":{\"allowOptionalChaining\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"type/only-throw-error\":{\"type\":\"object\",\"properties\":{\"allow\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"file\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"path\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"lib\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"package\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"package\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\",\"package\"]}]}},\"allowRethrowing\":{\"type\":\"boolean\"},\"allowThrowingAny\":{\"type\":\"boolean\"},\"allowThrowingUnknown\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"type/prefer-promise-reject-errors\":{\"type\":\"object\",\"properties\":{\"allow\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"file\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"path\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"lib\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"package\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"package\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\",\"package\"]}]}},\"allowEmptyReject\":{\"type\":\"boolean\"},\"allowThrowingAny\":{\"type\":\"boolean\"},\"allowThrowingUnknown\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"type/restrict-plus-operands\":{\"type\":\"object\",\"properties\":{\"allowAny\":{\"type\":\"boolean\"},\"allowBoolean\":{\"type\":\"boolean\"},\"allowNullish\":{\"type\":\"boolean\"},\"allowNumberAndString\":{\"type\":\"boolean\"},\"allowRegExp\":{\"type\":\"boolean\"},\"skipCompoundAssignments\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"type/restrict-template-expressions\":{\"type\":\"object\",\"properties\":{\"allowAny\":{\"type\":\"boolean\"},\"allowArray\":{\"type\":\"boolean\"},\"allowBoolean\":{\"type\":\"boolean\"},\"allowNullish\":{\"type\":\"boolean\"},\"allowNumber\":{\"type\":\"boolean\"},\"allowRegExp\":{\"type\":\"boolean\"},\"allowNever\":{\"type\":\"boolean\"},\"allow\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"file\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"path\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"lib\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]}},\"additionalProperties\":false,\"required\":[\"from\",\"name\"]},{\"type\":\"object\",\"properties\":{\"from\":{\"type\":\"string\",\"enum\":[\"package\"]},\"name\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1,\"uniqueItems\":true}]},\"package\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"from\",\"name\",\"package\"]}]}}},\"additionalProperties\":false},\"type/return-await\":{\"type\":\"string\",\"oneOf\":[{\"type\":\"string\",\"enum\":[\"always\"]},{\"type\":\"string\",\"enum\":[\"error-handling-correctness-only\"]},{\"type\":\"string\",\"enum\":[\"in-try-catch\"]},{\"type\":\"string\",\"enum\":[\"never\"]}]},\"type/unbound-method\":{\"type\":\"object\",\"properties\":{\"ignoreStatic\":{\"type\":\"boolean\"},\"checkGlobalObjectMethods\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"vue/no-unused-script-vars\":{\"type\":\"object\",\"properties\":{\"vars\":{\"type\":\"string\",\"enum\":[\"all\",\"local\"]},\"varsIgnorePattern\":{\"type\":\"string\"},\"args\":{\"type\":\"string\",\"enum\":[\"all\",\"after-used\",\"none\"]},\"argsIgnorePattern\":{\"type\":\"string\"},\"caughtErrors\":{\"type\":\"string\",\"enum\":[\"all\",\"none\"]},\"caughtErrorsIgnorePattern\":{\"type\":\"string\"},\"destructuredArrayIgnorePattern\":{\"type\":\"string\"},\"ignoreRestSiblings\":{\"type\":\"boolean\"},\"ignoreClassWithStaticInitBlock\":{\"type\":\"boolean\"},\"reportUsedIgnorePattern\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"vue/prefer-const\":{\"type\":\"object\",\"properties\":{\"destructuring\":{\"type\":\"string\",\"enum\":[\"any\",\"all\"]},\"ignoreReadBeforeAssign\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"vue/v-on-handler-style\":{\"oneOf\":[{\"type\":\"string\",\"enum\":[\"method\",\"inline\",\"inline-function\"]},{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"method\",\"inline\",\"inline-function\"]},\"uniqueItems\":true},{\"type\":\"object\",\"properties\":{\"style\":{\"oneOf\":[{\"type\":\"string\",\"enum\":[\"method\",\"inline\",\"inline-function\"]},{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"method\",\"inline\",\"inline-function\"]},\"uniqueItems\":true}]},\"ignoreIncludesComment\":{\"type\":\"boolean\"}},\"additionalProperties\":false}]},\"vue/enforce-style-attribute\":{\"type\":\"object\",\"properties\":{\"allow\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"plain\",\"scoped\",\"module\"]},\"uniqueItems\":true}},\"additionalProperties\":false},\"vue/no-restricted-syntax\":{\"oneOf\":[{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"object\",\"properties\":{\"selector\":{\"type\":\"string\",\"minLength\":1},\"message\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"selector\"]}]}},{\"type\":\"object\",\"properties\":{\"selectors\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"object\",\"properties\":{\"selector\":{\"type\":\"string\",\"minLength\":1},\"message\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"selector\"]}]}}},\"additionalProperties\":false}]},\"vue/quote-props\":{\"type\":\"string\",\"enum\":[\"as-needed\"]},\"vue/sort-keys\":{\"type\":\"object\",\"properties\":{\"order\":{\"type\":\"string\",\"enum\":[\"asc\",\"desc\"]},\"caseSensitive\":{\"type\":\"boolean\"},\"natural\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"vue/require-component-registration\":{\"type\":\"object\",\"properties\":{\"globals\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"ignorePatterns\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"vue/sfc-element-order\":{\"type\":\"object\",\"properties\":{\"order\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]}}},\"additionalProperties\":false},\"vue/html-self-closing\":{\"type\":\"object\",\"properties\":{\"html\":{\"type\":\"object\",\"properties\":{\"void\":{\"type\":\"string\",\"enum\":[\"always\",\"never\",\"any\"]},\"normal\":{\"type\":\"string\",\"enum\":[\"always\",\"never\",\"any\"]},\"component\":{\"type\":\"string\",\"enum\":[\"always\",\"never\",\"any\"]}},\"additionalProperties\":false},\"svg\":{\"type\":\"string\",\"enum\":[\"always\",\"never\",\"any\"]},\"math\":{\"type\":\"string\",\"enum\":[\"always\",\"never\",\"any\"]}},\"additionalProperties\":false},\"vue/html-button-has-type\":{\"type\":\"object\",\"properties\":{\"button\":{\"type\":\"boolean\"},\"submit\":{\"type\":\"boolean\"},\"reset\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"vue/no-use-v-if-with-v-for\":{\"type\":\"object\",\"properties\":{\"allowUsingIterationVar\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"vue/html-quotes\":{\"oneOf\":[{\"type\":\"string\",\"enum\":[\"double\",\"single\"]},{\"type\":\"object\",\"properties\":{\"style\":{\"type\":\"string\",\"enum\":[\"double\",\"single\"]},\"avoidEscape\":{\"type\":\"boolean\"}},\"additionalProperties\":false}]},\"vue/mustache-interpolation-spacing\":{\"type\":\"string\",\"enum\":[\"always\",\"never\"]},\"vue/v-on-event-hyphenation\":{\"oneOf\":[{\"type\":\"string\",\"enum\":[\"always\",\"never\"]},{\"type\":\"object\",\"properties\":{\"style\":{\"type\":\"string\",\"enum\":[\"always\",\"never\"]},\"ignore\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^(?!\\\\s*$)(?![\\\\s\\\\S]*:exit$)\"},\"uniqueItems\":true},\"autofix\":{\"type\":\"boolean\"}},\"additionalProperties\":false}]},\"vue/v-bind-style\":{\"type\":\"string\",\"enum\":[\"shorthand\",\"longform\"]},\"vue/v-on-style\":{\"type\":\"string\",\"enum\":[\"shorthand\",\"longform\"]},\"vue/v-slot-style\":{\"oneOf\":[{\"type\":\"string\",\"enum\":[\"shorthand\",\"longform\"]},{\"type\":\"object\",\"properties\":{\"atComponent\":{\"type\":\"string\",\"enum\":[\"shorthand\",\"longform\",\"v-slot\"]},\"default\":{\"type\":\"string\",\"enum\":[\"shorthand\",\"longform\",\"v-slot\"]},\"named\":{\"type\":\"string\",\"enum\":[\"shorthand\",\"longform\"]}},\"additionalProperties\":false}]},\"vue/attribute-hyphenation\":{\"oneOf\":[{\"type\":\"string\",\"enum\":[\"always\",\"never\"]},{\"type\":\"object\",\"properties\":{\"style\":{\"type\":\"string\",\"enum\":[\"always\",\"never\"]},\"ignore\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^(?!\\\\s*$)(?![\\\\s\\\\S]*:exit$)\"},\"uniqueItems\":true},\"ignoreTags\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"uniqueItems\":true}},\"additionalProperties\":false}]},\"vue/valid-v-on\":{\"type\":\"object\",\"properties\":{\"modifiers\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"vue/valid-v-slot\":{\"type\":\"object\",\"properties\":{\"allowModifiers\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"musea/prefer-design-tokens\":{\"$ref\":\"#/definitions/MuseaPreferDesignTokensOptions\"}},\"additionalProperties\":false},\"NoRestrictedGlobalsOptions\":{\"type\":\"object\",\"properties\":{\"globals\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/RestrictedGlobal\"}}},\"additionalProperties\":false},\"RestrictedGlobal\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"message\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"name\"]},\"NoRestrictedMembersOptions\":{\"type\":\"object\",\"properties\":{\"members\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/RestrictedMember\"}}},\"additionalProperties\":false},\"RestrictedMember\":{\"type\":\"object\",\"properties\":{\"object\":{\"type\":\"string\"},\"property\":{\"type\":\"string\"},\"message\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"object\",\"property\"]},\"MuseaPreferDesignTokensOptions\":{\"type\":\"object\",\"properties\":{\"tokens\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/MuseaDesignToken\"}}},\"additionalProperties\":false},\"MuseaDesignToken\":{\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\"},\"value\":{\"type\":\"string\"},\"tier\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"path\",\"value\"]},\"FormatterConfig\":{\"type\":\"object\",\"properties\":{\"ignorePatterns\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"preset\":{\"type\":\"string\",\"enum\":[\"vize\",\"prettier\",\"compact\",\"documentation\"]},\"sortImports\":{\"oneOf\":[{\"type\":\"boolean\",\"enum\":[false]},{\"$ref\":\"#/definitions/SortImportsConfig\"}]},\"printWidth\":{\"type\":\"integer\"},\"tabWidth\":{\"type\":\"integer\"},\"useTabs\":{\"type\":\"boolean\"},\"semi\":{\"type\":\"boolean\"},\"singleQuote\":{\"type\":\"boolean\"},\"jsxSingleQuote\":{\"type\":\"boolean\"},\"trailingComma\":{\"type\":\"string\",\"enum\":[\"all\",\"none\",\"es5\"]},\"bracketSpacing\":{\"type\":\"boolean\"},\"bracketSameLine\":{\"type\":\"boolean\"},\"arrowParens\":{\"type\":\"string\",\"enum\":[\"always\",\"avoid\"]},\"endOfLine\":{\"type\":\"string\",\"enum\":[\"lf\",\"crlf\",\"cr\",\"auto\"]},\"quoteProps\":{\"type\":\"string\",\"enum\":[\"as-needed\",\"consistent\",\"preserve\"]},\"singleAttributePerLine\":{\"type\":\"boolean\"},\"vueIndentScriptAndStyle\":{\"type\":\"boolean\"},\"sortAttributes\":{\"type\":\"boolean\"},\"attributeSortOrder\":{\"type\":\"string\",\"enum\":[\"alphabetical\",\"as-written\"]},\"mergeBindAndNonBindAttrs\":{\"type\":\"boolean\"},\"maxAttributesPerLine\":{\"type\":\"integer\"},\"attributeGroups\":{\"type\":\"array\",\"items\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"normalizeDirectiveShorthands\":{\"type\":\"boolean\"},\"sortBlocks\":{\"type\":\"boolean\"},\"normalizeCssQuotes\":{\"type\":\"boolean\"},\"normalizeInlineStyles\":{\"type\":\"boolean\"},\"normalizeVForParens\":{\"type\":\"boolean\"},\"selfCloseVoidElements\":{\"type\":\"boolean\"},\"reindentPreprocessorStyles\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"SortImportsConfig\":{\"type\":\"object\",\"properties\":{\"partitionByNewline\":{\"type\":\"boolean\"},\"partitionByComment\":{\"type\":\"boolean\"},\"sortSideEffects\":{\"type\":\"boolean\"},\"order\":{\"type\":\"string\",\"enum\":[\"asc\",\"desc\"]},\"ignoreCase\":{\"type\":\"boolean\"},\"newlinesBetween\":{\"type\":\"boolean\"},\"internalPattern\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"groups\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}},{\"type\":\"object\",\"properties\":{\"newlinesBetween\":{\"type\":\"boolean\"}},\"additionalProperties\":false,\"required\":[\"newlinesBetween\"]}]}},\"customGroups\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/ImportSortCustomGroup\"}}},\"additionalProperties\":false},\"ImportSortCustomGroup\":{\"type\":\"object\",\"properties\":{\"groupName\":{\"type\":\"string\"},\"elementNamePattern\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"selector\":{\"type\":\"string\"},\"modifiers\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false,\"required\":[\"groupName\"]},\"LanguageServerConfig\":{\"type\":\"object\",\"properties\":{\"enabled\":{\"type\":\"boolean\"},\"lint\":{\"type\":\"boolean\"},\"diagnostics\":{\"type\":\"boolean\"},\"typecheck\":{\"type\":\"boolean\"},\"editor\":{\"type\":\"boolean\"},\"ecosystem\":{\"type\":\"boolean\"},\"crossFile\":{\"type\":\"boolean\"},\"legacyVue2\":{\"type\":\"boolean\"},\"completion\":{\"type\":\"boolean\"},\"signatureHelp\":{\"type\":\"boolean\"},\"hover\":{\"type\":\"boolean\"},\"definition\":{\"type\":\"boolean\"},\"references\":{\"type\":\"boolean\"},\"documentSymbols\":{\"type\":\"boolean\"},\"workspaceSymbols\":{\"type\":\"boolean\"},\"formatting\":{\"type\":\"boolean\"},\"codeActions\":{\"type\":\"boolean\"},\"rename\":{\"type\":\"boolean\"},\"codeLens\":{\"type\":\"boolean\"},\"semanticTokens\":{\"type\":\"boolean\"},\"documentLinks\":{\"type\":\"boolean\"},\"foldingRanges\":{\"type\":\"boolean\"},\"inlayHints\":{\"type\":\"boolean\"},\"fileRename\":{\"type\":\"boolean\"},\"corsa\":{\"type\":\"boolean\"},\"tsgo\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"GlobalTypesConfig\":{\"type\":\"object\",\"additionalProperties\":{\"oneOf\":[{\"type\":\"string\"},{\"$ref\":\"#/definitions/GlobalTypeDeclaration\"}]}},\"GlobalTypeDeclaration\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\"},\"defaultValue\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\"]},\"LibConfig\":{\"type\":\"object\",\"properties\":{\"dir\":{\"type\":\"string\"},\"uiDir\":{\"type\":\"string\"},\"composableDir\":{\"type\":\"string\"},\"lockfile\":{\"type\":\"string\"},\"registries\":{\"type\":\"object\",\"additionalProperties\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"object\",\"properties\":{\"source\":{\"type\":\"string\"},\"dir\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"source\"]}]},\"propertyNames\":{\"pattern\":\"^@[a-z0-9][a-z0-9._-]*$\"}}},\"additionalProperties\":false}}}");
|
|
620
675
|
const sourceConfigKey = Symbol.for("@vizejs/vite-plugin/vite-plus/source");
|
|
@@ -666,7 +721,109 @@ async function resolveViteConfigSource(exported, env) {
|
|
|
666
721
|
};
|
|
667
722
|
return resolveSource(exported, env);
|
|
668
723
|
}
|
|
669
|
-
|
|
724
|
+
function pluginHost() {
|
|
725
|
+
return import("./plugin-host-DceWq7qc.mjs");
|
|
726
|
+
}
|
|
727
|
+
function pluginTools() {
|
|
728
|
+
return import("./plugin-tools-BIfO2-qs.mjs");
|
|
729
|
+
}
|
|
730
|
+
function withoutPlugins(selected) {
|
|
731
|
+
if (!object(selected) || !Object.hasOwn(selected, "plugins")) return selected;
|
|
732
|
+
const { plugins: _plugins, ...rest } = selected;
|
|
733
|
+
return rest;
|
|
734
|
+
}
|
|
735
|
+
/** `vize plugin inspect`: the plan and per-product admission, refused capabilities included. */
|
|
736
|
+
async function inspectViteConfigPlugins(exported, env) {
|
|
737
|
+
const source = await resolveViteConfigSource(exported, env);
|
|
738
|
+
rejectLegacyConfig(source);
|
|
739
|
+
const selected = normalizeVueConfigOptions(source);
|
|
740
|
+
const [host, tools] = await Promise.all([pluginHost(), pluginTools()]);
|
|
741
|
+
return tools.inspectPluginPlan(host.resolvePluginPlan(object(selected) ? selected.plugins : void 0));
|
|
742
|
+
}
|
|
743
|
+
/** Validate only canonical settings; selecting them never evaluates a legacy callback. */
|
|
744
|
+
function vueConfigOptions(source) {
|
|
745
|
+
const selected = source.vue;
|
|
746
|
+
if (selected !== void 0) {
|
|
747
|
+
validateVueOption(withoutPlugins(selected), vueOptionSchema, "vue");
|
|
748
|
+
assertVueActionAliases(selected, "vue");
|
|
749
|
+
}
|
|
750
|
+
return selected;
|
|
751
|
+
}
|
|
752
|
+
/** Resolve preferred action names to the native section names without mutating authored input. */
|
|
753
|
+
function normalizeVueConfigOptions(source) {
|
|
754
|
+
const selected = vueConfigOptions(source);
|
|
755
|
+
return selected === void 0 ? void 0 : normalizeVueActionAliases(selected, "vue");
|
|
756
|
+
}
|
|
757
|
+
const vueActionAliases = [
|
|
758
|
+
["compile", "compiler"],
|
|
759
|
+
["typeCheck", "typeChecker"],
|
|
760
|
+
["fmt", "formatter"]
|
|
761
|
+
];
|
|
762
|
+
function assertVueActionAliases(value, label) {
|
|
763
|
+
for (const [action, compatibility] of vueActionAliases) if (value[action] !== void 0 && value[compatibility] !== void 0) throw new TypeError(`${label}.${action}: conflicts with compatibility alias ${label}.${compatibility}; remove ${label}.${compatibility} and use ${label}.${action}`);
|
|
764
|
+
if (value.lint !== void 0 && value.linter !== void 0) throw new TypeError(`${label}.lint: conflicts with compatibility alias ${label}.linter; remove ${label}.linter and use ${label}.lint, with native rules under settings.vize`);
|
|
765
|
+
for (let index = 0; index < (value.entries?.length ?? 0); index++) assertVueActionAliases(value.entries[index], `${label}.entries[${index}]`);
|
|
766
|
+
}
|
|
767
|
+
function normalizeVueActionAliases(value, label) {
|
|
768
|
+
assertVueActionAliases(value, label);
|
|
769
|
+
const result = { ...value };
|
|
770
|
+
for (const [action, compatibility] of vueActionAliases) {
|
|
771
|
+
if (result[action] === void 0) continue;
|
|
772
|
+
result[compatibility] = result[action];
|
|
773
|
+
delete result[action];
|
|
774
|
+
}
|
|
775
|
+
if (result.lint !== void 0) {
|
|
776
|
+
const lint = result.lint;
|
|
777
|
+
const linter = projectVitePlusLintConfig(lint);
|
|
778
|
+
validateVueOption(linter, { $ref: "#/definitions/LinterConfig" }, `${label}.lint`);
|
|
779
|
+
result.linter = linter;
|
|
780
|
+
delete result.lint;
|
|
781
|
+
const projectedEntries = projectVitePlusLintOverrides(lint, `${label}.lint`);
|
|
782
|
+
if (projectedEntries.length !== 0) result.entries = [...projectedEntries, ...result.entries ?? []];
|
|
783
|
+
}
|
|
784
|
+
if (Array.isArray(result.entries)) result.entries = result.entries.map((entry, index) => normalizeVueActionAliases(entry, `${label}.entries[${index}]`));
|
|
785
|
+
return result;
|
|
786
|
+
}
|
|
787
|
+
function projectVitePlusLintConfig(lint) {
|
|
788
|
+
const settings = object(lint.settings?.vize) ? lint.settings.vize : {};
|
|
789
|
+
const linter = {};
|
|
790
|
+
for (const key of ["preset", "typeAware"]) if (settings[key] !== void 0) linter[key] = settings[key];
|
|
791
|
+
const rules = {};
|
|
792
|
+
const ruleOptions = {};
|
|
793
|
+
for (const [id, entry] of Object.entries(object(lint.rules) ? lint.rules : {})) {
|
|
794
|
+
if (!id.startsWith("vize/")) continue;
|
|
795
|
+
const name = id.slice(5);
|
|
796
|
+
const rawSeverity = Array.isArray(entry) ? entry[0] : entry;
|
|
797
|
+
const severity = rawSeverity === 0 ? "off" : rawSeverity === 1 ? "warn" : rawSeverity === 2 ? "error" : rawSeverity;
|
|
798
|
+
if (severity === "off" || severity === "warn" || severity === "error") rules[name] = severity;
|
|
799
|
+
else throw new TypeError(`lint.rules.${id}: unsupported rule severity`);
|
|
800
|
+
if (Array.isArray(entry) && entry[1] !== void 0) ruleOptions[name] = entry[1];
|
|
801
|
+
}
|
|
802
|
+
if (Object.keys(rules).length !== 0) linter.rules = rules;
|
|
803
|
+
if (Object.keys(ruleOptions).length !== 0) linter.ruleOptions = ruleOptions;
|
|
804
|
+
return linter;
|
|
805
|
+
}
|
|
806
|
+
function projectVitePlusLintOverrides(lint, label) {
|
|
807
|
+
if (!Array.isArray(lint.overrides)) return [];
|
|
808
|
+
return lint.overrides.flatMap((override, index) => {
|
|
809
|
+
if (!object(override)) return [];
|
|
810
|
+
const linter = projectVitePlusLintConfig(override);
|
|
811
|
+
if (linter.rules === void 0 && linter.ruleOptions === void 0) return [];
|
|
812
|
+
validateVueOption(linter, { $ref: "#/definitions/LinterConfig" }, `${label}.overrides[${index}]`);
|
|
813
|
+
const files = stringArray(override.files, `${label}.overrides[${index}].files`);
|
|
814
|
+
const ignores = override.excludeFiles === void 0 ? void 0 : stringArray(override.excludeFiles, `${label}.overrides[${index}].excludeFiles`);
|
|
815
|
+
return [{
|
|
816
|
+
files,
|
|
817
|
+
...ignores === void 0 ? {} : { ignores },
|
|
818
|
+
linter
|
|
819
|
+
}];
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
function stringArray(value, label) {
|
|
823
|
+
if (!Array.isArray(value) || !value.every((entry) => typeof entry === "string")) throw new TypeError(`${label}: must be an array of strings to project vize/* rules`);
|
|
824
|
+
return [...value];
|
|
825
|
+
}
|
|
826
|
+
const validateVueOption = createVueOptionValidator(vueOptionSchema.definitions, object, vueOptionSchema.definitions.LintRuleOptions.properties["vue/attribute-hyphenation"]);
|
|
670
827
|
//#endregion
|
|
671
828
|
//#region src/lint/project-rules.ts
|
|
672
829
|
const CONFIG_PRESETS = [
|
|
@@ -689,13 +846,17 @@ async function readProjectLintRuleSets(rootDir, loadPreset = loadPresetRules) {
|
|
|
689
846
|
const warnings = [];
|
|
690
847
|
let vize;
|
|
691
848
|
if (linter) {
|
|
849
|
+
const presetRules = linter.preset && linter.preset !== "incremental" ? await loadPreset(linter.preset, linter.typeAware) : {};
|
|
850
|
+
const authored = Object.fromEntries(Object.entries(linter.rules).filter(([id]) => !project.pluginRuleIds.has(id)));
|
|
692
851
|
const rules = applyRuleOptions({
|
|
693
|
-
...
|
|
694
|
-
...
|
|
852
|
+
...presetRules,
|
|
853
|
+
...authored
|
|
695
854
|
}, linter.ruleOptions, warnings, "vue.linter");
|
|
696
855
|
if (Object.keys(rules).length > 0) vize = rules;
|
|
697
856
|
}
|
|
698
857
|
const entries = project.entries.map((entry, index) => {
|
|
858
|
+
const scoped = Object.keys(entry.rules).find((id) => project.pluginRuleIds.has(id));
|
|
859
|
+
if (scoped !== void 0) throw new Error(`[plugin/plan-invalid] vue.entries[${String(index)}].linter: plugin rule \`${scoped}\` is configured in vue.linter.rules only`);
|
|
699
860
|
const rules = applyRuleOptions({ ...entry.rules }, entry.ruleOptions, warnings, `vue.entries[${String(index)}].linter`, vize);
|
|
700
861
|
if (Object.keys(rules).length === 0) return void 0;
|
|
701
862
|
return {
|
|
@@ -708,6 +869,7 @@ async function readProjectLintRuleSets(rootDir, loadPreset = loadPresetRules) {
|
|
|
708
869
|
return {
|
|
709
870
|
...entries.length > 0 ? { entries } : {},
|
|
710
871
|
...jsPlugins.length > 0 ? { jsPlugins } : {},
|
|
872
|
+
...project.pluginLint ? { pluginRules: true } : {},
|
|
711
873
|
...vize ? { vize } : {},
|
|
712
874
|
...Object.keys(oxlint).length > 0 ? { oxlint } : {},
|
|
713
875
|
...oxlintOverrides.length > 0 ? { oxlintOverrides } : {},
|
|
@@ -716,23 +878,56 @@ async function readProjectLintRuleSets(rootDir, loadPreset = loadPresetRules) {
|
|
|
716
878
|
}
|
|
717
879
|
async function readProjectConfig(rootDir) {
|
|
718
880
|
const loaded = await loadProjectViteConfigSource(rootDir);
|
|
719
|
-
if (!loaded) return {
|
|
881
|
+
if (!loaded) return {
|
|
882
|
+
entries: [],
|
|
883
|
+
pluginRuleIds: /* @__PURE__ */ new Set(),
|
|
884
|
+
pluginLint: false
|
|
885
|
+
};
|
|
720
886
|
const parsed = loaded.source;
|
|
721
887
|
const rawVue = parsed.vue && typeof parsed.vue === "object" ? parsed.vue : void 0;
|
|
722
|
-
|
|
888
|
+
const { pluginRuleIds, pluginLint } = hasPluginEntries(rawVue) ? await lintPluginPlan(loaded.exported) : {
|
|
889
|
+
pluginRuleIds: /* @__PURE__ */ new Set(),
|
|
890
|
+
pluginLint: false
|
|
891
|
+
};
|
|
723
892
|
const rawLinter = rawVue && "linter" in rawVue ? projectLinter(rawVue.linter) : void 0;
|
|
724
893
|
return {
|
|
725
894
|
entries: rawVue && "entries" in rawVue ? projectEntries(rawVue.entries) : [],
|
|
895
|
+
pluginRuleIds,
|
|
896
|
+
pluginLint,
|
|
726
897
|
linter: rawLinter,
|
|
727
898
|
oxlint: parsed.lint,
|
|
728
899
|
oxlintConfigDir: loaded.configDir
|
|
729
900
|
};
|
|
730
901
|
}
|
|
731
|
-
function
|
|
902
|
+
function hasPluginEntries(vue) {
|
|
732
903
|
const plugins = vue && "plugins" in vue ? vue.plugins : void 0;
|
|
733
|
-
if (
|
|
734
|
-
|
|
735
|
-
|
|
904
|
+
if (plugins === void 0) return false;
|
|
905
|
+
return !(Array.isArray(plugins) && plugins.every((entry) => entry === false || entry == null));
|
|
906
|
+
}
|
|
907
|
+
async function lintPluginPlan(exported) {
|
|
908
|
+
const inspection = await inspectViteConfigPlugins(exported, {
|
|
909
|
+
command: "lint",
|
|
910
|
+
mode: "development"
|
|
911
|
+
});
|
|
912
|
+
const lint = inspection.admission.lint;
|
|
913
|
+
const refused = lint?.refused[0];
|
|
914
|
+
if (refused) throw new Error(`[plugin/capability-unadmitted] ${refused.plugin}: lint does not implement ${refused.capability} \`${refused.key}\` yet`);
|
|
915
|
+
for (const plugin of inspection.plugins) for (const capability of plugin.capabilities) {
|
|
916
|
+
const missing = Object.entries(inspection.admission).filter(([, admission]) => admission.refused.some((entry) => entry.plugin === plugin.name && entry.capability === capability.id && entry.key === capability.key)).map(([product]) => product);
|
|
917
|
+
if (missing.length > 0) throw new Error(`[plugin/capability-unadmitted] ${plugin.name}: ${capability.id} \`${capability.key}\` is not implemented by ${missing.join(", ")} yet; run \`vize plugin inspect\` for the plan`);
|
|
918
|
+
}
|
|
919
|
+
const ids = /* @__PURE__ */ new Set();
|
|
920
|
+
for (const plugin of inspection.plugins) for (const capability of plugin.capabilities) {
|
|
921
|
+
if (capability.id === "lint.rule") ids.add(capability.key);
|
|
922
|
+
if (capability.id === "lint.plugin-v1") {
|
|
923
|
+
const listed = capability.data.rules;
|
|
924
|
+
for (const rule of Array.isArray(listed) ? listed : []) if (typeof rule === "string") ids.add(`${plugin.name}/${rule}`);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
return {
|
|
928
|
+
pluginRuleIds: ids,
|
|
929
|
+
pluginLint: lint?.status === "ready"
|
|
930
|
+
};
|
|
736
931
|
}
|
|
737
932
|
function projectLinter(value) {
|
|
738
933
|
if (!value || typeof value !== "object") return void 0;
|
|
@@ -779,6 +974,7 @@ async function loadProjectViteConfigSource(rootDir) {
|
|
|
779
974
|
if (module === null) throw new Error("Unable to load Vite configuration at " + filePath);
|
|
780
975
|
return {
|
|
781
976
|
configDir: directory,
|
|
977
|
+
exported: module.default ?? module,
|
|
782
978
|
source: await resolveViteConfigSource(module.default ?? module, {
|
|
783
979
|
command: "lint",
|
|
784
980
|
mode: "development"
|
|
@@ -1493,6 +1689,13 @@ async function setupNuxtLintConfigGeneration(lint, nuxt, dependencies = {}) {
|
|
|
1493
1689
|
name: "project/oxlint",
|
|
1494
1690
|
nativeRules: projectRules.oxlint
|
|
1495
1691
|
});
|
|
1692
|
+
if (projectRules.pluginRules) projectItems.push({
|
|
1693
|
+
name: "project/plugins",
|
|
1694
|
+
nativeRules: {
|
|
1695
|
+
"vize/plugin-errors": "error",
|
|
1696
|
+
"vize/plugin-warnings": "warn"
|
|
1697
|
+
}
|
|
1698
|
+
});
|
|
1496
1699
|
for (const [index, entry] of (projectRules.entries ?? []).entries()) projectItems.push({
|
|
1497
1700
|
name: entry.name ? `project/${entry.name}` : `project/entry-${String(index + 1)}`,
|
|
1498
1701
|
files: entry.files,
|
|
@@ -1518,7 +1721,7 @@ async function setupNuxtLintConfigGeneration(lint, nuxt, dependencies = {}) {
|
|
|
1518
1721
|
rootDir: planRoot,
|
|
1519
1722
|
configDir: path.dirname(configFile),
|
|
1520
1723
|
owner: ownsReservedConfig ? "@vizejs/nuxt" : void 0
|
|
1521
|
-
}, projectRules.jsPlugins);
|
|
1724
|
+
}, projectRules.jsPlugins, projectRules.pluginRules === true);
|
|
1522
1725
|
const changed = ownsReservedConfig ? await writeOwnedNuxtConfig(configFile, artifact, writeFileIfChanged) : await writeFileIfChanged(configFile, artifact);
|
|
1523
1726
|
currentPlan = nextPlan;
|
|
1524
1727
|
return changed;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.778.0",
|
|
4
4
|
"description": "Nuxt module for Vize - compiler, musea gallery, linter, and type checker",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@nuxt/kit": "3.21.8",
|
|
52
|
-
"@vizejs/native": "0.
|
|
53
|
-
"@vizejs/nuxt-lint-config": "0.
|
|
54
|
-
"@vizejs/vite-plugin": "0.
|
|
55
|
-
"@vizejs/vite-plugin-musea": "0.
|
|
56
|
-
"vize": "0.
|
|
52
|
+
"@vizejs/native": "0.778.0",
|
|
53
|
+
"@vizejs/nuxt-lint-config": "0.778.0",
|
|
54
|
+
"@vizejs/vite-plugin": "0.778.0",
|
|
55
|
+
"@vizejs/vite-plugin-musea": "0.778.0",
|
|
56
|
+
"vize": "0.778.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"jiti-nuxt2": "npm:jiti@1.21.7",
|
|
60
60
|
"oxlint": "1.78.0",
|
|
61
|
-
"oxlint-plugin-vize": "0.
|
|
61
|
+
"oxlint-plugin-vize": "0.778.0",
|
|
62
62
|
"typescript": "6.0.3",
|
|
63
63
|
"vite": "npm:@voidzero-dev/vite-plus-core@1.5.0",
|
|
64
64
|
"vite-plus": "1.5.0",
|