You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@nothing-but/eslint-plugin

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nothing-but/eslint-plugin

## `no-ignored-return`

0.2.3
latest
Source
npmnpm
Version published
Weekly downloads
8
60%
Maintainers
0
Weekly downloads
 
Created
Source

@nothing-but/eslint-plugin

no-ignored-return

If a function returns a value, then that value must be used.

TODO:

  • nested methods utl.raf.makeAnimationLoop
  • fn.apply() and fn.call() methods
  • bool && returningFunc() expressions
  • never doesn't need to be used
  • ignore super()
  • awaiting Promise<some_value>

no-return-to-void

If a callback should return void, then it should not return anything.

TODO:

  • Arrow functions
  • Anonymous functions
  • Overloads
  • Fix .then (unions)

ignore-void-return

If a function returns void, the return value shouldn't be used.

TODO TODO

no-unnecessary-instanceof

Values tested with instanceof should have a union type with the tested class as a member.

  • Allow extended types

no-ignored-params

Require that all callback parameters are used.

TODO:

  • implement

Resources:

  • solidjs-community/eslint-plugin-solid
  • SonarSource/eslint-plugin-sonarjs
  • typescript-eslint/typescript-eslint
  • https://typescript-eslint.io/developers/custom-rules/#testing
  • https://astexplorer.net/

FAQs

Package last updated on 07 Sep 2024

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