{"_id":"@putout/plugin-remove-unreachable-code","_rev":"4154602","name":"@putout/plugin-remove-unreachable-code","description":"🐊Putout plugin adds ability to find and remove unreachable code","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T20:21:25.000Z","created":"2019-07-08T10:10:19.957Z","3.0.0":"2025-05-28T14:52:42.262Z","2.2.0":"2025-01-27T11:40:11.018Z","2.1.1":"2025-01-25T21:51:34.826Z","2.1.0":"2025-01-25T21:16:49.304Z","2.0.0":"2025-01-14T16:15:13.281Z","1.2.0":"2021-05-15T13:44:27.713Z","1.1.0":"2020-06-01T11:56:03.034Z","1.0.0":"2019-07-08T10:10:19.957Z"},"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":{"3.0.0":{"name":"@putout/plugin-remove-unreachable-code","version":"3.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 unreachable code","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-unreachable-code#readme","main":"lib/remove-unreachable-code.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","unreachable","code"],"devDependencies":{"@putout/eslint-flat":"^3.0.0","@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","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=40"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-unreachable-code@3.0.0","gitHead":"33ea779d8a08aabb9ac4f8a09efcf7fc3148cd7a","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.15.0","_npmVersion":"11.1.0","dist":{"shasum":"048780d8ed1d157c7241851e809e3af4e8a0abab","size":2260,"noattachment":false,"key":"/@putout/plugin-remove-unreachable-code/-/@putout/plugin-remove-unreachable-code-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-unreachable-code/download/@putout/plugin-remove-unreachable-code-3.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-unreachable-code_3.0.0_1748443962097_0.42931194699854003"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-05-28T14:52:42.262Z","publish_time":1748443962262,"_source_registry_name":"default","_cnpm_publish_time":1748443962262},"2.2.0":{"name":"@putout/plugin-remove-unreachable-code","version":"2.2.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 unreachable code","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-unreachable-code#readme","main":"lib/remove-unreachable-code.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","unreachable","code"],"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-remove-unreachable-code@2.2.0","gitHead":"8ece460cdc6dac55a7d5ef3966ff3fef93505d55","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.13.1","_npmVersion":"10.9.0","dist":{"shasum":"28c9c19149ebbbc24d7996c704f3576828c9d3e9","size":2283,"noattachment":false,"key":"/@putout/plugin-remove-unreachable-code/-/@putout/plugin-remove-unreachable-code-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-unreachable-code/download/@putout/plugin-remove-unreachable-code-2.2.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-unreachable-code_2.2.0_1737978010876_0.2777097123665211"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-27T11:40:11.018Z","publish_time":1737978011018,"_source_registry_name":"default","_cnpm_publish_time":1737978011018},"2.1.1":{"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","size":2280,"noattachment":false,"key":"/@putout/plugin-remove-unreachable-code/-/@putout/plugin-remove-unreachable-code-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-unreachable-code/download/@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"},"_cnpmcore_publish_time":"2025-01-25T21:51:34.826Z","publish_time":1737841894826,"_source_registry_name":"default","_cnpm_publish_time":1737841894826},"2.1.0":{"name":"@putout/plugin-remove-unreachable-code","version":"2.1.0","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.0","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":"4d291b4c7301cdde6ae55948c06e0ee4c7fb0ba0","size":2270,"noattachment":false,"key":"/@putout/plugin-remove-unreachable-code/-/@putout/plugin-remove-unreachable-code-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-unreachable-code/download/@putout/plugin-remove-unreachable-code-2.1.0.tgz"},"main":"lib/remove-unreachable-code.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"068a3016ae5663e1236de8221bf4efbcc14cf55d","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.0_1737839809120_0.3276852252324203","host":"s3://npm-registry-packages-npm-production"},"_cnpmcore_publish_time":"2025-01-25T21:16:49.304Z","publish_time":1737839809304,"_source_registry_name":"default","_cnpm_publish_time":1737839809304},"2.0.0":{"name":"@putout/plugin-remove-unreachable-code","version":"2.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 unreachable code","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-unreachable-code#readme","main":"lib/remove-unreachable-code.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","unreachable","code"],"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-remove-unreachable-code@2.0.0","gitHead":"d8a129e63c37036984b7fc38c963596d19f37d14","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.13.0","_npmVersion":"10.9.0","dist":{"shasum":"0048a52b48d1094defc536e05ca01b682ebd3d4a","size":2167,"noattachment":false,"key":"/@putout/plugin-remove-unreachable-code/-/@putout/plugin-remove-unreachable-code-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-unreachable-code/download/@putout/plugin-remove-unreachable-code-2.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-unreachable-code_2.0.0_1736871313078_0.9553021943498001"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-14T16:15:13.281Z","publish_time":1736871313281,"_source_registry_name":"default","_cnpm_publish_time":1736871313281},"1.2.0":{"name":"@putout/plugin-remove-unreachable-code","version":"1.2.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to find and remove unreachable code","homepage":"http://github.com/coderaiser/putout","main":"lib/remove-unreachable-code.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://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","unreachable","code"],"devDependencies":{"@putout/test":"^3.0.0","c8":"^7.5.0","eslint":"^7.0.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^7.0.0","lerna":"^4.0.0","madrun":"^8.0.1","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=4.31"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-unreachable-code@1.2.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"shasum":"dd8c485cbfde4d3179f68e8a9f6055c48f04645e","size":1943,"noattachment":false,"key":"/@putout/plugin-remove-unreachable-code/-/@putout/plugin-remove-unreachable-code-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-unreachable-code/download/@putout/plugin-remove-unreachable-code-1.2.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","tmp":"tmp/plugin-remove-unreachable-code_1.2.0_1621086267566_0.9042177846707924"},"_hasShrinkwrap":false,"publish_time":1621086267713,"_cnpm_publish_time":1621086267713,"_cnpmcore_publish_time":"2021-12-16T21:05:58.137Z"},"1.1.0":{"name":"@putout/plugin-remove-unreachable-code","version":"1.1.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to find and remove unreachable code","homepage":"http://github.com/coderaiser/putout","main":"lib/remove-unreachable-code.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","unreachable","code"],"devDependencies":{"@putout/test":"^2.0.0","coveralls":"^3.0.0","eslint":"^7.0.0-rc.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^4.0.0","lerna":"^3.8.5","madrun":"^6.0.0","nodemon":"^2.0.1","nyc":"^15.0.1"},"peerDependencies":{"putout":">=4.31"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-unreachable-code@1.1.0","_nodeVersion":"14.3.0","_npmVersion":"6.14.4","dist":{"shasum":"f5b32edf970b7840867c1f26948b4e6886aa2b00","size":1945,"noattachment":false,"key":"/@putout/plugin-remove-unreachable-code/-/@putout/plugin-remove-unreachable-code-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-unreachable-code/download/@putout/plugin-remove-unreachable-code-1.1.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-remove-unreachable-code_1.1.0_1591012562940_0.6667937623680109"},"_hasShrinkwrap":false,"publish_time":1591012563034,"_cnpm_publish_time":1591012563034,"_cnpmcore_publish_time":"2021-12-16T21:05:58.382Z"},"1.0.0":{"name":"@putout/plugin-remove-unreachable-code","version":"1.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to find and remove unreachable code","homepage":"http://github.com/coderaiser/putout","main":"lib/remove-unreachable-code.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","unreachable","code"],"devDependencies":{"@putout/test":"^1.0.0","coveralls":"^3.0.0","eslint":"^6.0.0","eslint-plugin-node":"^9.0.0","eslint-plugin-putout":"^1.4.4","lerna":"^3.8.5","madrun":"^2.0.0","nodemon":"^1.14.12","nyc":"^14.0.0","putout":"^4.31.0"},"peerDependencies":{"putout":">=4.31"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-unreachable-code@1.0.0","_nodeVersion":"12.6.0","_npmVersion":"6.10.0","dist":{"shasum":"ee076e8feec411a3f864095da573f5d444cefeba","size":1897,"noattachment":false,"key":"/@putout/plugin-remove-unreachable-code/-/@putout/plugin-remove-unreachable-code-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-unreachable-code/download/@putout/plugin-remove-unreachable-code-1.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-remove-unreachable-code_1.0.0_1562580619835_0.5430800727445575"},"_hasShrinkwrap":false,"publish_time":1562580619957,"_cnpm_publish_time":1562580619957,"_cnpmcore_publish_time":"2021-12-16T21:05:58.602Z"}},"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","_attachments":{},"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-unreachable-code#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}