1. eslint-plugin-switch-case
switch-case specific linting rules for ESLint
eslint-plugin-switch-case
Package: eslint-plugin-switch-case
Created by: lukeapage
Last modified: Fri, 17 Jun 2022 20:42:35 GMT
Version: 1.1.2
License: MIT
Downloads: 41,575
Repository: https://github.com/lukeapage/eslint-plugin-switch-case

Install

npm install eslint-plugin-switch-case
yarn add eslint-plugin-switch-case

ESLint-Plugin-Switch-Case

Maintenance Status NPM version Build Status

Switch-case-specific linting rules for ESLint.

Installation

Install ESLint either locally or globally.

$ npm install eslint

If you installed ESLint globally, you have to install the plugin globally too. Otherwise, install it locally.

$ npm install eslint-plugin-destructuring

Configuration

Add a plugins section and specify eslint-plugin-switch-case as a plugin.

Then, enable all of the rules that you would like to use.

This plugin exports a recommended configuration that enforces all the rules. You can configure the plugin as follows:

 {
  "plugins": ["switch-case"],
  "extends": ["plugin:switch-case/recommended"]
}

List of provided rules

Rules are divided into categories for your convenience. All rules are off by default, unless you use one of the plugin's configurations which turn all relevant rules on.

Stylistic Issues

These rules are purely matters of style and are quite subjective.

Contributing

Contributions are always welcome!.

License

eslint-plugin-switch-case is licensed under the MIT License.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code