{"name":"@putout/plugin-remove-nested-blocks","version":"6.2.0","type":"commonjs","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":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-nested-blocks#readme","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/plugin-convert-reduce-to-for-of":"*","@putout/plugin-tape":"*","@putout/test":"^5.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^15.0.0","lerna":"^5.0.0","madrun":"^9.0.0","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=25"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"b71b2e342f717a3516b36f2e1994fee369eb52e7","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-nested-blocks@6.2.0","_nodeVersion":"18.4.0","_npmVersion":"8.3.0","dist":{"integrity":"sha512-A+53qnGsjUBsqcv6BmX9qHh4Arux4lJH7wDnOdYNYi1rKRME+JzCz2j+8OFH7htWVIEp+4UbHIg4AYFEF+raUg==","shasum":"23c0044d562c18f45c54cf527f7add64d048bd16","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-nested-blocks/download/@putout/plugin-remove-nested-blocks-6.2.0.tgz","fileCount":4,"unpackedSize":5160,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdEz0Ua9H1wlUrfgRzjFFP/XeZxcAdx4J+i/+koAuzjwIhAMQclPIqHvSaV/ha3Uw09PnKNhyNKg2Qdf4dKrHIZevH"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizc1wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqHGg/9Ec72wxqrx1hQm0b7uZJlCccZ/i0i4F0pRa80sn9NadPyGLO6\r\nhlzHCgpvE6w8jvJDazdsg7zyvEGjirsi/dPZ5AdQ+C9SwBqwFitfchnzQ35Y\r\ndkZJTr8CpxHzVz18rVrDW85CXr4QNg5K5FlbBPBwmO/VNAx96KD4Veb75PBV\r\np54k15iwDW8/L4el3R/+VRsrS+W69nhGycmsC9+Qzn+Gpxy0HqDV7zziIM1v\r\nMppzoGU1pFO2EN4K+4QUaLH1DSxJpuWpRifbB/imXB6YsRUJzIQsjFkozm2x\r\nZcXw+Q6F4MGcJfMVe2DZknuNOnmx1e9m9Fq2nVQsVGfurOJzFErVSnQT+J1I\r\nZAJW14mrzrsbTEsjPmolFZA7iYqNOVQLOXBGpe8jnp1nfDhzaxszfiSz5vXb\r\nbPDnhRXp61AcQwC9IeLpOTsf26KcmQwJ+8JT4vaG0Sjl0YRkIngVyiK/IT94\r\nM+IT9hoPUSHmdX9shj+Efuq0KUrKy06hcY7QOWm3ywawP5wn/xERvAy/fNRm\r\nS1dQ6841wDV0Tk0Lrh+zaFjEkbv2Q9dUmfE8fYV9ags53DdtP/SAETyDUb7E\r\n+hYIZB8IR2xGKA0hrbL4G/53qyAN3C/Ilglga6SO+DeJqkcz3BOMrlqAdikU\r\n1AkABBOvq8wRU46Wu8CgkTpyLTr0ed9BBL8=\r\n=cm/n\r\n-----END PGP SIGNATURE-----\r\n","size":2440,"noattachment":false,"key":"/@putout/plugin-remove-nested-blocks/-/@putout/plugin-remove-nested-blocks-6.2.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_6.2.0_1657654640547_0.673924246171369"},"_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":1657654640737,"_cnpm_publish_time":1657654640737,"dist-tags":{"latest":"9.1.0"}}