{"name":"@putout/plugin-convert-break-to-return","version":"1.0.5","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to convert 'break' to 'return'","homepage":"https://github.com/coderaiser/putout/tree/v37.22.0/packages/plugin-convert-break-to-return#readme","main":"lib/convert-break-to-return.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","convert","break","return"],"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","madrun":"^10.0.0"},"peerDependencies":{"putout":">=37"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-convert-break-to-return@1.0.5","gitHead":"3ad6720f5f2148c6cc3372e2889ec323484e8621","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.13.1","_npmVersion":"10.9.0","dist":{"integrity":"sha512-4hgJEAHlCuPwvKGPeQVeuVqIs0lMj6a6Hr18gsKz9/eYFBKC5W/3hexb6w0NljBvvdXuFO+qpugPVAscpwwP0g==","shasum":"070dc2e2cca6a2de6e104a2639ae7538282c9667","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-break-to-return/download/@putout/plugin-convert-break-to-return-1.0.5.tgz","fileCount":4,"unpackedSize":4969,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICdexeS/v7u21y5tqJ5ewrseg14gmdAbv5WSExBrPIwjAiAUZurrpkEginO9btJOqqf13xVZxn+iz0fEq+BW4oeRvA=="}],"size":2306,"noattachment":false,"key":"/@putout/plugin-convert-break-to-return/-/@putout/plugin-convert-break-to-return-1.0.5.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-convert-break-to-return_1.0.5_1738241298331_0.8704633820801511"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-convert-break-to-return [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-break-to-return.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-break-to-return \"npm\"\n\n> The `break` statement terminates the current loop or switch statement and transfers program control to the statement following the terminated statement.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax)\n\n> `SyntaxError: unlabeled break must be inside loop or switch`\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Bad_break)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `break` to `return`. Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/a321ee4d76a066c17835b4aa50f91499/10646f7383b8d58cda02417485d5281955da95be). Merged with [`@putout/plugin-return`](https://www.npmjs.com/package/@putout/plugin-return).\n\n## Install\n\n```\nnpm i @putout/plugin-convert-break-to-return -D\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"convert-break-to-return\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```ts\nfunction x() {\n    if (a)\n        break;\n    \n    return false;\n}\n```\n\n## ✅ Example of correct code\n\n```js\nfunction x() {\n    if (a)\n        return;\n    \n    return false;\n}\n```\n\n## License\n\nMIT\n","publish_time":1738241298639,"_cnpm_publish_time":1738241298639,"dist-tags":{"latest":"1.0.5"}}