π eslint-plugin-feature-flags
ESLint plugin to manage feature flags and prevent technical debt
Table of Contents
Overview
Feature flags help teams deploy safely, but often become technical debt when forgotten. This ESLint plugin solves that by:
- Finding expired flags that should be removed
- Preventing undefined flags to avoid typos and mistakes
- Automating cleanup with configurable strategies
Common issues this plugin addresses:
- Dead flags bloating the codebase
- Stale flags creating ambiguity
- Hidden logic behind flags where it doesn't belong
- Lack of clear ownership of flags across teams
π See the example project for a quick demo.
Development
Quick Start
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Development mode
pnpm dev
# Run tests
pnpm test
# Check code quality
pnpm lint
pnpm format
Project Structure
This is a monorepo built with Turborepo:
eslint-plugin-feature-flags/
βββ apps/
β βββ eslint-plugin/ # Main ESLint plugin package
βββ packages/
β βββ types/ # TypeScript type definitions
β βββ core/ # Shared utilities
βββ examples/
β βββ test-project/ # Example implementation
Key Components
- π ESLint Plugin - The main plugin package
- π§© Core - Shared utilities and logic
- π Types - TypeScript definitions
- π§ͺ Example Project - Working example
License
This project is MIT licensed - see the LICENSE file for details.
Want to Learn More?
Resources on feature flag best practices:
- Effective Feature Flag Management - The article that inspired this plugin
- ESLint Plugin Documentation - Full plugin details and examples
Acknowledgments
Special thanks to Kevin Marques for the idea that sparked this project, and to all contributors who help make it better!
Built with Turborepo β‘οΈ