Website Structure

This commit is contained in:
supalerk-ar66 2026-01-13 10:46:40 +07:00
parent 62812f2090
commit 71f0676a62
22365 changed files with 4265753 additions and 791 deletions

View file

@ -0,0 +1,22 @@
import path from "node:path";
import { DiagnosticLevel } from "../../types.js";
import { getOxlintCommand, mapSeverity } from "./cli.js";
function resolveOptions(root, config) {
var _a, _b;
const options = config === true ? { lintCommand: "oxlint" } : config;
return {
watchTarget: resolveWatchTarget(root, options.watchPath),
logLevel: ((_b = (_a = options.dev) == null ? void 0 : _a.logLevel) == null ? void 0 : _b.map((l) => mapSeverity(l))) ?? [
DiagnosticLevel.Warning,
DiagnosticLevel.Error
],
command: getOxlintCommand(options.lintCommand ?? "oxlint").join(" ")
};
}
function resolveWatchTarget(root, watchPath) {
return Array.isArray(watchPath) ? watchPath.map((p) => path.resolve(root, p)) : typeof watchPath === "string" ? path.resolve(root, watchPath) : root;
}
export {
resolveOptions
};
//# sourceMappingURL=options.js.map