Socket
Socket
Sign inDemoInstall

eslint-plugin-fp

Package Overview
Dependencies
94
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-fp

ESLint rules for functional programming


Version published
Weekly downloads
108K
increased by8.86%
Maintainers
1
Install size
1.44 MB
Created
Weekly downloads
 

Changelog

Source

[2.3.0] - 2017-01-01

Added

  • Added allowUseStrict option to [no-unused-expression] to allow 'use strict'; statements.
  • Use [eslint-ast-utils] to replace some logic.

Fixed

  • Allow properties named arguments in [no-arguments].
  • Allow function expressions in [no-mutating-assign].

Readme

Source

eslint-plugin-fp Build Status

ESLint rules for functional programming

Install

$ npm install --save-dev eslint eslint-plugin-fp

Usage

Configure it in package.json.

{
  "name": "my-awesome-project",
  "eslintConfig": {
    "env": {
      "es6": true
    },
    "plugins": [
      "fp"
    ],
    "rules": {
      "fp/no-arguments": "error",
      "fp/no-class": "error",
      "fp/no-delete": "error",
      "fp/no-events": "error",
      "fp/no-get-set": "error",
      "fp/no-let": "error",
      "fp/no-loops": "error",
      "fp/no-mutating-assign": "error",
      "fp/no-mutating-methods": "error",
      "fp/no-mutation": "error",
      "fp/no-nil": "error",
      "fp/no-proxy": "error",
      "fp/no-rest-parameters": "error",
      "fp/no-this": "error",
      "fp/no-throw": "error",
      "fp/no-unused-expression": "error",
      "fp/no-valueof-field": "error",
      "no-var": "error"
    }
  }
}

Rules

This plugin exports a recommended configuration that enforces good practices.

To enable this configuration, use the extends property in your package.json.

{
  "name": "my-awesome-project",
  "eslintConfig": {
    "plugins": [
      "fp"
    ],
    "extends": "plugin:fp/recommended"
  }
}

See ESLint documentation for more information about extending configuration files.

MIT © Jeroen Engels

Keywords

FAQs

Last updated on 01 Jan 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc