Bug 1376128 - Add eslint rules for testing/marionette; r?automatedtester,standard8
The eslint rules are based on the default, non-opinionated eslint rules
used throughout mozilla-central. The testing/marionette eslint rules
are a specialisation of these based on the current coding style used.
These should not be contradictory to the overall JS code style that can
be inferred from the existing code base.
MozReview-Commit-ID: 2rKabgXXnu4
new file mode 100644
--- /dev/null
+++ b/testing/marionette/.eslintrc.js
@@ -0,0 +1,18 @@
+"use strict";
+
+module.exports = {
+ "rules": {
+ "comma-dangle": ["error", "always-multiline"],
+ "indent": ["error", 2, {
+ "SwitchCase": 1,
+ "FunctionExpression": {"body": 1, "parameters": 2},
+ "MemberExpression": 2,
+ }],
+ "max-len": ["error", 78, {
+ "ignoreStrings": true,
+ "ignoreUrls": true,
+ }],
+ "no-new-object": "error",
+ "object-curly-spacing": ["error", "never"],
+ }
+};
deleted file mode 100644
--- a/testing/marionette/marionette.eslintrc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Parent config file for all marionette files.
-module.exports = {
- // All globals made available in the test environment.
- "globals": {
- "ok": false,
- "is": false,
- }
-};