{"name":"@putout/plugin-remove-useless-array-constructor","version":"1.1.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.1.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-WBLzp29qDq24BXDZ51j4846M02aOq7DVcP8uIawbIoN7zo0ZzMUh445/JjNE82YZIZcKksr/OkKXLOhnaxKMPg==","shasum":"01e35e2fd69695d9d9b2481298097d49d91ef99f","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-array-constructor/download/@putout/plugin-remove-useless-array-constructor-1.1.0.tgz","fileCount":4,"unpackedSize":4323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga1ePCRA9TVsSAnZWagAAGqQP/0jtgp8SjM2hCI2D22Ar\n2y+8SeZMlYHm++owFHjdSs2Wr1kaJJaP41SK1Pa2uAs6VlxnTf5iQ1MsnTQ1\nSR8S1OFd00ilyX72hPzQKGup6oJ2rGW2FgMe74iiUQDAWXcZPmMG76VOEgIk\n5jy5Z0LEkgmsrVZlgGhPCSphMJTig7vCVeShw4aLiIdrSJrw3Cm2fsnLWeVg\nmnC3A9RJ/CwXiIpvJWJnNKM2VVu9Q9kqurxyzxVWNhaODGYtoxUf+jTpHH7U\n/x5HLtSsuIpcIV85K2S8wz1jGj+nUE+sUW2gbqqUKQHOv16rEcN7RKOVVWsI\ni90aiNWDYd44DeDK0jqkWBo9ajUh6vLRHa4Ovddbsb9KvFquEZ6H5gmipbEN\nVdNXtTGPuSm4MUzzvwEcqi0XLjxV+gtkCPcnTVYIBrRYx4ZIzdZXbUSxpp1G\nY6U9pEkazIO5rXCH4TjVAEgHsrGwEiyZDI79pRMGewf+jeRbfpXIYBxkxlnF\nLgz6mO5joFXsOYEEk+6CZF3TJtbHXlgudrz++uoKVG94i8OW9yVP3CMx/k+u\neLDW2wTfOp8ZwHhAZ/ZGBBt7nQ4x2RFCHMU1IVnYt8Di1o1sRgeABIrj3OIX\nO8RjLg40rlF7xFSY8kH1QMu/HhPq0Eoh+PJM1YcOTUp4TTdQWoRvZRG//LBX\nbaAn\r\n=nyK0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2+Kk429ZIoSIHvvAFSPynz73ogUvrLdtuBKUA/WKg9AiEApNMKpvZB4aSb2cbZPCg+QfMFNr558Rmi4993DFyKXj8="}],"size":2027,"noattachment":false,"key":"/@putout/plugin-remove-useless-array-constructor/-/@putout/plugin-remove-useless-array-constructor-1.1.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.1.0_1617647502744_0.830299881270506"},"_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":1617647502966,"_cnpm_publish_time":1617647502966,"dist-tags":{"latest":"3.0.0"}}