An ESLint plugin to disable mutation and promote functional programming in JavaScript and TypeScript.
eslint-plugin-functional is an ESLint plugin that enforces functional programming principles in JavaScript and TypeScript codebases. It provides linting rules to disable mutation, restrict imperative statements, and promote immutable, side-effect-free coding patterns. The plugin helps developers write more predictable and maintainable code by preventing common anti-patterns in functional programming.
JavaScript and TypeScript developers adopting functional programming, teams enforcing coding standards for immutability, and projects transitioning from imperative to functional styles.
It offers a comprehensive, configurable set of rules with multiple presets (strict, recommended, lite) to support gradual adoption, integrates seamlessly with existing ESLint setups, and provides TypeScript-specific rules for type-level immutability enforcement.
ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.
Offers lite, recommended, and strict presets, allowing teams to start gently and tighten rules over time, as highlighted in the philosophy section for balanced integration.
Includes rulesets for mutations, statements, exceptions, and other paradigms, ensuring holistic enforcement of functional principles across codebases.
Many rules require type information, providing deep integration with TypeScript for type-level immutability checks, such as prefer-immutable-types.
Shown by badges for CI/CD, coverage, and enterprise options via Tidelift, indicating reliable upkeep and community engagement.
Several rules require TypeScript type checking, which can slow down linting and complicate setup in non-TypeScript or loosely-typed projects.
The strict preset disallows common patterns like try-catch and classes, making integration with non-functional libraries or legacy code challenging and error-prone.
Not all rules are auto-fixable; only a few have the 🔧 icon in the rules table, meaning developers often need manual interventions for fixes.
ESLint plugin with rules that help validate proper imports.
Enforce best practices for JavaScript promises
ESLint rules for functional programming
ESLint plugin to disable all mutation in JavaScript.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.