Remove Unused Feature Flags
Codemod verified
Official codemod published by a verified account. Learn more.
migration
This experimental codemod replaces function calls in a for of await functionName(featureFlagName)
, where:
functionName
is the target function name (default:isFlagEnabled
),featureFlagName
is the target feature flag name.
You need to pass these arguments using the Codemod Arguments' settings or using the Codemod CLI.
Example
Before:
const [a, b] = await Promise.all([Promise.resolve('a'),isFlagEnabled('featureFlag'),]);const x = b && c;const y = <A b={b} />;
After:
const a = await Promise.resolve('a');const x = c;const y = <A b={true} />;
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community