Bug 1301287 - Password manager: enable eslint no-array-constructor rule. r=johannh draft
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Wed, 07 Sep 2016 21:40:02 -0700
changeset 411461 228b64c2213f46a278d035b35a939c57b926e0be
parent 411460 cdd7faea0b5d9fa67618ff5e6e84d2bb372ddbe8
child 530735 61adf476e6de7f22bdd938f0f4230e978f253e6c
push id28900
push usermozilla@noorenberghe.ca
push dateThu, 08 Sep 2016 04:51:12 +0000
reviewersjohannh
bugs1301287
milestone51.0a1
Bug 1301287 - Password manager: enable eslint no-array-constructor rule. r=johannh MozReview-Commit-ID: 61PSYdgzDz2
toolkit/components/passwordmgr/.eslintrc
--- a/toolkit/components/passwordmgr/.eslintrc
+++ b/toolkit/components/passwordmgr/.eslintrc
@@ -8,16 +8,19 @@
     "brace-style": [2, "1tbs", {"allowSingleLine": true}],
 
     // No space before always a space after a comma
     "comma-spacing": [2, {"before": false, "after": true}],
 
     // Commas at the end of the line not the start
     "comma-style": 2,
 
+    // Use [] instead of Array()
+    "no-array-constructor": 2,
+
     // Use {} instead of new Object()
     "no-new-object": 2,
 
     // No using undeclared variables
     "no-undef": 2,
 
     // Don't allow unused local variables unless they match the pattern
     "no-unused-vars": [2, {"args": "none", "vars": "local", "varsIgnorePattern": "^(ids|ignored|unused)$"}],