{"name":"@putout/plugin-remove-nested-blocks","version":"6.0.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":"^4.0.0","madrun":"^9.0.0","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=25"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"1f6aaec377d9411297dd5a1e94610f1cdc779921","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-nested-blocks@6.0.0","_nodeVersion":"18.0.0","_npmVersion":"8.3.0","dist":{"integrity":"sha512-EYnAt5izGvgcv9JDaIaUk1lv2sZkuOo6okmiyyaNL4OP35XTCHw5ixaeVEeFMwhL482PhqQc6o0wLeK37Q8xVw==","shasum":"1e0d7a16f478b656a4348ad10c56a86e1e718071","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-nested-blocks/download/@putout/plugin-remove-nested-blocks-6.0.0.tgz","fileCount":4,"unpackedSize":5156,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIgS3A9k/joZT9rqill7baOa7AzJ+Aq2cOeEvVtvKDAwIhAKqrA2YofgGtHv99b8VFfAOsnxbdvTndl9ltfBUrygLt"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiclC9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBxxAAjCKbeSdnJJESIepIQ2zCAA7YitMM7vDCMfwAlU2C6ISxBDE5\r\nGenpUOtFkz/PPhjvOfLmbYe5SbqV38ISqRPdiS3UtYIZHQwgs/hEJ9N4iOz8\r\nrl9I6mgG/rxM6e06Etzq368NxKtnbNhEoFu84inbvCtB7DB2WEcDJZi17A1U\r\n2UlAFuRTTWUkveZFH31sMiqeGXlx7LYBYVEzwx/F/vm1LDHJ5fgTbXn+AMvj\r\nateftlONapqIM1cm4UzQvlGeO0iYlFOBjkIaPxgBXDbf1ulI0Gb/bgf7BdyB\r\nkufCSYoaJdxYJM2ADzEYQAabq/RK9I+N/U5di+nsoVydT+WOW+9nGtnbBcO/\r\nIMEgDxk6zPLxLS8ZnS7DPLYuS+uiojf+5pc1Jt8UrYLQw/ULJCEnwiV9T+R3\r\nFg5jTg2x488VEPDKM3t9G4nhPVoL36bkdZ2zAnxerkQMmrMUiSpRsj+6kLXW\r\npB42kYweCXVw1z06rlrlbhA+P3zBgi45tYdhrBTSsPYtcxqpLeMaqSxnxvny\r\n9/Cv2oPLMNNk+CiLwDuQwOV4Y5g6Ghw6ouHQUH05yUIbFkbFv9dNZBIY+naS\r\nznYcVQAAMohdoz0ZSn9PadbyS/ADmnGuWXiuC2/8EeKO73NOF7YOVwU5Vz5H\r\nOJ9h5yZtm91yxWQB0Vi3bp/X+uiCP2RdoLM=\r\n=adCf\r\n-----END PGP SIGNATURE-----\r\n","size":2440,"noattachment":false,"key":"/@putout/plugin-remove-nested-blocks/-/@putout/plugin-remove-nested-blocks-6.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_6.0.0_1651658941180_0.133239536267157"},"_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":1651658941294,"_cnpm_publish_time":1651658941294,"dist-tags":{"latest":"9.1.0"}}