Registry / testing / eslint-plugin-fp

eslint-plugin-fp

JSON →
library2.3.0jsnpmunverified

ESLint plugin with 18 rules enforcing functional programming style in JavaScript. Version 2.3.0 is the latest (2017), with no new releases since. It forbids imperative constructs like loops, mutation, classes, this, and null. Differentiates from eslint-plugin-functional by broader rule set and stricter defaults. Works with ESLint >=3 and Node >=4.

npm install eslint-plugin-fp
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-FP
E
eslint-plugin-fp
testingjavascriptv2.3.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

recommended config
extends: ['plugin:fp/recommended']
extends: 'eslint-plugin-fp/recommended'
Use plugin:fp prefix when extending.
rules
import from ESLint config; require('eslint-plugin-fp') is not needed directly
const fpPlugin = require('eslint-plugin-fp')
Rules are accessed via ESLint's plugin system, not directly imported.
single rules
rules: { 'fp/no-let': 'error' }
rules: { 'no-let': 'error' }
Rule names must be prefixed with fp/.

Shows how to configure eslint-plugin-fp with recommended config and enable additional rules.

// Install: npm install --save-dev eslint eslint-plugin-fp // .eslintrc.json { "plugins": ["fp"], "extends": "plugin:fp/recommended", "rules": { "fp/no-let": "error", "fp/no-loops": "error", "fp/no-mutation": "error" } }
Debug
Known issues
deprecatedPlugin is no longer actively maintained; last release 2017.
fix
Consider eslint-plugin-functional or eslint-plugin-ramda for maintained alternatives.
affects: >=2.0.0
gotchaRules are very strict and may conflict with common patterns like array methods (mutating methods rule flags .sort, .reverse).
fix
Use only functional array methods and avoid mutating methods.
affects: >=1.0.0
gotchaThe no-nil rule forbids both null and undefined, which can break code relying on undefined checks.
fix
Use Maybe/Option patterns or disable the rule.
affects: >=1.0.0
Errors
Common errors & fixes
ESLint couldn't find the plugin "eslint-plugin-fp".
Plugin not installed or not properly referenced in plugins array.
fix
Run npm install --save-dev eslint-plugin-fp and ensure it's listed in plugins: ["fp"].
Definition for rule 'fp/no-let' was not found.
Rule name misspelled or plugin not loaded.
fix
Check that plugin is in plugins array and rule name is exactly 'fp/no-let'.
Configuration for rule "fp/no-mutation" is invalid.
Rule configuration uses wrong format.
fix
Use 'error' or ['error', options] not just options.
Upgrade
Version history
2.3.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency required to run the plugin
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-fp — npm install eslint-plugin-fp · libregistry