Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-no-void-return-type

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-no-void-return-type

A rule that prevents void return turns on unexported functions.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.7K
decreased by-4.95%
Maintainers
1
Weekly downloads
 
Created
Source

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"


Keywords

FAQs

Package last updated on 11 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc