eslint-plugin-no-void-return-type

1.0.2 • Public • Published

eslint-plugin-no-void-return-type

What is this?

This is a rule that disallows void return types on unexported functions. For example:

const myMap = new Map();

// Bad
function foo(): void {}

// Good
function foo() {}

This is useful in combination with the recommended explicit-module-boundary-types rule, because when you convert an exported function to an unexported function, you often forget to remove the superfluous return type annotation.


How do I use it?

  • npm install --save-dev eslint-plugin-no-void-return-type
  • Add "plugin:no-void-return-type/recommended" to the extends section of your .eslintrc.js file.

What rules does this plugin provide?

It only provides one rule: "no-void-return-type/no-void-return-type"


Dependents (1)

Package Sidebar

Install

npm i eslint-plugin-no-void-return-type

Weekly Downloads

4,025

Version

1.0.2

License

GPL-3.0

Unpacked Size

38.5 kB

Total Files

7

Last publish

Collaborators

  • zamiell