You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
467 B
TypeScript
21 lines
467 B
TypeScript
#!/usr/bin/env zx
|
|
|
|
import { $, echo } from "zx";
|
|
import type { ProcessOutput } from "zx";
|
|
import { printObject } from "./utils";
|
|
|
|
echo("开始执行代码质量评估...\n");
|
|
|
|
await $`pnpm spellcheck`.catch((out: ProcessOutput) => {
|
|
printObject(out);
|
|
throw new Error(out.stdout);
|
|
});
|
|
|
|
// check type and stage
|
|
await Promise.all([$`pnpm types`, $`pnpm lint-staged`]).catch(
|
|
(out: ProcessOutput) => {
|
|
printObject(out);
|
|
throw new Error(out.stdout);
|
|
},
|
|
);
|