eslint-plugin-max-return-statements-per-function

0.2.0 • Public • Published

eslint-plugin-max-return-statements-per-function

npm version

This rule reproduces one of codeclimate's default checks, return statements, with ESLint.

Installation

npm

npm install --save-dev eslint-plugin-max-return-statements-per-function

yarn

yarn add -D eslint-plugin-max-return-statements-per-function

Usage

The rule takes one option, which is the maximum number of return statements in a function. The default is 4.

You can set the option like this in .eslintrc.js:

module.exports = {
  plugins: ["max-return-statements-per-function"],
  rules: {
    "max-return-statements-per-function/max-return-statements-per-function": ["error", 4],
  },
};

License

MIT

Package Sidebar

Install

npm i eslint-plugin-max-return-statements-per-function

Weekly Downloads

6

Version

0.2.0

License

MIT

Unpacked Size

6.14 kB

Total Files

4

Last publish

Collaborators

  • tomyam2020