sonarjs/no-inverted-boolean-check
eslint-plugin-sonarjs
SuggestionRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/no-inverted-boolean-check": "error",
},
},
];if (!(a === 2)) { ... } // Noncompliantif (a !== 2) { ... }Examples from the ESLint documentation.
sonarjs/no-inverted-boolean-check
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/no-inverted-boolean-check": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Regular expressions should be syntactically valid
Inline snapshots should not contain interpolations
Browsers should not be allowed to perform MIME type sniffing