eslint-plugin-force-void

ESLint rule to force returning void 0

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
eslint-plugin-force-void
1.0.14 years ago7 years agoMinified + gzip package size for eslint-plugin-force-void in KB

Readme

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;
}