recommend ternary expression over pattern matching boolean values
npm install eslint-plugin-no-boolean-ts-patternrecommend ternary expression over pattern matching boolean values
You'll first need to install ESLint:
``sh`
npm i eslint --save-dev
Next, install eslint-plugin-no-boolean-ts-pattern:
`sh`
npm install eslint-plugin-no-boolean-ts-pattern --save-dev
Add no-boolean-ts-pattern to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
`json`
{
"plugins": [
"no-boolean-ts-pattern"
]
}
Then configure the rules you want to use under the rules section.
`json``
{
"rules": {
"no-boolean-ts-pattern/rule-name": 2
}
}
TODO: Run eslint-doc-generator to generate the rules list.