From 75937b332ae223122d38f762c0cba24da708217c Mon Sep 17 00:00:00 2001 From: murashit Date: Wed, 24 Jun 2026 16:57:06 +0900 Subject: [PATCH] Speed up local check preflight --- package.json | 4 ++-- scripts/check.mjs | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f7deecbd..ba54490d 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/scripts/check.mjs b/scripts/check.mjs index 08d56d9c..c34dbfc0 100644 --- a/scripts/check.mjs +++ b/scripts/check.mjs @@ -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}`,