{"_id":"@putout/plugin-merge-return-with-next-sibling","_rev":"4160088","name":"@putout/plugin-merge-return-with-next-sibling","description":"🐊Putout plugin adds ability to merge return with next sibling","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T20:37:24.000Z","created":"2025-01-14T15:59:17.426Z","1.0.1":"2025-01-29T15:10:31.111Z","1.0.0":"2025-01-14T15:59:17.426Z"},"users":{},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"versions":{"1.0.1":{"name":"@putout/plugin-merge-return-with-next-sibling","version":"1.0.1","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to merge return with next sibling","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-merge-return-with-next-sibling#readme","main":"lib/merge-return-with-next-sibling.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":{},"keyswords":["putout","putout-plugin","putout-plugin-merge","plugin","merge","duplicate","functions"],"devDependencies":{"@putout/test":"^11.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^23.0.0","lerna":"^6.0.1","madrun":"^10.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=37"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-merge-return-with-next-sibling@1.0.1","gitHead":"0a04e7bdba57b1cda825c9e230312b33964f7fc7","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.13.1","_npmVersion":"10.9.0","dist":{"shasum":"b6f1ba16922688fcca4b7a59af83585d4072742e","size":2335,"noattachment":false,"key":"/@putout/plugin-merge-return-with-next-sibling/-/@putout/plugin-merge-return-with-next-sibling-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-merge-return-with-next-sibling/download/@putout/plugin-merge-return-with-next-sibling-1.0.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-npm-production","tmp":"tmp/plugin-merge-return-with-next-sibling_1.0.1_1738163430942_0.5814356142389043"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-29T15:10:31.111Z","publish_time":1738163431111,"_source_registry_name":"default","_cnpm_publish_time":1738163431111},"1.0.0":{"name":"@putout/plugin-merge-return-with-next-sibling","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 merge return with next sibling","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-merge-return-with-next-sibling#readme","main":"lib/merge-return-with-next-sibling.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":{},"keyswords":["putout","putout-plugin","putout-plugin-merge","plugin","merge","duplicate","functions"],"devDependencies":{"@putout/test":"^11.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^23.0.0","lerna":"^6.0.1","madrun":"^10.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=37"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-merge-return-with-next-sibling@1.0.0","gitHead":"a8464bea648a65c038cc078c8d7ac5ff30389829","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.13.0","_npmVersion":"10.9.0","dist":{"shasum":"ff6eb60d9e8afbc6721ad8677138638468db3d05","size":2307,"noattachment":false,"key":"/@putout/plugin-merge-return-with-next-sibling/-/@putout/plugin-merge-return-with-next-sibling-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-merge-return-with-next-sibling/download/@putout/plugin-merge-return-with-next-sibling-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-npm-production","tmp":"tmp/plugin-merge-return-with-next-sibling_1.0.0_1736870357212_0.024523163599619036"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-14T15:59:17.426Z","publish_time":1736870357426,"_source_registry_name":"default","_cnpm_publish_time":1736870357426}},"readme":"# @putout/plugin-merge-return-with-next-sibling [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-merge-return-with-next-sibling.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-merge-return-with-next-sibling \"npm\"\n\n> The `return` statement ends function execution and specifies a value to be returned to the function caller.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return)\n\n????[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and merge `return` with next sibling. Checkout in ????[**Putout Editor**](https://putout.cloudcmd.io/#/gist/2cb7e8836ce0adb6009f21859f8a0c15/9eea5b36a4f6664b05f2f9f0abd271a62a4dbbbe). Merged with [`@putout/plugin-return`](https://www.npmjs.com/package/@putout/plugin-return).\n\n## Install\n\n```\nnpm i @putout/plugin-merge-return-with-next-sibling\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"merge-return-with-next-sibling\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nfunction x() {\n    return;\n    {\n        hello: 'world';\n    }\n    \n    return;\n    5;\n    \n    return;\n    a ? 2 : 3;\n}\n```\n\n## ✅ Example of correct code\n\n```js\nfunction x() {\n    return {\n        hello: 'world',\n    };\n    \n    return 5;\n    \n    return a ? 2 : 3;\n}\n```\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-merge-return-with-next-sibling#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}