{"_id":"@putout/plugin-apply-consistent-blocks","_rev":"4159638","name":"@putout/plugin-apply-consistent-blocks","description":"🐊Putout plugin adds ability to apply consistent blocks","dist-tags":{"latest":"1.2.1"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T20:35:51.000Z","created":"2023-11-13T12:50:58.601Z","1.2.1":"2023-11-13T14:50:35.508Z","1.2.0":"2023-11-13T14:44:02.678Z","1.1.0":"2023-11-13T14:34:11.576Z","1.0.0":"2023-11-13T12:50:58.601Z"},"users":{},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"versions":{"1.2.1":{"name":"@putout/plugin-apply-consistent-blocks","version":"1.2.1","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/v33.2.0/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","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","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":"5c18f849eb6a0d210438cb1c6e50096b2806c26a","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-consistent-blocks@1.2.1","_nodeVersion":"16.20.1","_npmVersion":"9.6.6","dist":{"shasum":"812399ba82cf87cd36743c6299648249736a4674","size":2260,"noattachment":false,"key":"/@putout/plugin-apply-consistent-blocks/-/@putout/plugin-apply-consistent-blocks-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-consistent-blocks/download/@putout/plugin-apply-consistent-blocks-1.2.1.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.1_1699887035301_0.40779159169444257"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-11-13T14:50:35.508Z","publish_time":1699887035508,"_source_registry_name":"default","_cnpm_publish_time":1699887035508},"1.2.0":{"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":{"shasum":"9c00ddbc120e0e2cd5c1822559a64f2133df4623","size":2232,"noattachment":false,"key":"/@putout/plugin-apply-consistent-blocks/-/@putout/plugin-apply-consistent-blocks-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-consistent-blocks/download/@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,"_cnpmcore_publish_time":"2023-11-13T14:44:02.678Z","publish_time":1699886642678,"_source_registry_name":"default","_cnpm_publish_time":1699886642678},"1.1.0":{"name":"@putout/plugin-apply-consistent-blocks","version":"1.1.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":"8cddf61856a22c538b957aa94362893fd8ee0804","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-consistent-blocks@1.1.0","_nodeVersion":"16.20.1","_npmVersion":"9.6.6","dist":{"shasum":"d65a80e9289ceb0c55f95571e1d1c95ffa0df09e","size":2159,"noattachment":false,"key":"/@putout/plugin-apply-consistent-blocks/-/@putout/plugin-apply-consistent-blocks-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-consistent-blocks/download/@putout/plugin-apply-consistent-blocks-1.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-apply-consistent-blocks_1.1.0_1699886051369_0.39056919317954564"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-11-13T14:34:11.576Z","publish_time":1699886051576,"_source_registry_name":"default","_cnpm_publish_time":1699886051576},"1.0.0":{"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":{"shasum":"7da1feb262a9d20dc101fdbf0df67e5e3fc26680","size":2141,"noattachment":false,"key":"/@putout/plugin-apply-consistent-blocks/-/@putout/plugin-apply-consistent-blocks-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-consistent-blocks/download/@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,"_cnpmcore_publish_time":"2023-11-13T12:50:58.601Z","publish_time":1699879858601,"_source_registry_name":"default","_cnpm_publish_time":1699879858601}},"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","_attachments":{},"homepage":"https://github.com/coderaiser/putout/tree/v33.2.0/packages/plugin-apply-consistent-blocks#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}