switch-case specific linting rules for ESLint
npm install eslint-plugin-switch-caseESLint-Plugin-Switch-Case
=========================
[![Maintenance Status][status-image]][status-url] [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
Switch-case-specific linting rules for ESLint.
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-switch-case
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.
recommended configuration that enforces all the rules. You can configure the plugin as follows:``json``
{
"plugins": ["switch-case"],
"extends": ["plugin:switch-case/recommended"]
}
eslint-plugin-switch-case is licensed under the MIT License.
[npm-url]: https://npmjs.org/package/eslint-plugin-switch-case
[npm-image]: http://img.shields.io/npm/v/eslint-plugin-switch-case.svg?style=flat-square
[travis-url]: https://travis-ci.org/lukeapage/eslint-plugin-switch-case
[travis-image]: http://img.shields.io/travis/lukeapage/eslint-plugin-switch-case/master.svg?style=flat-square
[deps-url]: https://david-dm.org/lukeapage/eslint-plugin-switch-case
[deps-image]: https://img.shields.io/david/dev/lukeapage/eslint-plugin-switch-case.svg?style=flat-square
[status-url]: https://github.com/lukeapage/eslint-plugin-switch-case/pulse
[status-image]: http://img.shields.io/badge/status-maintained-brightgreen.svg?style=flat-square