OpenFeature Provider Setup
FlagLint changes the application-facing evaluation boundary. LaunchDarkly remains the feature flag provider.
Official references:
Install Packages
Section titled “Install Packages”For a Node.js server-side LaunchDarkly service:
npm install \ @openfeature/server-sdk \ @launchdarkly/node-server-sdk \ @launchdarkly/openfeature-node-serverDo not remove existing LaunchDarkly dependencies until no remaining source files or wrappers import them.
Bootstrap Provider
Section titled “Bootstrap Provider”Create one provider/bootstrap module owned by your platform layer:
import { OpenFeature } from "@openfeature/server-sdk";import { LaunchDarklyProvider } from "@launchdarkly/openfeature-node-server";
await OpenFeature.setProviderAndWait( new LaunchDarklyProvider(process.env.LD_SDK_KEY!));
export const openFeatureClient = OpenFeature.getClient();Application services should import the exported OpenFeature client and evaluate flags through OpenFeature:
import { openFeatureClient } from "../platform/feature-flags.js";
export async function checkout(ctx: { key: string }) { return await openFeatureClient.getBooleanValue("checkout-v2", false, ctx);}The LaunchDarkly OpenFeature provider accepts OpenFeature targetingKey or an existing LaunchDarkly key. FlagLint preserves existing evaluation context arguments at migrated call sites.
Configure Imported Client Bindings
Section titled “Configure Imported Client Bindings”{ "openFeatureClientBindings": [ { "importName": "openFeatureClient", "modulePatterns": ["**/platform/feature-flags"] } ]}Provider/bootstrap setup is not generated by FlagLint.