{"name":"@putout/plugin-remove-nested-blocks","version":"2.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"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-nested-blocks@2.0.0","_nodeVersion":"13.8.0","_npmVersion":"6.12.1","dist":{"integrity":"sha512-gnQrEadFOsDNFNGUfo/LNhUlVCfCzPbpGGcYnUioi2jFmcxEmdsE5EPfYOHWfGum8Fuv+JScga27ZC3Cp7dqrA==","shasum":"ed8f55a99383f8f20d18b72ed220d1a947090f85","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-nested-blocks/download/@putout/plugin-remove-nested-blocks-2.0.0.tgz","fileCount":4,"unpackedSize":4141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRsWnCRA9TVsSAnZWagAAoqMQAIpvveqXa81YgOS9EWEC\nPTotpnGFSg4fb9sPEAP5QJ1YuLv+drpGjpzBM/ggcAxOkNssIyvq7v8PAX4B\nf5ajTNAez9wRlAOUdpugUThVkxciDesa6CkLmO/Y5Xnx+l0ZBGq21amjBkaa\nHVPjaWV8NIhaFQs7yo99pg52ehLKoU7SJrKcZk2KZhH8MDrniW44YW9/k9GR\nDKnD+yXkCDPnTmsv9fgi75+ZHxNYqJJWc5MGbDm4ywj60MG+161Zg/kBDeEc\nbTBwS8lSho4Mcz85oELY1YA7i4FiMTcLTr7yFSP670kQoDGbsjPlSr+nEX3c\nJbGZLfIJtE6EYNW0U91xhbV8yuvvG86Z1bozJUPeH0mLYwxOhyHjtK6WvORf\nOLCY4kv2LGsAiefYyk02pyPtAd/29VSZmKeiDC9LZ06ek0kJZkINdGXGNQHu\nGs84DGCul/3mvirD79OXsyk7FxGach52VKotXdvAZDfpZL1LlCaK/ji8PqT2\nC83JJbx+xCk57gM+96MGmmFlU6w0SGEPuUJUR69rTA8jnGtFAFziwytlqPq5\n8PNuXOlquzCPuU7p+PkaAJ+xfmerMEXcursF5AGWqRjuaWkMb/u55HeVdtS7\nFOaeYe4FQ0jPS36MIx51oyyguAy4eedd8ZlskocPyMzBttPnUWz9ooPrirwC\n+b2s\r\n=V9CZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqmrTY+XiRypq5hcvR9XDWzCZIqwrPqu3WeqTHoy1NwwIhANeF9beKQETR3crzFRyMrPRM+Bh+BNxjYOH9vpcb6Zis"}],"size":2010,"noattachment":false,"key":"/@putout/plugin-remove-nested-blocks/-/@putout/plugin-remove-nested-blocks-2.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_2.0.0_1581696423226_0.1868205920401449"},"_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":1581696423328,"_cnpm_publish_time":1581696423328,"dist-tags":{"latest":"9.1.0"}}