Skip to content

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.

services/
checkout/
src/
routes/checkout.ts
platform/feature-flags.ts
.flaglintrc # ← per-package config
package.json
pricing/
src/
.flaglintrc
packages/
feature-flag-client/
src/
index.ts # shared OpenFeature wrapper
Terminal window
npx flaglint audit ./services/checkout/src --config ./services/checkout/.flaglintrc

Run audit per package rather than at workspace root to avoid cross-package noise in reports.

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"]
}
]
}
Terminal window
npx flaglint migrate ./services/checkout/src \
--config ./services/checkout/.flaglintrc \
--dry-run
Terminal window
git checkout -b migrate/checkout-openfeature
npx flaglint migrate ./services/checkout/src \
--config ./services/checkout/.flaglintrc \
--apply

Do not run --apply at workspace root. Keep migration branches scoped to one 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-launchdarkly

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