https://github.com/arnaud-zg/eslint-plugin-feature-flags
ESLint plugin to enforce feature flag hygiene and prevent technical debt by automatically detecting expired flags.
https://github.com/arnaud-zg/eslint-plugin-feature-flags
code-quality eslint eslint-plugin feature-flags feature-toggles javascript technical-debt typescript
Last synced: 5 months ago
JSON representation
ESLint plugin to enforce feature flag hygiene and prevent technical debt by automatically detecting expired flags.
- Host: GitHub
- URL: https://github.com/arnaud-zg/eslint-plugin-feature-flags
- Owner: arnaud-zg
- License: mit
- Created: 2025-06-03T05:53:57.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-06-15T12:24:20.000Z (6 months ago)
- Last Synced: 2025-07-03T12:59:51.737Z (6 months ago)
- Topics: code-quality, eslint, eslint-plugin, feature-flags, feature-toggles, javascript, technical-debt, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/eslint-plugin-feature-flags
- Size: 1.09 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ eslint-plugin-feature-flags
ESLint plugin to manage feature flags and prevent technical debt
## Table of Contents
- [Overview](#overview)
- [Development](#development)
- [Project Structure](#project-structure)
- [Key Components](#key-components)
- [License](#license)
- [Learn More](#want-to-learn-more)
- [Acknowledgments](#acknowledgments)
## 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](./examples/test-project/) for a quick demo.
## Development
### Quick Start
```bash
# 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](./apps/eslint-plugin/)** - The main plugin package
- ๐งฉ **[Core](./packages/core/)** - Shared utilities and logic
- ๐ **[Types](./packages/types/)** - TypeScript definitions
- ๐งช **[Example Project](./examples/test-project/)** - Working example
## License
This project is MIT licensed - see the [LICENSE](LICENSE) file for details.
## Want to Learn More?
Resources on feature flag best practices:
- [Effective Feature Flag Management](https://arnaudzg.substack.com/p/effective-feature-flag-management) - The article that inspired this plugin
- [ESLint Plugin Documentation](./apps/eslint-plugin/README.md) - Full plugin details and examples
## Acknowledgments
Special thanks to [Kevin Marques](https://github.com/marques-kevin) for the idea that sparked this project, and to all contributors who help make it better!
Built with [Turborepo](https://turbo.build/) โก๏ธ