From 6f53045b51ce6170391547d8f4d269a3275ae9f6 Mon Sep 17 00:00:00 2001 From: Ed S Date: Fri, 1 May 2020 15:51:46 +0100 Subject: [PATCH] Document the "correct" way to build an array with values --- docs/rules/no-array-constructor.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/rules/no-array-constructor.md b/docs/rules/no-array-constructor.md index 863f56d0b77..c3f9e9c3b0b 100644 --- a/docs/rules/no-array-constructor.md +++ b/docs/rules/no-array-constructor.md @@ -38,6 +38,12 @@ Array(500) new Array(someOtherArray.length) ``` +```js +/*eslint no-array-constructor: "error"*/ + +[0, 1, 2] +``` + ## When Not To Use It This rule enforces a nearly universal stylistic concern. That being said, this