fix(lib,scripts): import locally for linting, snapshot tests, dev server (#2172)

Co-authored-by: WalkQuackBack <[email protected]>
This commit is contained in:
uncenterandWalkQuackBack authored and GitHub committed 2026-04-25 21:35:37 -05:00
1 parent dc1fac9639
commit acd47ee987
8 files changed
+302 -18

No files matched your search

+3 -5
View File
@@ -12,17 +12,13 @@ export async function runStylelint(
content: string,
fix: boolean,
config: stylelint.Config,
) {
): Promise<string | undefined> {
const { results, code } = await stylelint.lint({
code: content,
config,
fix,
});
if (code) {
Deno.writeTextFileSync(file, code);
}
for (const result of results) {
for (const warning of result.warnings) {
// Some cleanup for fancier logging - dims the rule name.
@@ -43,4 +39,6 @@ export async function runStylelint(
if (result.warnings.length > 0) throw new Error("stylelint error");
}
return code;
}