1.0.1 • Published 5 years ago
eslint-plugin-strict-booleans v1.0.1
strict-booleans
Disallows nullable numbers to be used in boolean expressions. That's it.
Based on the @typescript-eslint/strict-boolean-expressions rule.
Installation
With NPM
npm install --save-dev eslint eslint-plugin-strict-booleansWith Yarn
yarn add -D eslint eslint-plugin-strict-booleansUsage
Add strict-booleans to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": ["strict-booleans"]
}You may also need to set project in the parserOptions section of your .eslintrc.
{
"parserOptions": {
"project": "tsconfig.json"
}
}Then enable the rule:
{
"rules": {
"strict-booleans/no-nullable-numbers": "error"
}
}