{"name":"@putout/plugin-remove-nested-blocks","version":"1.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.0.0","eslint-plugin-node":"^9.0.0","eslint-plugin-putout":"^1.4.4","lerna":"^3.8.5","madrun":"^2.0.0","nodemon":"^1.14.12","nyc":"^14.0.0","putout":"^4.31.0"},"peerDependencies":{"putout":">=4.31"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-nested-blocks@1.0.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-CwWwglkFu/sn+wYB7peXz/NjfemGIfu5CRamBmRt6DDkaxmlEopWbEHkBx3HJ3OWpkW+AVGvkZnznaFMsigYjw==","shasum":"979fddbe7e418887fa4958a0aa31ccddb83219ef","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-nested-blocks/download/@putout/plugin-remove-nested-blocks-1.0.0.tgz","fileCount":4,"unpackedSize":3940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdElA1CRA9TVsSAnZWagAAAb4QAIVCv52XUkWdfxMEFEay\nvOu2fyVfxG6987iMx+BhFTqWZnue00BHezPqc1e6hcuLSsz/L3m1TZlOKbDi\nYNE1+Fc5LScaX8VUqewn27dGgbNv4WrlYEs48EElqUbMdWLSh6jiled4RnkN\nkywmjU6gU73iNTMGUEY0PyNvTZ/pvIQjMmckW5PArj4WwMkpj0qwrrpJ72n9\n1eyjzCnTiG7ZFOWzlinI5HSKBOImW1DAc56Ue1dXGLbFY4VwzlcNCYn0PrmH\ncsrBQEsXsYiKpAqBP7sEZCRWTQzBaT97iD28sk82douv1O1U04RlICjXVEJZ\nx69IniISdwKCW+sGRTZlE/xasDJNUHh4D3v5iBWHLEe7It93/hKF/4yXJjyQ\nI8Ip2KqlpeSvOKvTkNIYPn3roAsF9H1KvMVnYOGvz3uYqksFpKddCbt2bzRf\nNwCYfL6aMOXebh6eLmd0aMJnWsCVLxwkWDlpsNEKic3Ww3fmxDoxxpAOlJb1\nu4x2V3unY2jY5qfSnzP+9Od4KSgiE4m7ee8qJPKviZ7fNj5Gsbsg4q1FtTR+\nx+S+Vffp3UApCVKCQ9d9xEFoYLhrviX+yHzY2usOBiWLO1k4UzyvYItNDdQk\n7d+UlFf3djmfvOB9zGyr5HRzbFNkFvfl9vJlVHVmWH4iCbCsSZF2CZlLPBrr\nyyVY\r\n=ANIQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQOGLYeEwDCRCellylv42xj4qhjcTFoMxWoNiZ1cW61wIhALOUVGrr6Fz8vF5k5KlIIk8oVHmTulDZLWr0nP/WbmPr"}],"size":1912,"noattachment":false,"key":"/@putout/plugin-remove-nested-blocks/-/@putout/plugin-remove-nested-blocks-1.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_1.0.0_1561481269357_0.34470111004662907"},"_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":1561481269573,"_cnpm_publish_time":1561481269573,"dist-tags":{"latest":"9.1.0"}}