ConditionalScriptsConfig
Defined in: policies/ConditionalScripts.ts:58
Configuration for the ConditionalScripts policy.
Properties
Section titled “Properties”rules:
ConditionalScriptRule[]
Defined in: policies/ConditionalScripts.ts:74
Conditional script requirements. If a script is present, other scripts must also exist.
Remarks
Section titled “Remarks”This is useful for enforcing that packages with a “build” script also have a “clean” script, or packages with “test” also have “test:coverage”.
Example
Section titled “Example”rules: [ { ifPresent: "build", requires: [{ clean: "rimraf dist" }] }, { ifPresent: "test", requires: ["test:coverage"] },]