Monorepos
Migrate one package at a time. FlagLint scans a single directory per invocation — use package-specific config files when import paths, wrapper names, or OpenFeature client bindings differ across packages.
Typical workspace structure
Section titled “Typical workspace structure”services/ checkout/ src/ routes/checkout.ts platform/feature-flags.ts .flaglintrc # ← per-package config package.json pricing/ src/ .flaglintrcpackages/ feature-flag-client/ src/ index.ts # shared OpenFeature wrapperStep 1 — Audit one service
Section titled “Step 1 — Audit one service”npx flaglint audit ./services/checkout/src --config ./services/checkout/.flaglintrcRun audit per package rather than at workspace root to avoid cross-package noise in reports.
Step 2 — Per-package config
Section titled “Step 2 — Per-package config”services/checkout/.flaglintrc:
{ "include": ["**/*.{ts,js}"], "exclude": [ "**/node_modules/**", "**/dist/**", "**/*.test.ts", "**/*.spec.ts" ], "openFeatureClientBindings": [ { "importName": "openFeatureClient", "modulePatterns": ["**/platform/feature-flags"] } ]}If a shared client is exported from a workspace package, add the package pattern:
{ "openFeatureClientBindings": [ { "importName": "featureFlagClient", "modulePatterns": ["**/feature-flag-client/src/index"] } ]}Step 3 — Preview per package
Section titled “Step 3 — Preview per package”npx flaglint migrate ./services/checkout/src \ --config ./services/checkout/.flaglintrc \ --dry-runStep 4 — Apply per package on a branch
Section titled “Step 4 — Apply per package on a branch”git checkout -b migrate/checkout-openfeaturenpx flaglint migrate ./services/checkout/src \ --config ./services/checkout/.flaglintrc \ --applyDo not run --apply at workspace root. Keep migration branches scoped to one package.
Step 5 — CI enforcement per package
Section titled “Step 5 — CI enforcement per package”Add a validate step per package in CI. Example GitHub Actions matrix:
strategy: matrix: package: [checkout, pricing, inventory]steps: - name: Enforce OpenFeature boundary — ${{ matrix.package }} run: | npx flaglint validate ./services/${{ matrix.package }}/src \ --config ./services/${{ matrix.package }}/.flaglintrc \ --no-direct-launchdarklyWhat is outside current scope
Section titled “What is outside current scope”Browser SDKs, React SDKs, and non-Node packages in the monorepo are not detected. Run FlagLint only against Node.js server-side source directories. Non-Node packages will show zero results, not errors.
Edit this page · Report an unsupported pattern · Next: Manual Review Patterns