{"name":"@putout/plugin-apply-consistent-blocks","version":"1.0.0","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to apply consistent blocks","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-consistent-blocks#readme","main":"lib/apply-consistent-blocks.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","wconsistent-blocksch:test":"madrun wconsistent-blocksch: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","consistent-blocks"],"devDependencies":{"@putout/test":"^7.0.0","c8":"^8.0.0","eslint":"^8.0.1","eslint-plugin-n":"^16.0.0","eslint-plugin-putout":"^21.0.0","lerna":"^6.0.1","madrun":"^9.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=33"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"928f1c592ff453dda23395b5572a19c73ed00e8f","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-consistent-blocks@1.0.0","_nodeVersion":"20.9.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-GjooKcHB4iE+zzxHR9tZCpYaRTq6rjfH3fv5qPg6PL+mAfnxxeOJSu/RoBeq3vbNEgM2zoiXT90ps4R540HQHA==","shasum":"7da1feb262a9d20dc101fdbf0df67e5e3fc26680","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-consistent-blocks/download/@putout/plugin-apply-consistent-blocks-1.0.0.tgz","fileCount":4,"unpackedSize":4544,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLedlqZ6GrNLqvmdqOnrpV4bX0V4gGk96CoiOev6Nf1AIhAIkRyKHFW5ue8PCRigptKZhRCQO2/DddC+Of0n2Uf+pc"}],"size":2141,"noattachment":false,"key":"/@putout/plugin-apply-consistent-blocks/-/@putout/plugin-apply-consistent-blocks-1.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-apply-consistent-blocks_1.0.0_1699879858314_0.07128639028206663"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-apply-consistent-blocks [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-consistent-blocks.svg?style=flconsistent-blocks&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-consistent-blocks \"npm\"\n\n> A **block statement** is used to group zero or more statements. The block is delimited by a pair of braces (\"curly braces\") and contains a list of zero or more statements and declarations.\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 apply consistent blocks. Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/9035db21bae7b6c76d1dc875d4c74828/07edbfd755060ae263949caf08b31aa43609375a). Merged to [@putout/plugin-conditions](https://www.npmjs.com/package/@putout/plugin-conditions).\n\n## Install\n\n```\nnpm i @putout/plugin-apply-consistent-blocks\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"apply-consistent-blocks\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nif (a > 3) {\n    m();\n}\n\nif (a > 3)\n    b = 5;\nelse {\n    b = 6;\n}\n\nif (a > 3)\n    b = 5;\nelse {\n    b = 6;\n    fn();\n}\n```\n\n## ✅ Example of correct code\n\n```js\nif (a > 3)\n    m();\n\nif (a > 3)\n    b = 5;\nelse\n    b = 6;\n\nif (a > 3) {\n    b = 5;\n} else {\n    b = 6;\n    fn();\n}\n```\n\n## License\n\nMIT\n","publish_time":1699879858601,"_cnpm_publish_time":1699879858601,"dist-tags":{"latest":"1.2.1"}}