New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@silverhand/eslint-plugin-fp

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@silverhand/eslint-plugin-fp

ESLint rules for functional programming

  • 2.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
272
decreased by-72.41%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-fp

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

  • no-arguments - Forbid the use of arguments.
  • no-class - Forbid the use of class.
  • no-delete - Forbid the use of delete.
  • no-events - Forbid the use of the events module.
  • no-get-set - Forbid the use of getters and setters.
  • no-let - Forbid the use of let.
  • no-loops - Forbid the use of loops.
  • no-mutating-assign - Forbid the use of Object.assign() with a variable as first argument.
  • no-mutating-methods - Forbid the use of mutating methods.
  • no-mutation - Forbid the use of mutating operators.
  • no-nil - Forbid the use of null and undefined.
  • no-proxy - Forbid the use of Proxy.
  • no-rest-parameters - Forbid the use of rest parameters.
  • no-this - Forbid the use of this.
  • no-throw - Forbid the use of throw.
  • no-unused-expression - Enforce that an expression gets used.
  • no-valueof-field - Forbid the creation of valueOf fields.

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

Package last updated on 15 Feb 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc