{"name":"@putout/plugin-remove-useless-array-constructor","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 Array constructor","homepage":"http://github.com/coderaiser/putout","main":"lib/remove-useless-array-constructor.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","putout-plugin","putout-plugin-remove","putout-plugin-remove-useless","plugin","array","remove","constructor"],"devDependencies":{"@putout/test":"^3.0.0","c8":"^7.5.0","eslint":"^7.0.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^7.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-array-constructor@1.0.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-RYLo+TXSa+JnqfNU2ilI3DHELBWOS6+5CymcuQr4XkM2QT9B00YcvOjdjP2kwSbBTE5S8X5Y2ckp2R595BYTCA==","shasum":"5e11985f6f4c42180c0fe26dac0f5cd44d40e729","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-array-constructor/download/@putout/plugin-remove-useless-array-constructor-1.0.0.tgz","fileCount":4,"unpackedSize":4298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaumcCRA9TVsSAnZWagAAe7gQAJRKTE05v3hs+OkS/jRL\ns3IG1Zjt54LaUP/hJe2xUCZcYjX6j8yVHz7f3CbAQDVcSV3i7bz9Kox5sQr5\nu3xJbvKrsNz/P4e6dj76cIvjQ0wVMqm2SzgnFOnv33MfJH8pvIsw+14wynmf\nshEeXKs4+CPK5o0YagTHHCT/2AjGM2Wb7eVOVUtCFBodL3CaIDf7WfQQxFKb\n7ZqQoFmRhu5nLMB4ppQ5AMHkQY0nIWL+aO2xa6xFdNVI2EzzheX/PozKXd1r\n+gD9BJVKG5TGKnUeh9D9Wh52CUfbfrdXiuob01y/7Oq9OJhGMn7RptcexcSN\nHY5IjPuzSsovE1D5tVBz52A2UnpOvYeLja7ZZFgiGKGFs6Gp8kZLbphcRe1Y\n0ElU3cxwh+QsjTgzY9GBhcdC7krwSffsPILXQwhZmWphwVNtl/A4o5e+o+42\nd/BDv9eellU31/PXL+kSun70FOpVzYPahK9ClwWYZvA0XayapFpvXAuSU4vD\n7nLLDwc9Ac62IRT0Xwvjy/m7r7sNXRF4fNlFqRU6ghs8RGOByPS3GSHEWhL8\nr/2KFZdDYhwdezPY7nlalARgm+4S+p8C24gzdUwzkftDR2E8W1ckgLVH24V/\nyZytvL/RS2Fm4ACs9uXV/Vo00P0d90CUyDQgmPs2gNAcX+Iewjt+ay0oTX3p\nEwTV\r\n=eBCa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1KJPNCuRXFtOmqbt2ArFJl9NUwOwcwk67R1HItQ/3tAIgcPy8MrFaaAJ3f8uLvo+K5MyqqP46Csg7A4rtdkBGG90="}],"size":2020,"noattachment":false,"key":"/@putout/plugin-remove-useless-array-constructor/-/@putout/plugin-remove-useless-array-constructor-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-array-constructor_1.0.0_1617619356150_0.38399370683464906"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-remove-useless-array-constructor [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-useless-array-constructor.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-useless-array-constructor \"npm\"\n\n> TypeScript code must not use the `Array()` constructor, with or without new. It has confusing and contradictory usage.\n>\n> (c) [Google TypeScript Style Guide](https://google.github.io/styleguide/tsguide.html#array-constructor)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin removes useless [Array constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Array).\nIt has a different meaning for one, and couple arguments:\n\n```js\nconst a = new Array(2); // [undefined, undefined]\nconst b = new Array(2, 3); // [2, 3];\n```\n\n## Install\n\n```\nnpm i @putout/plugin-remove-useless-array-constructor -D\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"remove-useless-array-constructor\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nconst a = Array(1, 2, 3);\n```\n\n## ✅ Example of correct code\n\n```js\nconst a = [1, 2, 3];\n```\n\n## Comparison\n\nLinter | Rule | Fix\n--------|-------|------------|\n🐊 **Putout**| [`remove-useless-array-constructor`](https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-array-constructor#readme)| ✅\n⏣ **ESLint** | [`no-array-constructor`](https://eslint.org/docs/rules/no-array-constructor) | ❌\n\n## License\n\nMIT\n","publish_time":1617619356275,"_cnpm_publish_time":1617619356275,"dist-tags":{"latest":"3.0.0"}}