{"name":"@putout/plugin-remove-nested-blocks","version":"3.1.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":"^7.0.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^8.0.0","lerna":"^4.0.0","madrun":"^8.0.1","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=7.17"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-nested-blocks@3.1.0","_nodeVersion":"16.5.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-uYkHWlaCzIYVCD5iShYbVzoCoyR153MKqw5+mISkVkWqS8z/KJ2CQ4Y6dHzCNzWDcY7Zc3AG9lw4wpi94ddfhw==","shasum":"df5689e544a928749d318f93d169e5415efc7f69","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-nested-blocks/download/@putout/plugin-remove-nested-blocks-3.1.0.tgz","fileCount":4,"unpackedSize":4579,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+IGQCRA9TVsSAnZWagAAHFMQAImtoz1bHIfOWVRB4twI\n3vFL8psuykcuBmT6sIXXQy2Gw075xxH5bIxQXxNF6sca57n4suALLr0BYc0w\n2doyS+UfDg0r3ULW6TU3M0gOGkIroOA4O4aKCU6ZvadhVFnF+f6o1Hcd2vjx\n/fdfrBqF908MporO6zcdAHLPpnC3zouzHbawwxtU17Ik1EB0lMf16Kh3bbf4\ndErJWqBOvz4VYrXRdDQljkVEgaspyJVJUfUpWlmveN63VhBJopuAAK2vVRNT\nZFT+Xis1MTzqYaeGxMQMsSTTdjuA6F61Xdu9d7LwZno8cwLNizlF83J5p8Vl\nE+iFXXPC9quRKHsUob2I60byRfPTzWLmrxMgu21WmUd5RThdWx8jbT278IqP\nttFOj95kzFVjozh76HuEva3nJN3QOAB/1y0Uto6tjT63mS/eFqgO2zpYElPs\n8CDeENjCnxQcDlYKrabXe0W3GLSdNbGnrPgw3M4mOvXWvi54UMw+r+o2PlzE\nNndMuT83lXtlMtW9NAPzMg03bWJQs7agzAm5prdAO7oABchLcbIH1dtstzYP\nA5fNECHZGg6JFRQkjEaEJILb+yL7UtQQDYtyRUtYKiKiLDR0jhFhkktvWRHP\n1i6Mn74rmenb8mIs7tRAE6LsTy7Ypq6p5aJDnOQewfwxk5rF3G0iqa55ujYe\n/DZ6\r\n=CAej\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGm36SdBN+FOJOfj1s78j0gnMqJHEyO8PayOrF0NniabAiEAhelBgo8XmP3uDFYzphJf6w3XS57pXFq8x+oJO64lIbE="}],"size":2125,"noattachment":false,"key":"/@putout/plugin-remove-nested-blocks/-/@putout/plugin-remove-nested-blocks-3.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_3.1.0_1626898832138_0.20577778217442688"},"_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":1626898832308,"_cnpm_publish_time":1626898832308,"dist-tags":{"latest":"9.1.0"}}