Skip to content

flaglint validate

flaglint validate checks whether source files comply with migration policy.

Terminal window
npx flaglint validate ./src --no-direct-launchdarkly

Fail output from the enterprise demo migration-in-progress state:

✗ validate --no-direct-launchdarkly: 20 direct LaunchDarkly evaluation call(s) found.
checkout.ts:40:9 — boolVariation("checkout-v2")
pricing.ts:46:9 — numberVariation("discount-percentage")
These files must migrate to OpenFeature before this rule passes.
Run `flaglint migrate --dry-run` to review the migration plan.

Pass output from the completed demo state:

✓ validate --no-direct-launchdarkly: no direct LaunchDarkly evaluation calls found.
Scanned 5 file(s).
npx flaglint validate ./src \
--no-direct-launchdarkly \
--format sarif \
--output flaglint-validation.sarif

SARIF findings use rule id flaglint.direct-launchdarkly.

Use --bootstrap-exclude for files that are allowed to wire the provider:

npx flaglint validate ./src \
--no-direct-launchdarkly \
--bootstrap-exclude "src/provider/setup.ts"