checkPackageScripts
checkPackageScripts(
scripts,role):PackageScriptProblem[]
Defined in: cli/astromech/src/generators/scripts/check-package-scripts/check-package-scripts.ts:34
The rule violations in one package.json’s scripts (spec ci-flat-task-vocabulary, “The recursion hazard” and “The
check that keeps them aligned”):
- a script named like an npm or pnpm lifecycle word (
publish,install, …), except the root’sprepare(husky); - a script named like a suite (
test,lint,scan) in a package: a suite is a turbo task with no script, and a package’s own would be run byturbo run testas well as the aggregator. The root holds the suite scripts; - a leaf script that calls
turbo runorholocron runin a package: it must hold the real tool command, or turbo would run it, and it would run turbo again; - a script that looks like a suite member but is none (
test:unt), other than a known variant; - a script named by a task id’s hyphen spelling (
deploy-preview) where the script spelling takes a colon (deploy:preview):holocron runlooks the script up by the script spelling, so the task would find none and be skipped as “enforced in CI” (#1929); - an old dotted task name, as a
warnwhile those are accepted.
Parameters
Section titled “Parameters”scripts
Section titled “scripts”Readonly<Record<string, string>>