$ cnpm install @putout/plugin-remove-constant-conditions
????Putout plugin adds ability to find and remove constant conditions. Merged to @putout/plugin-conditions.
npm i @putout/plugin-remove-constant-conditions -D
{
"rules": {
"remove-constant-conditions": "on"
}
}
function hi(a) {
if (2 < 3) {
console.log('hello');
console.log('world');
}
}
function hi(b) {
console.log('hello');
console.log('world');
}
MIT
Copyright 2013 - present © cnpmjs.org | Home |