{"name":"@putout/plugin-apply-consistent-blocks","version":"1.2.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":"9402e1742d9ead2fb7fb4997188eb48c22f191d7","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-consistent-blocks@1.2.0","_nodeVersion":"16.20.1","_npmVersion":"9.6.6","dist":{"integrity":"sha512-p9PWmGdODvv2OGXUcv7ZQ5f2CfMmeY4TVdo9YGuc1l4wxf2a3n+rffSBfCF/rjgmr733lunzuAxOBon2nLlOCg==","shasum":"9c00ddbc120e0e2cd5c1822559a64f2133df4623","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-consistent-blocks/download/@putout/plugin-apply-consistent-blocks-1.2.0.tgz","fileCount":4,"unpackedSize":4869,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAbp4CqIbvx0iumAm9N/BLoPU4EV+Vw/skG5y+oL2NfvAiA5C4R4CdtQ/K+HJfdJ1mZi6KpR2IwcfPYTuGWb6klN5g=="}],"size":2232,"noattachment":false,"key":"/@putout/plugin-apply-consistent-blocks/-/@putout/plugin-apply-consistent-blocks-1.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-apply-consistent-blocks_1.2.0_1699886642505_0.6793623874601715"},"_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":1699886642678,"_cnpm_publish_time":1699886642678,"dist-tags":{"latest":"1.2.1"}}