{"name":"@putout/plugin-remove-useless-conditions","version":"1.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to remove useless conditions","homepage":"http://github.com/coderaiser/putout","main":"lib/remove-useless-conditions.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"publishOnly":"madrun publishOnly","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","plugin","putout-plugin","putout-plugin-remove","putout-plugin-remove-useless","conditions","useless"],"devDependencies":{"@putout/eslint-config":"^1.0.2","@putout/test":"^3.0.0","c8":"^7.5.0","eslint":"^7.0.0","eslint-plugin-node":"^11.0.0","madrun":"^8.0.1"},"peerDependencies":{"putout":">=16"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-useless-conditions@1.0.0","_nodeVersion":"15.11.0","_npmVersion":"7.6.0","dist":{"integrity":"sha512-UUAnsvlMRbjhyp9aDIXesQ4d6w6dBvtunb09pWvTGuHr7rdzWsZxPgnaklmOhyNrInIrTFPvwKzJUJpOH3vVsw==","shasum":"ded36b8fa871a29fdbf55491d05cede7e6f442c6","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-conditions/download/@putout/plugin-remove-useless-conditions-1.0.0.tgz","fileCount":4,"unpackedSize":3646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYGtnCRA9TVsSAnZWagAAqnsP/3NqyMdyagxPeyqESOcM\n7R0sa5jAPHfddcOVL1lGccNV9BH9hYrR9X0bug0QGIFimMKOLgedwslIer7f\n3VSBxy85SylAekunXDmdWBonnkVQOTeC94jVKsSfmrT98tIGC4eemPMEAyyu\n0XrJpusATP4H2vMEWgK/lW3TbguiLr3LCG7v2Zo83zAkajz/w3EQ0AFEBmrL\nRlqsmR0Y5PZGEtjK9NBg01LWbVz+B4aatgKXnS7T6EBqWxrImI8JR6u7iwNj\n1mhzwgLZNYKdVC8N7+byOfWPB2m/ECEZJmeRWq0w/CAUIl1YZHh2+M5yleMn\nDd8zVxqDeB3T/9fXnFZ+jfjvO3S3dUG4ll/h5zMOHa27Cl7YMAAKIfWcokfA\n1CMCm3+E4GT6nCqZl1c0/LC3ttCPePUQyewgNohYMq33HxB56JEQn5lt/k9d\nYl6snPe5+MXjG6iQBM/zknCZ00Itgcr+BibNYzboYXCPMugnSS63iCm9sg/x\nmNOWk182f2kHPgmXiEheUhZn3hKAXLkrr0ptdn+z5ugXHemmp0flyZzzWI97\nnSVMzk2xHrUHoyAzuM5lC9TcyxEgrpIfNUDUjwkOXL8coUGTrPRgFxGb4wXd\nLBvEJl7nFIln/9N3rMJmSyAEE7h/QKOSJgECGNG6AgpxPwBSFFJ0zkT5FmOF\n9VsV\r\n=ebya\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGcI+n+GMhCWoySiHo9mzZR+AnERoEvD0bLDiE0E/2v2AiAGABb6+Dk2dufZUgt74JoDeK2f/yWKeH8WQrIlJKhBpw=="}],"size":1758,"noattachment":false,"key":"/@putout/plugin-remove-useless-conditions/-/@putout/plugin-remove-useless-conditions-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","tmp":"tmp/plugin-remove-useless-conditions_1.0.0_1616931687079_0.7903130105982008"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-remove-useless-conditions [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-useless-conditions.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-useless-conditions \"npm\"\n\n> The **if** statement executes a statement if a specified condition is **truthy**. If the condition is **falsy**, another statement can be executed.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to remove useless `conditions`. Merged to [`@putout/plugin-conditions`](https://www.npmjs.com/package/@putout/plugin-conditions).\n\n## Install\n\n```\nnpm i @putout/plugin-remove-useless-conditions\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"remove-useless-conditions/evaluate\": \"on\",\n        \"remove-useless-conditions/simplify\": \"on\"\n    }\n}\n```\n\n### Evaluate\n\n## ❌ Example of incorrect code\n\n```js\nconst a = [];\nconst c = a;\n\nif (a) {\n    console.log(a);\n}\n```\n\n## ✅ Example of correct code\n\n```js\nconst a = [];\nconst c = a;\n\nconsole.log(a);\n```\n\n### Simplify\n\n## ❌ Example of incorrect code\n\n```js\nif (zone?.tooltipCallback) {\n    zone.tooltipCallback(e);\n}\n\nif (a)\n    alert('hello');\nelse\n    alert('hello');\n```\n\n## ✅ Example of correct code\n\n```js\nzone?.tooltipCallback(e);\n\nalert('hello');\n```\n\n## License\n\nMIT\n","publish_time":1616931687267,"_cnpm_publish_time":1616931687267,"dist-tags":{"latest":"3.0.1"}}