{"name":"@putout/plugin-remove-useless-array-constructor","version":"3.0.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to remove useless Array constructor","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-array-constructor#readme","main":"lib/remove-useless-array-constructor.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://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/eslint-flat":"^3.0.0","@putout/test":"^13.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^26.0.0","madrun":"^11.0.0"},"peerDependencies":{"putout":">=40"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-useless-array-constructor@3.0.0","gitHead":"39f36157c8ce8b925bba4d2b641eecf02c7f0b1b","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.15.0","_npmVersion":"11.1.0","dist":{"integrity":"sha512-1VBdub12c5M+8+SY8jJe9OEh5pgPusFrzaugPPFl0IEzrYvBf/U6M8a9rQaxFa7szK6wIOM9em6r+CylCUl7KA==","shasum":"524b3b0d72687037a3437f5cf995825ddf6c0c0d","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-array-constructor/download/@putout/plugin-remove-useless-array-constructor-3.0.0.tgz","fileCount":4,"unpackedSize":4846,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDxSvDIjmeKeQNtLvFM+EfSQzemdOfaNIHXFwkKMMcriAiBmKdyYdaBEsLX6GJjDXYqCWNgsMRp1XNHE3kJBlRZApg=="}],"size":2248,"noattachment":false,"key":"/@putout/plugin-remove-useless-array-constructor/-/@putout/plugin-remove-useless-array-constructor-3.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-npm-production","tmp":"tmp/plugin-remove-useless-array-constructor_3.0.0_1747684326687_0.14614866387825276"},"_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":1747684326869,"_cnpm_publish_time":1747684326869,"dist-tags":{"latest":"3.0.0"}}