{"name":"@putout/plugin-remove-empty","version":"15.0.0","type":"module","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/eslint-flat":"^3.0.0","@putout/plugin-remove-nested-blocks":"*","@putout/test":"^13.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^27.0.0","madrun":"^11.0.0","montag":"^1.2.1","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=40"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-empty@15.0.0","gitHead":"6d40e1c882d4a26a82566b5cfff535c94e4e32c0","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"24.1.0","_npmVersion":"11.1.0","dist":{"integrity":"sha512-g3N6N4ARHapjYTjeFkM9CvYb3Zsi7rfFKUjgSXIaWEGvXGElJDZZN1QKsS7wr2UjuryPUJQAUwQHuJYDDnNsrQ==","shasum":"5f062f82be264bf69d09cdc5b0514f64cbda14f6","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-empty/download/@putout/plugin-remove-empty-15.0.0.tgz","fileCount":9,"unpackedSize":12257,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD2uIGA67nqmta6c//T+GHywePVZrYKnqbHhKp4Z6QqpgIgIcZAYV9NUu0d/BU9beOj6dwZfXvGBjrJJ34rGbQ0pPY="}],"size":3956,"noattachment":false,"key":"/@putout/plugin-remove-empty/-/@putout/plugin-remove-empty-15.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-npm-production","tmp":"tmp/plugin-remove-empty_15.0.0_1748714264167_0.058054833109690396"},"_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":1748714264358,"_cnpm_publish_time":1748714264358,"dist-tags":{"latest":"15.0.0"}}