{"name":"@putout/plugin-remove-useless-type-conversion","version":"1.0.1","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to remove useless type conversion","homepage":"http://github.com/coderaiser/putout","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":{"@putout/plugin-remove-double-negations":"^3.0.0"},"keywords":["putout","putout-plugin","putout-plugin-remove","plugin","type-conversion","useless"],"devDependencies":{"@putout/test":"^3.0.0","c8":"^7.5.0","eslint":"^7.0.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^8.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-type-conversion@1.0.1","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-TfyQSmEJ8rJNfZWNd6ZhMJKlz6MWMDeoqit3PlkUc+sAhBaic6weFISGYNQbM1wDcCLeFdiClijNiizAT/h3Xg==","shasum":"f1bff254242fe97fb449746f27cfb8d6826aa737","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-type-conversion/download/@putout/plugin-remove-useless-type-conversion-1.0.1.tgz","fileCount":5,"unpackedSize":4423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvg8YCRA9TVsSAnZWagAAOZoQAIj/xzHQrheMroi81r9a\niAPmHGQCVTxQPrkWrTby/JxsJ8X+/vE8bAVNbqcRtgyMGgPcIFsJtTk8JFsI\nTvTW7iY+b/lO6QVk4UuO+bMXQTwZqWKEcQk7xnfTVn1zLT94PoRjy0Li+M+z\n27fvjbI4WPmN4BqdRIBjRe70arq5bV7nMB9s6wFbx36bJoyKTdCxmIHrox8Z\n8UXucR2IEv2mvTABZ7bzlypcQvLJN1WcpxbAs6BPGxg3t0Oixx5HFTJu+lBu\nv/BeruvvNsxaGtIW05cFhik0SajHs8nJFcoeyYTZiv5ZdHztYIaO3pWV+1gh\n729YUnL0W43klf+gMOlxAefAuQ6dorRoGbtLGOOP4aI4xAGznzOwCBFMEhMF\nFIh3/RRt1xkpCs24DhgtJdHqA+EhLsC82p6kGTqnkRtinaPTyoL9yzUVp4cW\n9javkigSTc8qVCK6acWmFPYo6PeTOc1F42JO+iKhdzEJiSvFTXGJ5qaVyYDr\ne2gqtpdJWxME2ROXAXCRGbZw506MrOHamlAqBc5bNfpYlLOZI7QE8cwjWuZb\nJDp+357qZJ0slna57RWtMGl7SkdZCf+kpk3J23ozqO8RP7pR1ikn/nicn0pS\nvcjLQY3+ziS3+BMFxylTZQq362Zmo5yxivggg5lDYBdUUpoZivl+8YYb1yxu\nKYOM\r\n=gyH1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGNHDqXTlBWR8e6TOHYmsiScFDSiSddeeSoaWTFskhdsAiEAz8zfp03MBSTun20RGfWtxrI5bpT2bjLDg/1bac5Omg4="}],"size":1977,"noattachment":false,"key":"/@putout/plugin-remove-useless-type-conversion/-/@putout/plugin-remove-useless-type-conversion-1.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-type-conversion_1.0.1_1623068440431_0.2050820308075707"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-remove-useless-type-conversion [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-useless-type-conversion.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-useless-type-conversion \"npm\"\n\n> It is possible to use a couple of **NOT** operators (`!!`) in series to explicitly force the conversion of any value to the corresponding boolean primitive. The conversion is based on the \"truthyness\" or \"falsyness\" of the value.\n>\n> The same conversion can be done through the `Boolean` function.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_NOT)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to remove useless type conversion. Merged to [`@putout/plugin-types`](https://www.npmjs.com/package/@putout/plugin-types).\n\n## Install\n\n```\nnpm i @putout/plugin-remove-useless-type-conversion\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"remove-useless-type-conversion/named\": \"on\",\n        \"remove-useless-type-conversion/with-double-negations\": \"on\"\n    }\n}\n```\n\n## named\n\n### ❌ Example of incorrect code\n\n```js\nconst a = !![1].includes(1);\nconst b = Boolean([1].includes(1));\n```\n\n### ✅ Example of correct code\n\n```js\nconst a = [1].includes(1);\n```\n\n## with-double-negations\n\n### ❌ Example of incorrect code\n\n```js\nif (!!a) {\n    console.log('hi');\n}\n```\n\n### ✅ Example of correct code\n\n```js\nif (a) {\n    console.log('hi');\n}\n```\n\n## Comparison\n\nLinter | Rule | Fix\n--------|-------|------------|\n🐊 **Putout** | [`remove-useless-type-conversion`](https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-type-conversion#readme)| ✅\n⏣ **ESLint** | [`no-implicit-coercion`](https://eslint.org/docs/rules/no-implicit-coercion) | ✅\n\n## License\n\nMIT\n","publish_time":1623068440533,"_cnpm_publish_time":1623068440533,"dist-tags":{"latest":"3.0.1"}}