npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eslint-plugin-fp-jxl

v3.1.0

Published

ESLint rules for functional programming

Downloads

10

Readme

What

ESLint rules for functional programming.

NOTE 1 of 2: This is a fork from https://github.com/jfmengels/eslint-plugin-fp. I looked at the 33 forks at the time and none were up to date. So, I forked it, merged in 2 of the outstanding PR's, and added some missing features (allow class constructors, using classes if you extend React.Component, switch statements that have a default with a return value don't violate fp-jxl/no-nil, etc).

NOTE 2 of 2: Beware much of the docs will say things like fp-jxl/no-nil when referring to a rule. Always use that for this library, not fp/no-nil. The fp-jxl is the ESLint plugin suffix, and the no-nil is the rule name. Many places in the documentation and tests refer to fp. Since I don't own the original package, and ESLint is challenging to configure, just assume fp-jxl/some-rule for all rules in the documentation, excluding no-var which is global.

Install

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

Usage

Configure it in package.json.

{
  "name": "my-awesome-project",
  "eslintConfig": {
    "env": {
      "es6": true
    },
    "plugins": [
      "fp-jxl"
    ],
    "rules": {
      "fp-jxl/explicit-return": "off",
      "fp-jxl/must-return": "off",
      "fp-jxl/no-arguments": "error",
      "fp-jxl/no-class": "error",
      "fp-jxl/no-delete": "error",
      "fp-jxl/no-events": "error",
      "fp-jxl/no-exceptions": "off",
      "fp-jxl/no-exports": "off",
      "fp-jxl/no-function-expressions": "off",
      "fp-jxl/no-get-set": "error",
      "fp-jxl/no-ifs": "off",
      "fp-jxl/no-imports": "off",
      "fp-jxl/no-instanceofs": "off",
      "fp-jxl/no-let": "error",
      "fp-jxl/no-loops": "error",
      "fp-jxl/no-mutating-assign": "error",
      "fp-jxl/no-mutating-methods": "error",
      "fp-jxl/no-mutation": "error",
      "fp-jxl/no-new": "off",
      "fp-jxl/no-nil": "error",
      "fp-jxl/no-nulls": "off",
      "fp-jxl/no-proxy": "error",
      "fp-jxl/no-reassigns": "off",
      "fp-jxl/no-rest-parameters": "error",
      "fp-jxl/no-switches": "off",
      "fp-jxl/no-this": "error",
      "fp-jxl/no-throw": "error",
      "fp-jxl/no-typeofs": "off",
      "fp-jxl/no-undefined": "off",
      "fp-jxl/no-unused-expression": "error",
      "fp-jxl/no-valueof-field": "error",
      "fp-jxl/no-variable-declarations": "off",
      "no-var": "error"
    }
  }
}

Rules

Recommended configuration

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-jxl/recommended"
  }
}

See ESLint documentation for more information about extending configuration files.

MIT © Jeroen Engels MIT © Ivan Dmitriev MIT © Thomas Grainger MIT © Jesse Warden