{"name":"@putout/plugin-remove-useless-conditions","version":"3.0.1","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to remove useless conditions","homepage":"https://github.com/coderaiser/putout/tree/v28.19.2/packages/plugin-remove-useless-conditions#readme","main":"lib/index.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/test":"^6.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-n":"^15.2.4","madrun":"^9.0.0"},"peerDependencies":{"putout":">=28"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"b799c0a5d9937e6bb84e932aeea81be99dddeaa4","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-remove-useless-conditions@3.0.1","_nodeVersion":"18.15.0","_npmVersion":"9.1.3","dist":{"integrity":"sha512-rBJDCJ7aIoZn746PzHj90BI2vFk+Ngc+nbhnKqEw6y0atXBKWS98U+JyV+EaQ9xOwrGjgFuFLVh5UkDhOCCslA==","shasum":"19ef8a07a2c987942a1c23d3f86ab11e8fdca386","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-conditions/download/@putout/plugin-remove-useless-conditions-3.0.1.tgz","fileCount":6,"unpackedSize":4865,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIARXINv+9W7jaBnqWuon/nqvTHfdduDUFEJyze4a+S2uAiAleh3it9ptUJZEhXWG8Gqv9wHOyKfiahT4eCBYsW04fg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDHORACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTTw//Y7s2wEpVof/wjJ7R7SJcp4TMjDRpTyPltvQrPw1OTTm5Ltr5\r\n6cevnMn1MZLdBidqtHic6kdp9ceFqpNLm0x6aLyxovqhPb+n1hIU0mu7jTSt\r\nQwC002QHwsGCJD3GOC0qlL0gTiMixoCA83Sw8irzsha+ejpQoqU3qSmfaemY\r\nnf+GCcUYcuuw0CDF84BjU/4x20xVSnaooQyFIXq6GtKHU9L5A3jOPrqjstPl\r\nlHlPEGz86Lu6ghuuN5EZwGRur07o63P6EhYCokREqPCSPC52YozBvqkRkyHK\r\ngST/3qWJdKyWUzIj/QaEXzgrKmEoG+km8z5WqVOP6MsalXiHzBYT77pgemB1\r\n3Pp4PeyKSpbQ/AGn5DgL0e1XL7mVRySELkc6JvGuUJPf9Qmsberjo6lUd0sf\r\nhWwt1b0Gih4uaTTN8meFW9om35vDWh9ftfHzAo7dbvTd6kEwU0YeFpyjzKah\r\n5EueH574k/XwcBfCaxTWErYA4lQ2yrWzZ0SvhaZL2TA0GcxVU3YvMXxTlhzp\r\n84OwjhH9OeVfyHM3AbA9lBuWrrqxgX0Lj+DNDiiidoZVngmdkJHdgCTu1H97\r\nXMqFN2SzUSAQV28IfOpBlLr63mb1tVWBe9BDLkkMd1IzmxtjRevCP+nmblev\r\nCftOkmxJLXRf17zYxTKEo7ZawQTG6Y738A4=\r\n=fRRs\r\n-----END PGP SIGNATURE-----\r\n","size":2228,"noattachment":false,"key":"/@putout/plugin-remove-useless-conditions/-/@putout/plugin-remove-useless-conditions-3.0.1.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_3.0.1_1678537617382_0.9653961174651988"},"_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":1678537617577,"_cnpm_publish_time":1678537617577,"dist-tags":{"latest":"3.0.1"}}