README
@putout/plugin-remove-nested-blocks
🐊Putout
plugin adds ability to find and remove nested bocks
.
Install
npm i @putout/plugin-remove-nested-blocks
Rule
{
"rules": {
"remove-nested-blocks": "on"
}
}
❌ Example of incorrect code
for (const x of Object.keys(a)) {
{
console.log(x);
console.log(xxx);
}
}
✅ Example of correct code
for (const x of Object.keys(a)) {
console.log(x);
console.log(xxx);
}
switch(x) {
case 1: {
const m = 5;
}
}
License
MIT