{"name":"@putout/plugin-remove-nested-blocks","version":"1.0.1","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.1","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-qKq4pJwIc7wreZwBK/FRuQvAsmlUT9rF33KunQ25MCEmJdFlYlqWJKIGSFkcsGnpBvzIQ835aoJ4vjbU6KYvYA==","shasum":"3567188cbbc66bccdd34df68f7428644ca08158a","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-nested-blocks/download/@putout/plugin-remove-nested-blocks-1.0.1.tgz","fileCount":4,"unpackedSize":3999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFiXxCRA9TVsSAnZWagAAqW4QAJS0cF8/ieiNWk1JkTg8\nJneDmQzo2nIoMS8Wyhum1oAzLbSN2v/+MmjdiPj2q51vBEPYp0PhlaFXROk/\n7J5AyBzJCbU9yB8AkN8SIOCVLib8VnHagwtBjiZKLSmCpnXqD9iDDMwAoXqF\nYObbRk07WT4TS40+zAaJqmeBAPDXvznko6vcigpSV7Ix4QjipY8XwsIGFWjz\nrgPNu5XC8S5L3Ghw0v2td/cy7xN5zDQLJYF7K8i8SIDaXB1rR+Y5gw6rM9iL\n0TyoImjVJzM+RygwFe9Enh2z3sLNQGMkaYGOMr+A4sE0FOPDWEyB9ZqvwGmH\nubeZ3YuOuvvU6tI8yum9VKIoxDA5iQ+K/eIeUlia+OkFGaI8YLCf+M86FCDc\ncheOAy9sNUOI3AD9iOvSSONH+Ad2b56FsRgEEtpbyo6xffw1+oTLLAJKhaTM\n5AddcXEXnFB4hyU4PNUY5VAO2mkg4pgCguSfXF9pzAqZ4HMfmAacLjtD4u6b\nLrf2czpdPpVAzu8XXsLCk05NP0jBmb3DEJxIA7VmMI4eETpssYJ6/sGLljLu\nKkf843i5j/8SlCIqT4Vk43KSYB7kG1chM5ki4vxiAnlu60RcMsFnHWjI0qi9\n06054Bn9xtX4VkV2Ax0BQxH7i4z00Fsk/qhdxaBP+FoCl/jqUSAUMoBZyedk\nABZg\r\n=t8jS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEgOgjKAGiGb4Hu6d7dm430KDuAGzffeCLUMhgg6zKTFAiApJLuQs6BDzOi1I+jcjyNEXkicG6c7H/ZNB/5u6mzExQ=="}],"size":1945,"noattachment":false,"key":"/@putout/plugin-remove-nested-blocks/-/@putout/plugin-remove-nested-blocks-1.0.1.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.1_1561732593007_0.40086077109521656"},"_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":1561732593122,"_cnpm_publish_time":1561732593122,"dist-tags":{"latest":"9.1.0"}}