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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user