Skip to content

Configuration

FlagLint reads the first matching config file from:

.flaglintrc
.flaglintrc.json
flaglint.config.json

Use --config <path> to pass a specific file.

{
"include": ["**/*.{ts,js}"],
"exclude": ["**/node_modules/**", "**/dist/**"],
"provider": "launchdarkly",
"minFileCount": 0,
"wrappers": ["evaluateFlag"],
"openFeatureClientBindings": [
{
"importName": "openFeatureClient",
"modulePatterns": ["**/platform/feature-flags"]
}
]
}
FieldDefaultPurpose
include["**/*.{ts,tsx,js,jsx}"]Files to scan.
excludecommon build/test outputFiles to skip.
providerlaunchdarklyCurrent implemented provider scope.
minFileCount0Optional local source review heuristic.
wrappers[]Wrapper functions to detect as flag evaluations. Accepts string names or object form (see below).
openFeatureClientBindings[]Imported shared client allowlist for migrate --apply.
reportTitleunsetOptional report title.
outputDir.Directory for generated report files.

The wrappers field accepts two forms, which can be mixed in the same array.

String form — any call to a function with that name is treated as a flag evaluation:

{
"wrappers": ["evaluateFlag", "getFeature"]
}

Object form — the call is only detected when the function is imported from a specific package, preventing false positives from unrelated functions with the same name:

{
"wrappers": [
"evaluateFlag",
{
"import": "my-feature-sdk",
"function": "getFlag",
"flagKeyArgument": 0
}
]
}

Object form fields:

FieldPurpose
importThe package name that must be imported for this call to be detected.
functionThe exported function name to detect.
flagKeyArgumentZero-based index of the argument that holds the flag key.

With the example above, getFlag("my-flag-key", ctx) is detected only when getFlag is imported from my-feature-sdk. A getFlag call imported from any other package is ignored.