@putout/plugin-remove-useless-convertion
putout
plugin adds ability to apply shorthand properties. Renamed to @putout/remove-useless-type-conversion
Install
npm i @putout/plugin-remove-useless-convertion
Rule
{
"rules": {
"remove-useless-convertion/named": "on",
"remove-useless-convertion/with-double-negations": "on"
}
}
❌ Incorrect code example
const a = !![1].includes(1);
const b = Boolean([1].includes(1));
✅ Correct code Example
const a = [1].includes(1);
License
MIT