eslint-plugin-no-boolean-ts-pattern

0.0.7 • Public • Published

eslint-plugin-no-boolean-ts-pattern

recommend ternary expression over pattern matching boolean values

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-no-boolean-ts-pattern:

npm install eslint-plugin-no-boolean-ts-pattern --save-dev

Usage

Add no-boolean-ts-pattern to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "no-boolean-ts-pattern"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "no-boolean-ts-pattern/rule-name": 2
    }
}

Rules

TODO: Run eslint-doc-generator to generate the rules list.

Package Sidebar

Install

npm i eslint-plugin-no-boolean-ts-pattern

Weekly Downloads

3

Version

0.0.7

License

ISC

Unpacked Size

7.08 kB

Total Files

4

Last publish

Collaborators

  • justive