Expand description
Feature flag detection via lightweight Oxc AST visitor.
Detects three patterns:
- Environment variables:
process.env.FEATURE_X,import.meta.env.VITE_FEATURE_X - SDK calls:
useFlag('name'),variation('name', false),flag({ key: 'name' }), etc. - Config objects:
config.features.x(opt-in, heuristic)
Always extracted during parse (lightweight pattern matching on MemberExpression
and CallExpression nodes). Custom SDK patterns, env prefixes, and config
object heuristics from the flags config section apply in the same pass.
Functionsยง
- builtin_
env_ prefixes - Built-in environment variable prefixes treated as feature flags.
- builtin_
sdk_ providers - Distinct built-in SDK provider labels, in declaration order.