what-to-cook/scripts/lint.mjs
Peppa 164c5e00cb
All checks were successful
peppa/lint lint: success за 1с
peppa/test test: success за 0с
peppa/build build: success за 0с
ci / checks (pull_request) Successful in 4s
deploy / deploy (pull_request) Successful in 13s
WTC-1: страница «Что приготовить сегодня»
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 05:49:18 +05:00

12 lines
369 B
JavaScript

import { readdirSync } from "node:fs";
import { spawnSync } from "node:child_process";
let bad = 0;
for (const dir of ["src", "scripts", "test"]) {
for (const f of readdirSync(dir)) {
if (!/\.m?js$/.test(f)) continue;
const r = spawnSync(process.execPath, ["--check", `${dir}/${f}`], { stdio: "inherit" });
if (r.status) bad = 1;
}
}
process.exit(bad);