{"name":"@putout/plugin-remove-nested-blocks","version":"3.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to find and remove nested blocks","homepage":"http://github.com/coderaiser/putout","main":"lib/remove-nested-blocks.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","nested","blocks"],"devDependencies":{"@putout/test":"^1.0.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^3.0.0","lerna":"^3.8.5","madrun":"^5.0.0","nodemon":"^2.0.1","nyc":"^14.0.0"},"peerDependencies":{"putout":">=7.17"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-nested-blocks@3.0.0","_nodeVersion":"13.10.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-U262Or87Iq1BcVOJYHlT7Jy8JHfwVnz+5Q846XeBGg+HRJsg4NWSiNYsLLM409kahpZMlpyoQsoC9y0fhxuIxw==","shasum":"82698b29daf7ad6f9466730e8bee1567940c4767","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-nested-blocks/download/@putout/plugin-remove-nested-blocks-3.0.0.tgz","fileCount":4,"unpackedSize":4145,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZKrACRA9TVsSAnZWagAAta8P/A7KQuIgOd85FEzzBv+Z\nGMMA3NMX0TYxiK5ky73Xkwcn0KhAY6mXan/up2gnWFpMfQjyI4WxLxAH7UCD\ngmSwozS9gTLhymurJ2tpJXtuJlwv65rAe6lLQauiBGB8Ud1A5Z80w+oKf77E\n03c8PN/uL1uGuFGxN5bMhPHehfFop4eHIl0aiOR05mqtB9tMVGNy0R/tdh2o\njr4gQ4N4WG78cuI0q7wRJTwZW/00Qy/x1ve3M3oT96f0SmcDiG76QIL/1SXk\now6EwYEBjbb0KHK8XyP8HvXIc7vbKcK7161bJyXrBKUchh539OtHURKP4rAf\npv1L+KtZ6Vjsq69Td3LbBCDAU5W2Dep7zdCjDDX1GYLTxDlfLTDfB1A2+R1Z\nxAzsnEdCnI3jrpd6WI6yRl7guKteAWhd+guxmWipQ6rROdZf1NtcAwVWs6UV\nPnwGBZm1SG4+HvzHhcTm2Nsd4G4K5X0OANNu/0JEauUJbRZl9CmXx8GgyA3m\nsU6V87EtcVO/Nrwd0Rr+M+KTxAr6x9wptWFvz0wH8gDJkygkREsDF1obIoUQ\nRwV58DBriVYPpav5dBXcFKfUWqd+l1Lree2Dbv1/yIsZiPUOvn3DOmswD6Tl\ncULVG/2qrvkF9MwL0brskKO4QxxX38is9J3CMFEOxbXrXhyT8WZ8Y7KqZ/1Q\n2cWJ\r\n=kFZV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHduISNF2jiUHuyPjRZHbIDe+98d6+8qqHUeKIGl75YLAiA/ZCcqrh4PuKJjYGzey4NkB0rvvhoqcOhveFra9qpxsA=="}],"size":2013,"noattachment":false,"key":"/@putout/plugin-remove-nested-blocks/-/@putout/plugin-remove-nested-blocks-3.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-remove-nested-blocks_3.0.0_1583655615749_0.2930889523269027"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-remove-nested-blocks [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-nested-blocks.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-nested-blocks \"npm\"\n\n> Delimited by a pair of curly brackets **block statement** is used to group zero or more statements.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/block)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and remove **nested bocks**.\n\n☝️*Remember, when you [writing a transform](https://github.com/coderaiser/putout/tree/master/packages/engine-runner#readme) you can skip all parts related to **removing nested blocks** and just reuse current **plugin** it will make your code simpler and less error prone.*\n\n## Install\n\n```\nnpm i @putout/plugin-remove-nested-blocks\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"remove-nested-blocks\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nfor (const x of Object.keys(a)) {\n    {\n        console.log(x);\n        console.log(xxx);\n    }\n}\n```\n\n## ✅ Example of correct code\n\n```js\nfor (const x of Object.keys(a)) {\n    console.log(x);\n    console.log(xxx);\n}\n\nswitch(x) {\ncase 1: {\n    const m = 5;\n}\n}\n```\n\n## Comparison\n\nLinter | Rule | Fix\n--------|-------|------------|\n🐊 **Putout**| [`remove-nested-blocks`](https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-nested-blocks#readme)| ✅\n⏣ **ESLint** | [`no-lone-blocks`](https://eslint.org/docs/rules/no-lone-blocks) | ❌\n\n## License\n\nMIT\n","publish_time":1583655615888,"_cnpm_publish_time":1583655615888,"dist-tags":{"latest":"9.1.0"}}