mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
Speed up local check preflight
This commit is contained in:
parent
ca26a53e1b
commit
75937b332a
2 changed files with 10 additions and 5 deletions
|
|
@ -27,8 +27,8 @@
|
|||
"release:check": "node scripts/release/check.mjs",
|
||||
"release:preflight": "node scripts/release/preflight.mjs",
|
||||
"release:prepare": "node scripts/release/prepare.mjs",
|
||||
"test": "vitest run --cache",
|
||||
"test:ci": "vitest run",
|
||||
"test": "vitest run --cache --pool threads",
|
||||
"test:ci": "vitest run --pool threads",
|
||||
"typecheck": "tsc -p tsconfig.json --noEmit --incremental --tsBuildInfoFile node_modules/.cache/typescript/tsconfig.tsbuildinfo",
|
||||
"typecheck:ci": "tsc -p tsconfig.json --noEmit"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ const concurrentOptions = {
|
|||
padPrefix: true,
|
||||
prefix: "name",
|
||||
};
|
||||
const biomeLintCommand = "biome lint --no-errors-on-unmatched --diagnostic-level=warn --error-on-warnings";
|
||||
const biomeCheckCommand = "biome check --no-errors-on-unmatched --diagnostic-level=warn --error-on-warnings";
|
||||
|
||||
try {
|
||||
if (lintOnly) {
|
||||
|
|
@ -38,16 +40,19 @@ function checkCommands({ ciMode }) {
|
|||
return [
|
||||
{ name: "typecheck", command: `npm run --silent typecheck${suffix}` },
|
||||
{ name: "test", command: `npm run --silent test${suffix}` },
|
||||
...lintCommands({ ciMode, namePrefix: "lint:" }),
|
||||
{ name: "format:check", command: "npm run --silent format:check" },
|
||||
{ name: "lint:biome", command: biomeCheckCommand },
|
||||
...nonBiomeLintCommands({ ciMode, namePrefix: "lint:" }),
|
||||
];
|
||||
}
|
||||
|
||||
function lintCommands({ ciMode, namePrefix = "" }) {
|
||||
return [{ name: `${namePrefix}biome`, command: biomeLintCommand }, ...nonBiomeLintCommands({ ciMode, namePrefix })];
|
||||
}
|
||||
|
||||
function nonBiomeLintCommands({ ciMode, namePrefix = "" }) {
|
||||
const eslintCacheArgs = ciMode ? "" : " --cache --cache-strategy content --cache-location node_modules/.cache/eslint/.eslintcache";
|
||||
|
||||
return [
|
||||
{ name: `${namePrefix}biome`, command: "biome lint --no-errors-on-unmatched --diagnostic-level=warn --error-on-warnings" },
|
||||
{
|
||||
name: `${namePrefix}eslint`,
|
||||
command: `eslint src tests scripts "*.config.ts" "*.config.mjs" --max-warnings=0${eslintCacheArgs}`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue