adding
"@typescript-eslint/strict-boolean-expressions": [
2,
{
"ignoreRhs": true,
"allow-boolean-or-undefined": true
}
],
to my eslintrc.json gives me the following error Error: .eslintrc.json: Configuration for rule "@typescript-eslint/strict-boolean-expressions" is invalid: Value {"ignoreRhs":true,"allow-boolean-or-undefined":true} should NOT have additional properties.
What is the right way to mention options for this rule?
On eslintrc rules you can try the configuration below and eslint will stop notifying you.
"rules": {
"@typescript-eslint/strict-boolean-expressions": 0
}
The allow-boolean-or-undefined doesn't exist for this rule on ESLint, the option equivalent is the allowNullable. The correct syntax is:
'@typescript-eslint/strict-boolean-expressions': ['error', { allowNullable: true, ignoreRhs: true }],
You can check the doc for the rule strict-boolean-expressions documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With