{"name":"@putout/plugin-remove-useless-type-conversion","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 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.0","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-ZIcfosOKDm/RnMvXmG7Sp5eZ+D7f99kJ6fPZAovnfdFtGpkKZitvzn9mBW7HcBPtLHTDqTm3/4pL2F37HBL2/g==","shasum":"3347a69e24cf0f04bd8df710f6ec7e8b88adc483","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-type-conversion/download/@putout/plugin-remove-useless-type-conversion-1.0.0.tgz","fileCount":5,"unpackedSize":4383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvewLCRA9TVsSAnZWagAAlkMP/jfi8ZRGslX+FBgxg6Mn\nl8r3uGkirHTaBDoU1MUe6i7UTinFZl7Uz2VqdLoGDR2iEibuh6wUbB+XotER\nwQnVbT+hpaGsLT03/fQochP4xSvgEy9PJeRYFtS+qXzWubXmwdbdUZ8prp2z\nbRIElgKx8zdbqPfNvfKn4OrFlEcM2XKyjz3SyLkuvMz4fTL+H1o+eUaQTHn6\nKr17hjz2uE6YHQ5BQesaboY3/SksiGPvnNEtHhE6H8iE9GOzgWFBD/QJb5Wk\n36uaVLnNa+E0e2dFqt7QAb9EjsikzCh/gwjTjF52yUbL/gwrjLsDdrUg6Y3V\nfMzf+CBz3eKEFXByHQOngcGAbEAibKDRI6WK7YjxnRAuerpozK0j1lEw4st9\nrT9s/ZSQOdAQTzQPTWyQE4yBJfLz4evTcxapJoXygFnngBC2+D8CXINoLJqN\n4iLQ4yPs6T1+fE46Bf+jTV0Zdk8Kz1rYkxQHXQ5mBQPeLJgYr7URY80F/+Bk\nPmkwQgvLwu9TmxVqAmp1tjXgVLhjnowZXBZugkUrtRIJOYwLDCEkn2VUFO2Y\nnJq5RNPikDw/4j52P1tVU8xIFgXjntopXw2DejstaD6OeV7G5/ISUaOG8vCp\nNicDdTWh3MP1aonN6xvcKGzGFGAd5TWyPBAjrxbDTzAjORZnh17+sG0eO8We\n2o20\r\n=AvMX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3Gd2Zv9ELdHc2zUXoz4e9E7+XeZTe/kqZR8dMHMfWJQIgGhAPN654xHRiZn0WDbuIv+vEvHFWQlUBxDRQmjSs+/w="}],"size":1977,"noattachment":false,"key":"/@putout/plugin-remove-useless-type-conversion/-/@putout/plugin-remove-useless-type-conversion-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-type-conversion_1.0.0_1623059467042_0.019207055245634264"},"_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":1623059467208,"_cnpm_publish_time":1623059467208,"dist-tags":{"latest":"3.0.1"}}