Miss any of our Open RFC calls?Watch the recordings here! »

@putout/plugin-remove-nested-blocks

3.0.0 • Public • Published

putout-plugin-remove-nested-blocks NPM version Dependency Status

putout plugin adds ability to find and remove empty pattern statements.

Install

npm i @putout/plugin-remove-nested-blocks

Rule

Rule remove-nested-blocks is enabled by default, to disable add to .putout.json:

{
    "rules": {
        "remove-nested-blocks": false
    }
}

❌ Incorrect code example

for (const x of Object.keys(a)) {
    {
        console.log(x);
        console.log(xxx);
    }
}

✅ Correct code Example

for (const x of Object.keys(a)) {
    console.log(x);
    console.log(xxx);
}
 
switch (x) {
  case 1: {
    let m = 5;
  }
}

License

MIT

Install

npm i @putout/plugin-remove-nested-blocks

DownloadsWeekly Downloads

2,087

Version

3.0.0

License

MIT

Unpacked Size

4.14 kB

Total Files

4

Last publish

Collaborators

  • avatar