{"name":"@putout/plugin-remove-unreachable-code","version":"2.1.1","keywords":["putout","putout-plugin","plugin","remove","unreachable","code"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-remove-unreachable-code@2.1.1","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-unreachable-code#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"29723a1573e8be76c8b5ee404b56013f95b23ac5","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-unreachable-code/download/@putout/plugin-remove-unreachable-code-2.1.1.tgz","fileCount":4,"integrity":"sha512-r3eMR+IKnXOmRdfCoIMWN+gY5UWszp82c3aSRvIaRwMAUuN5DOKjGe3JQ4NJ8zfMXZRhjEAqY2MWSHwYmV62yw==","signatures":[{"sig":"MEYCIQDZ3zma8LEkj0xDUd5dMu1XDTTxLIIThrnfeFVtZZQLfwIhAKO1n6PJHDSknbq13Xs0CQv25LoJDtrJFP/7HuXG+J/t","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5036,"size":2280,"noattachment":false,"key":"/@putout/plugin-remove-unreachable-code/-/@putout/plugin-remove-unreachable-code-2.1.1.tgz"},"main":"lib/remove-unreachable-code.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"2f989d076c75a1fb857860170e19beba00072df5","release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"10.9.0","description":"🐊Putout plugin adds ability to find and remove unreachable code","directories":{},"_nodeVersion":"22.13.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","lerna":"^6.0.1","eslint":"^9.0.0","madrun":"^10.0.0","nodemon":"^3.0.1","@putout/test":"^11.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^23.0.0"},"peerDependencies":{"putout":">=37"},"_npmOperationalInternal":{"tmp":"tmp/plugin-remove-unreachable-code_2.1.1_1737841894659_0.5584034397047748","host":"s3://npm-registry-packages-npm-production"},"readme":"# @putout/plugin-remove-unreachable-code [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-unreachable-code.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-unreachable-code\"npm\"\n\n> The **JavaScript** warning \"unreachable code after return statement\" occurs when using an expression after a return statement, or when using a semicolon-less return statement but including an expression directly after.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Stmt_after_return)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and remove unreachable code.\n\n## Install\n\n```\nnpm i @putout/plugin-remove-unreachable-code\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"remove-unreachable-code\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nfunction hi() {\n    return 'world';\n    console.log('hello');\n}\n\nfunction log() {\n    throw Error('error');\n    \n    console.log('hello');\n}\n```\n\n## ✅ Example of correct code\n\n```js\nfunction hi() {\n    return 'world';\n}\n\nfunction log() {\n    throw Error('error');\n}\n```\n\n## License\n\nMIT\n","publish_time":1737841894826,"_cnpm_publish_time":1737841894826,"dist-tags":{"latest":"3.0.0"}}