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.
This commit is contained in:
Javi Martín
2019-07-03 15:00:22 +02:00
parent af6a494344
commit 8231096854

View File

@@ -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: