Bug 1453381 - Enable eslint for Marionette xpcshell tests. r?whimboo draft
authorAndreas Tolfsen <ato@sny.no>
Wed, 11 Apr 2018 20:27:49 +0100
changeset 781600 143a21e9a07731defd41bc51125367d5070dbded
parent 781599 1aadd8092e0688db4899147a3c83566db534b303
child 781601 8eaf72f14afcdcf914727d48626be7be85f91f89
push id106363
push userbmo:ato@sny.no
push dateFri, 13 Apr 2018 09:43:44 +0000
reviewerswhimboo
bugs1453381
milestone61.0a1
Bug 1453381 - Enable eslint for Marionette xpcshell tests. r?whimboo There are currently two exceptions from the normal linting rules that applies to Marionette xpcshell unit tests: - We use camel-casing for our test names. - We have many lines longer than 78 characters. MozReview-Commit-ID: 4MykQujk9lR
.eslintignore
testing/marionette/test/unit/.eslintrc.js
--- a/.eslintignore
+++ b/.eslintignore
@@ -338,17 +338,16 @@ security/nss/**
 # Uses `#filter substitution`
 services/sync/modules/constants.js
 services/sync/services-sync.js
 
 # Servo is imported.
 servo/**
 
 # Remote protocol exclusions
-testing/marionette/test_*.js
 testing/marionette/atom.js
 testing/marionette/legacyaction.js
 testing/marionette/client
 testing/marionette/doc
 testing/marionette/harness
 
 # other testing/ exclusions
 testing/mochitest/**
new file mode 100644
--- /dev/null
+++ b/testing/marionette/test/unit/.eslintrc.js
@@ -0,0 +1,13 @@
+"use strict";
+
+module.exports = {
+  "extends": ["plugin:mozilla/xpcshell-test"],
+  "rules": {
+    "camelcase": "off",
+    "max-len": ["error", 100, {
+      "ignoreStrings": true,
+      "ignoreTemplateLiterals": true,
+      "ignoreUrls": true,
+    }],
+  },
+};