From 8231096854b982029bdfca4f0894595248c3f4ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 3 Jul 2019 15:00:22 +0200 Subject: [PATCH] Add JavaScript rule to disallow array constructors Using `Array(0, 1, 2)` will *not* create an Array with the elements [0, 1, 2]. This is a mistake I've seen in the past, and the JavaScript community recommends adding this rule. --- .eslintrc.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.yml b/.eslintrc.yml index 0feacde55..339bc88f2 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -37,6 +37,7 @@ rules: max-len: - warn - code: 110 + no-array-constructor: error no-console: error no-multi-spaces: error no-multiple-empty-lines: