{"name":"@putout/plugin-remove-empty","version":"14.0.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 blocks with empty body","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-empty#readme","main":"lib/index.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://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","empty"],"devDependencies":{"@putout/plugin-remove-nested-blocks":"*","@putout/test":"^11.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^24.0.0","lerna":"^6.0.1","madrun":"^10.0.0","montag":"^1.2.1","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=38"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-empty@14.0.0","gitHead":"756404883a9cdde214289da011b10d6c4cd57278","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.13.1","_npmVersion":"10.9.0","dist":{"integrity":"sha512-QvWon0eDNIyg+Ttz4sk0qUiOZsRqMDSpVEV1ATFz11pk11odE0mu1lkZyHjx6rpzBG0cEI1FuaE5hCXCYKMTwQ==","shasum":"4ac8aef14bc0acd2cc41bdcab190e74666cf80ab","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-empty/download/@putout/plugin-remove-empty-14.0.0.tgz","fileCount":9,"unpackedSize":12257,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCYFyot/2/ghu/uPAYTzUJOT0LSitDqe1pxQxKuQ0WUKAIgHNxZ1bKP6x05sUy528eloBcYQbWHuFRzapGdCnFhRlQ="}],"size":3955,"noattachment":false,"key":"/@putout/plugin-remove-empty/-/@putout/plugin-remove-empty-14.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-remove-empty_14.0.0_1738846772927_0.0732130577528487"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-remove-empty [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-empty.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-empty\"npm\"\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and remove:\n\n- `empty blocks`;\n- `empty static blocks`;\n- `empty patterns`;\n- `empty arguments`;\n\n## Install\n\n```\nnpm i @putout/plugin-remove-empty\n```\n\n## Rules\n\n- ✅ [block](#block);\n- ✅ [static-block](#static-block);\n- ✅ [pattern](#pattern);\n- ✅ [nested-pattern](#nested-pattern);\n- ✅ [argument](#argument);\n\n## Config\n\n```json\n{\n    \"rules\": {\n        \"remove-empty/block\": \"on\",\n        \"remove-empty/static-block\": \"on\",\n        \"remove-empty/pattern\": \"on\",\n        \"remove-empty/nested-pattern\": \"on\",\n        \"remove-empty/argument\": \"on\"\n    }\n}\n```\n\n## block\n\n```diff\n-if (2 > 3) {}\n```\n\n## static-block\n\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/8d55df306ea7a3c74b494d37bd45f320/634cc2cf40fe7b691d969bb2bbfceecd1668b004).\n\n```diff\nclass Hello {\n-    static {\n-    }\n}\n```\n\n## pattern\n\n```diff\n-const [] = array;\n-const {} = object;\n```\n\n## nested-pattern\n\n### ❌ Example of incorrect code\n\n```js\nexport const func = (param) => {\n    const {\n        a: {\n        },\n        c,\n    } = param;\n    \n    return c;\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport const func = (param) => {\n    const {c} = param;\n    return c;\n};\n```\n\n## arguments\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/2e19524f26b2fb412dd04228cc4a42e1/71b0034c61c33d2f8957b84b4e83d3844aba4f34).\n\n### ❌ Example of incorrect code\n\n```js\nconst create = ({} = {}) => 'hello';\n\nmodule.exports = ({rule, plugin, msg, options}, {}) => {};\n\nconst a = {\n    EmptyStatement({}) {},\n};\n```\n\n### ✅ Example of correct code\n\n```js\nconst create = () => 'hello';\n\nmodule.exports = ({rule, plugin, msg, options}) => {};\n\nconst a = {\n    EmptyStatement() {},\n};\n```\n\n## License\n\nMIT\n","publish_time":1738846773150,"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_cnpm_publish_time":1738846773150,"dist-tags":{"latest":"15.0.0"}}