{"name":"@putout/plugin-remove-nested-blocks","version":"4.1.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-tape":"^7.7.0","@putout/test":"^4.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^13.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"},"gitHead":"8931c371760aac0cce6e283f0e6b18335d3d65e7","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-nested-blocks@4.1.0","_nodeVersion":"16.13.2","_npmVersion":"8.3.0","dist":{"integrity":"sha512-ivnfPuobEFgw6Ea/JwADTpJUWHRZE6nEf2CIfjEWtejiemd7qa5WwfXbHRGYEsszMXo5BAGM4lgul5yDrC7BnQ==","shasum":"e0afff21a5259ae1b77f7d634ec9caccbb678e26","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-nested-blocks/download/@putout/plugin-remove-nested-blocks-4.1.0.tgz","fileCount":4,"unpackedSize":4436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5wf7CRA9TVsSAnZWagAAEesP/imluxX3m5VbNUcGCbXH\ndmpVsq5JVlSE71v3coUVQKLQ/ALTcTYU3oAv8o7ODt3Y5Rxpei+KMWTn4aqh\nHIS7T/loK+FF3/tufVDljYcF/Pwnin72skw3y5SSOp89WTliIMDXBqyOBJjM\nEFXBdu6ME49daKKshBVVTW+3g8Vi2PmW6+jSia6gQehFGi3NO7j4LDF+6Tqz\n3DX/w1+yFdjd8IRnHJLLoL5VssAUUj4lNJN3wDsTrUzinv8vo2xF9ahOcSYZ\n4ehaJn28EAcFfUO2MAn9ZIKhbjf3VW61C7BYDlipSeuaabfpsOi+hC3bwjFO\nwAE9GvCrDKEZRPmfgA78yYxP/d7I8kn8rBKqqPhVtV4J3ZcTrHTNytzTIxqY\nnIfNCgRcecC7sDAxO0yzlQltQlq8WH+lO+yGQxF2TXxfrFl0AHgq4xNNM/kJ\nTBgLNsISsBtl+ikLhWmUmqFFaYt2khVYKu2NmeLZ/BY1n7go2nHBkML7/s/8\nfy0dgTNhGvyj2Q1ymaU2e/5dkGM6WsymnPCQ3mDdHssXy7p50YNUo3wrMeog\nGlqP442ekSuMtTiRWG01BGsBLPJKmBzKukb/W6Zi8BEJBjyx2x10Dn99ZWME\nHIk55wWzWPbNgpf1qAiTkXHQ2rxfp4cp7KAKhGrmP+sMM7suL4+Y4WuwG8QJ\nxfPB\r\n=NrGj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBBoPsqrf90o8dPmlxSmquLChB73F06kUUtJm1iYIQvAIhAMZ1Ll9IIwF8h1l5Mr2V68FUP0XCOkYuGLi5KdVxwpjx"}],"size":2109,"noattachment":false,"key":"/@putout/plugin-remove-nested-blocks/-/@putout/plugin-remove-nested-blocks-4.1.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.1.0_1642530811165_0.06616183067665404"},"_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":1642530811296,"_cnpm_publish_time":1642530811296,"dist-tags":{"latest":"9.1.0"}}