eslint-plugin-functions

0.0.7 • Public • Published

eslint-plugin-functions

This plugin contains lint rules related to function declarations.

Installation

  1. Add eslint-plugin-functions to your devDependencies.

  2. Add functions to the plugins section of your ESLint configuration.

{
  "plugins": ["functions"]
}
  1. Enable the rule(s) that you want ESLint to enforce.
{
  "rules": {
    "functions/top-level-fn-decl": "warn"
  }
}

Rules

There's currently just one lint rule in this package.

top-level-fn-decl

This rule enforces that the all top-level functions should be function declarations.

Example:

// Correct usage (no lint warning)
function foo() {
  return;
}

// Incorrect usage (raises lint warning)
const foo = () => {
  return;
};

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-plugin-functions

Weekly Downloads

63

Version

0.0.7

License

ISC

Unpacked Size

5.52 kB

Total Files

3

Last publish

Collaborators

  • eslint-tools