{"name":"@putout/plugin-remove-nested-blocks","version":"4.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","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","nested","blocks"],"devDependencies":{"@putout/test":"^3.0.0","c8":"^7.5.0","eslint":"^8.0.0-beta.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^9.0.0","lerna":"^4.0.0","madrun":"^8.0.1","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=19"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-nested-blocks@4.0.0","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-AcMk7K88E2TxxxR1DWN+YlQkQfpkwvZxJQ2trGjIzhjTyJGDG5/M5iX6NbvKWqr5NnNrhqBXz7f7U5yQgnl/nQ==","shasum":"3b58e17411ac3e7dfd4edbbec0a91999180d8eac","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-nested-blocks/download/@putout/plugin-remove-nested-blocks-4.0.0.tgz","fileCount":4,"unpackedSize":4522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKMSxCRA9TVsSAnZWagAAO2MP/RcUhPwRx8segES1GgV5\nZfxwUY7BdL2L1zqZ9pVP+ZfzTxz8dCnUlA/X9sG0Grhj/4tPEnNYuJBZiA7E\n5qOETSLYnqHnvuY4tzDwC9s0JugO4Si2s8OGX0TQwNHmZOn+6zSgeYsMzZWw\nDBj3guzStqDsDUNPBgiPInD9mlZNR84sxY1I1BTy+VTQxXKjWBW2Df+0DiyS\nryNMsdwFbnasuaX5LeiQ0OM6SVm5y11Vo9dlpKfnJxR2lCm+uT8bqfgKR6EJ\nNmRJ+wAWIYyMjTF/bpqT+ucC68oBsnKtMfVmChoMeJKs1odNcGbS+bTjdlcm\n40BlZDfhhvev9/qFxbDd1XB9M/PqqVZeEHntweSd6XTBxAF0QGnKt4VjcIDa\nusa+cH0jvqzuEqyOsN9uc/urKV43PvNXDoRZ+yoPP1voAYdFSJ2GKzuksI0q\n86tQl+ebaBBQXvifD/QoIXFIyo5qhxSdllJ4Ndtr33TnLUrv28UiJ+TEQthW\n6zdsAAOD3+nSfP6sXQpajAAmMPOafmXUwl/YwGx+FgaEkUy6oiH85qqYDCoH\nY+cveDE2nOlpa+SKrJWdWVeu6z429WTNTFNZqOrywX73J8+TwJv1kAQR7Vhe\nbx2NvAwZyI9D3gglbpEcgoMi03Kk/poHxlXHFaw61uC+Vdf2g0NYSyyhqhQS\nlqAk\r\n=mpBi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICMIcIwtS0xjAMdOQzecURDCHZ+Elo8TUd4ZNf7I/WMsAiEAkFT6rzutLprymAll6hs/qedULwcKjXx9+2gPMK3VTTo="}],"size":2121,"noattachment":false,"key":"/@putout/plugin-remove-nested-blocks/-/@putout/plugin-remove-nested-blocks-4.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-remove-nested-blocks_4.0.0_1630061744991_0.6318988513781858"},"_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":1630061745350,"_cnpm_publish_time":1630061745350,"dist-tags":{"latest":"9.1.0"}}