Bug 1385547 - Tighten eslint rules on semicolons and init to undefined. r=automatedtester
authorAndreas Tolfsen <ato@sny.no>
Sat, 29 Jul 2017 10:02:32 +0100
changeset 372078 423b51b215196a7da2b81b74cee28c836597dabc
parent 372077 0ae424f348a38ef1d2f052b49f2822662300c129
child 372079 9360c4975d3652abcae684e4af531fae7eb93789
push id32264
push userkwierso@gmail.com
push dateTue, 01 Aug 2017 00:43:47 +0000
treeherdermozilla-central@44121dbcac6a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester
bugs1385547
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1385547 - Tighten eslint rules on semicolons and init to undefined. r=automatedtester Under testing/marionette, we always use semicolons for consistency and we never initialise scoped variables to undefined becuase it is the default value. We also indent continued call expressions by four characters. Disallowed: let foo = undefined; return foo Allowed: const foo = undefined; let bar; return bar; MozReview-Commit-ID: LgVPMqnFqNk
testing/marionette/.eslintrc.js
--- a/testing/marionette/.eslintrc.js
+++ b/testing/marionette/.eslintrc.js
@@ -1,18 +1,21 @@
 "use strict";
 
 module.exports = {
   "rules": {
     "comma-dangle": ["error", "always-multiline"],
     "indent": ["error", 2, {
-      "SwitchCase": 1,
+      "CallExpression": {"arguments": 2},
       "FunctionExpression": {"body": 1, "parameters": 2},
       "MemberExpression": 2,
+      "SwitchCase": 1,
     }],
     "max-len": ["error", 78, {
       "ignoreStrings": true,
       "ignoreUrls": true,
     }],
     "no-new-object": "error",
+    "no-undef-init": "error",
     "object-curly-spacing": ["error", "never"],
+    "semi": "error",
   }
 };