{"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","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-unreachable-code/download/@putout/plugin-remove-unreachable-code-2.1.0.tgz","fileCount":4,"integrity":"sha512-TogkZ/LTnWu+lxgX+qga1Ja9xGo/JgmEvoD55BPQafRpdiOd3PwBL0s0C9fsT97LLIiA8hZ7kAELMq73FzZ3vA==","signatures":[{"sig":"MEUCICTBUpmH08j59TKKddRm6uYdcNkuVuUtfWwCGyo7YqpSAiEA4+3qCtQFmjrjMH6WfMtrqPJqV6i5a1dyyJagIPvdTDo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4938,"size":2270,"noattachment":false,"key":"/@putout/plugin-remove-unreachable-code/-/@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"},"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":1737839809304,"_cnpm_publish_time":1737839809304,"dist-tags":{"latest":"3.0.0"}}