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

eslint-plugin-no-switch-boolean

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-no-switch-boolean

> This rule is my unpopular opinion.

0.1.2
latest
npmnpm
Version published
Weekly downloads
298
9.16%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-no-switch-boolean

This rule is my unpopular opinion.

Bad:

switch (true) {
}

or

switch (false) {
}

Installation

npm i -D eslint-plugin-no-switch-boolean

Usage

Add no-switch-boolean to your .eslintrc configuration.

{
  "plugins": ["no-switch-boolean"]
}
{
  "rules": {
    "no-switch-boolean/no-switch-boolean": 2
  }
}

FAQs

Package last updated on 10 Dec 2019

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