1.0.1 • Published 5 years ago

eslint-plugin-force-void v1.0.1

Weekly downloads
695
License
MIT
Repository
github
Last release
5 years ago

eslint-plugin-force-void

ESLint rule to force returning void 0.

Installation

After having installed ESLint, install the rule:

$ npm install eslint-plugin-force-void --save-dev

Configuration

Add force-void to your .eslintrc:

{
  "plugins": [
    "force-void"
  ],
  "rules": {
    "force-void/force-void": 2
  }
}

Fail

function sample() {
  console.log(1);
  return;
}

Pass

function sample() {
  console.log(1);
  return void 0;
}