Bug 1453381 - Enable eslint for Marionette xpcshell tests. r=whimboo
authorAndreas Tolfsen <ato@sny.no>
Wed, 11 Apr 2018 20:27:49 +0100
changeset 458146 4f99f23d5d434270c306702733c18b4bae174065
parent 458145 399edd0e33b576a79db058d139404f3bb2dfe005
child 458147 b624c05942e4b38e7fbb8f50b9edbfd47d2a509e
push id159
push userfmarier@mozilla.com
push dateThu, 19 Apr 2018 00:14:50 +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,
+    }],
+  },
+};