An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# ๐Ÿš€ eslint-plugin-feature-flags


Eslint Plugin Feature Flags Logo


ESLint plugin to manage feature flags and prevent technical debt


License: MIT
Built with Turbo
ESM Ready
TypeScript
Node

## 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/) โšก๏ธ