4.0.1 ⢠Published 4 years ago
@putout/plugin-remove-double-negations v4.0.1
@putout/plugin-remove-double-negations 
To explicitly convert its return value (or any expression in general) to the corresponding boolean value can be used a double NOT operator (
!!).(c) MDN
šPutout plugin adds ability to remove double negations from conditionals. Merged to remove-unused-type-convertion
Install
npm i @putout/plugin-remove-double-negationsRule
{
"rules": {
"remove-double-negations": "off"
}
}ā Example of incorrect code
if (!!a) {
console.log('hi');
}ā Example of correct code
if (a) {
console.log('hi');
}License
MIT