Bug 1363353 - Rename the .eslintrc files for mobile to .eslintrc.js to match the rest of the tree. r=sebastian
authorMark Banner <standard8@mozilla.com>
Tue, 09 May 2017 13:55:21 +0100
changeset 357233 b5cfae1cc920537df6fb65faaff1fa90cbd0114c
parent 357232 c91db7615094314c661ea7c7e07e8d6497d356c1
child 357234 e3983f525a1f20237018a4a0f896a8f589ffefd9
push id31788
push userkwierso@gmail.com
push dateTue, 09 May 2017 20:48:49 +0000
treeherdermozilla-central@2b6f6881a24a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1363353
milestone55.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 1363353 - Rename the .eslintrc files for mobile to .eslintrc.js to match the rest of the tree. r=sebastian MozReview-Commit-ID: 8XkJGyGkOW8
mobile/android/.eslintrc
mobile/android/.eslintrc.js
mobile/android/chrome/content/.eslintrc
mobile/android/chrome/content/.eslintrc.js
rename from mobile/android/.eslintrc
rename to mobile/android/.eslintrc.js
--- a/mobile/android/.eslintrc
+++ b/mobile/android/.eslintrc.js
@@ -1,115 +1,120 @@
-env:
-    browser: true
+"use strict";
 
-globals:
-    Components: false
+module.exports = {
+  env: {
+    "browser": true
+  },
+  globals: {
+    "Components": false,
 
-    # TODO: Create custom rule for `Cu.import`
-    AddonManager: false
-    AppConstants: false
-    Downloads: false
-    File: false
-    FileUtils: false
-    HelperApps: true # TODO: Can be more specific here.
-    JNI: true # TODO: Can be more specific here.
-    LightweightThemeManager: false
-    Messaging: false
-    Notifications: false
-    OS: false
-    ParentalControls: false
-    PrivateBrowsingUtils: false
-    Prompt: false
-    Services: false
-    SharedPreferences: false
-    strings: false
-    Strings: false
-    Task: false
-    TelemetryStopwatch: false
-    UITelemetry: false
-    UserAgentOverrides: 0
-    XPCOMUtils: false
-    ctypes: false
-    dump: false
-    exports: false
-    importScripts: false
-    module: false
-    require: false
-    uuidgen: false
+    // TODO: Create custom rule for `Cu.import`
+    "AddonManager": false,
+    "AppConstants": false,
+    "Downloads": false,
+    "File": false,
+    "FileUtils": false,
+    "HelperApps": true, // TODO: Can be more specific here.
+    "JNI": true, // TODO: Can be more specific here.
+    "LightweightThemeManager": false,
+    "Messaging": false,
+    "Notifications": false,
+    "OS": false,
+    "ParentalControls": false,
+    "PrivateBrowsingUtils": false,
+    "Prompt": false,
+    "Services": false,
+    "SharedPreferences": false,
+    "strings": false,
+    "Strings": false,
+    "Task": false,
+    "TelemetryStopwatch": false,
+    "UITelemetry": false,
+    "UserAgentOverrides": 0,
+    "XPCOMUtils": false,
+    "ctypes": false,
+    "dump": false,
+    "exports": false,
+    "importScripts": false,
+    "module": false,
+    "require": false,
+    "uuidgen": false,
 
-    Iterator: false # TODO: Remove - deprecated!
-
-rules:
-    global-strict: 0 # Overridden by "strict"
-    no-underscore-dangle: 0 # We allow trailing underscores in names.
+    "Iterator": false // TODO: Remove - deprecated!
+  },
+  rules: {
+    "global-strict": "off", // Overridden by "strict"
+    "no-underscore-dangle": "off", // We allow trailing underscores in names.
 
-    # We disable everything to get all files to pass w/o updating them.
-    # We'll re-enable one by one.
-    camelcase: 0
-    comma-dangle: 0
-    comma-spacing: 0
+    // We disable everything to get all files to pass w/o updating them.
+    // We'll re-enable one by one.
+    "camelcase": "off",
+    "comma-dangle": "off",
+    "comma-spacing": "off",
 
-    # XXX Bug 1358949 - This should be reduced down - probably to 20 or to
-    # be removed & synced with the mozilla/recommended value.
-    complexity: ["error", 31]
+    // XXX Bug 1358949 - This should be reduced down - probably to 20 or to
+    // be removed & synced with the mozilla/recommended value.
+    "complexity": ["error", 31],
 
-    consistent-return: 0
-    curly: 0
-    dot-notation: 0
-    eqeqeq: 0
-    key-spacing: 0
-    new-cap: 0
-    no-caller: 0
-    no-constant-condition: 0
-    no-empty: 0
-    no-extra-bind: 0
-    no-extra-semi: 0
-    no-loop-func: 0
-    no-multi-spaces: 0
-    no-new-object: 0
-    no-octal: 0
-    no-return-assign: 0
-    no-shadow: 0
-    no-trailing-spaces: 0
-    no-unused-vars: 0
-    no-use-before-define: 0
-    quotes: 0 # [2, "double"]
-    semi: 0
-    space-infix-ops: 0
-    space-unary-ops: 0 # 2: https://github.com/eslint/eslint/issues/2764
-    strict: 0
+    "consistent-return": "off",
+    "curly": "off",
+    "dot-notation": "off",
+    "eqeqeq": "off",
+    "key-spacing": "off",
+    "new-cap": "off",
+    "no-caller": "off",
+    "no-constant-condition": "off",
+    "no-empty": "off",
+    "no-extra-bind": "off",
+    "no-extra-semi": "off",
+    "no-loop-func": "off",
+    "no-multi-spaces": "off",
+    "no-new-object": "off",
+    "no-octal": "off",
+    "no-return-assign": "off",
+    "no-shadow": "off",
+    "no-trailing-spaces": "off",
+    "no-unused-vars": "off",
+    "no-use-before-define": "off",
+    "quotes": "off", // [2, "double"]
+    "semi": "off",
+    "space-infix-ops": "off",
+    "space-unary-ops": "off", // 2: https://github.com/eslint/eslint/issues/2764
+    "strict": "off"
+  }
 
-  #"ecmaFeatures": {
-  #  "forOf": true,
-  #  "jsx": true,
-  #},
-  #"rules": {
-  #  // turn off all kinds of stuff that we actually do want, because
-  #  // right now, we're bootstrapping the linting infrastructure.  We'll
-  #  // want to audit these rules, and start turning them on and fixing the
-  #  // problems they find, one at a time.
-
-  #  // Eslint built-in rules are documented at <http://eslint.org/docs/rules/>
-  #  "camelcase": 0,               // TODO: Remove (use default)
-  #  "consistent-return": 0,       // TODO: Remove (use default)
-  #  dot-location: 0,              // [2, property],
-  #  "eqeqeq": 0,                  // TBD. Might need to be separate for content & chrome
-  #  "global-strict": 0,           // Leave as zero (this will be unsupported in eslint 1.0.0)
-  #  "linebreak-style": [2, "unix"],
-  #  "new-cap": 0,                 // TODO: Remove (use default)
-  #  "no-catch-shadow": 0,         // TODO: Remove (use default)
-  #  "no-console": 0,              // Leave as 0. We use console logging in content code.
-  #  "no-empty": 0,                // TODO: Remove (use default)
-  #  "no-extra-bind": 0,           // Leave as 0
-  #  "no-extra-boolean-cast": 0,   // TODO: Remove (use default)
-  #  "no-multi-spaces": 0,         // TBD.
-  #  "no-new": 0,                  // TODO: Remove (use default)
-  #  "no-redeclare": 0,            // TODO: Remove (use default)
-  #  "no-return-assign": 0,        // TODO: Remove (use default)
-  #  "no-underscore-dangle": 0,    // Leave as 0. Commonly used for private variables.
-  #  "no-unneeded-ternary": 2,
-  #  "no-unused-expressions": 0,   // TODO: Remove (use default)
-  #  "no-unused-vars": 0,          // TODO: Remove (use default)
-  #  "no-use-before-define": 0,    // TODO: Remove (use default)
-  #  "quotes": [2, "double", "avoid-escape"],
-  #  "strict": 0,                  // [2, "function"],
-  #}
+  // "ecmaFeatures": {
+  //   "forOf": true,
+  //   "jsx": true,
+  // },
+  // "rules": {
+  //   // turn off all kinds of stuff that we actually do want, because
+  //   // right now, we're bootstrapping the linting infrastructure.  We'll
+  //   // want to audit these rules, and start turning them on and fixing the
+  //   // problems they find, one at a time.
+  //
+  //   // Eslint built-in rules are documented at <http://eslint.org/docs/rules/>
+  //   "camelcase": 0,               // TODO: Remove (use default)
+  //   "consistent-return": 0,       // TODO: Remove (use default)
+  //   dot-location: 0,              // [2, property],
+  //   "eqeqeq": 0,                  // TBD. Might need to be separate for content & chrome
+  //   "global-strict": 0,           // Leave as zero (this will be unsupported in eslint 1.0.0)
+  //   "linebreak-style": [2, "unix"],
+  //   "new-cap": 0,                 // TODO: Remove (use default)
+  //   "no-catch-shadow": 0,         // TODO: Remove (use default)
+  //   "no-console": 0,              // Leave as 0. We use console logging in content code.
+  //   "no-empty": 0,                // TODO: Remove (use default)
+  //   "no-extra-bind": 0,           // Leave as 0
+  //   "no-extra-boolean-cast": 0,   // TODO: Remove (use default)
+  //   "no-multi-spaces": 0,         // TBD.
+  //   "no-new": 0,                  // TODO: Remove (use default)
+  //   "no-redeclare": 0,            // TODO: Remove (use default)
+  //   "no-return-assign": 0,        // TODO: Remove (use default)
+  //   "no-underscore-dangle": 0,    // Leave as 0. Commonly used for private variables.
+  //   "no-unneeded-ternary": 2,
+  //   "no-unused-expressions": 0,   // TODO: Remove (use default)
+  //   "no-unused-vars": 0,          // TODO: Remove (use default)
+  //   "no-use-before-define": 0,    // TODO: Remove (use default)
+  //   "quotes": [2, "double", "avoid-escape"],
+  //   "strict": 0,                  // [2, "function"],
+  // }
+};
rename from mobile/android/chrome/content/.eslintrc
rename to mobile/android/chrome/content/.eslintrc.js
--- a/mobile/android/chrome/content/.eslintrc
+++ b/mobile/android/chrome/content/.eslintrc.js
@@ -1,25 +1,30 @@
-globals:
-    # TODO: Maybe this should be by file
-    BrowserApp: false
-    Cc: false
-    Ci: false
-    Cu: false
-    NativeWindow: false
-    PageActions: false
-    ReaderMode: false
-    SimpleServiceDiscovery: false
-    TabMirror: false
-    MediaPlayerApp: false
-    RokuApp: false
-    SearchEngines: false
-    ConsoleAPI: true
-    Point: false
-    Rect: false
+"use strict";
 
-rules:
-    complexity: ["error", 20]
+module.exports = {
+  "globals": {
+    // TODO: Maybe this should be by file
+    "BrowserApp": false,
+    "Cc": false,
+    "Ci": false,
+    "Cu": false,
+    "NativeWindow": false,
+    "PageActions": false,
+    "ReaderMode": false,
+    "SimpleServiceDiscovery": false,
+    "TabMirror": false,
+    "MediaPlayerApp": false,
+    "RokuApp": false,
+    "SearchEngines": false,
+    "ConsoleAPI": true,
+    "Point": false,
+    "Rect": false,
+  },
+  "rules": {
+    "complexity": ["error", 20],
 
-    # Disabled stuff
-    no-console: 0 # TODO: Can we use console?
-    no-cond-assign: 0
-    no-fallthrough: 0
+    // Disabled stuff
+    "no-console": 0, // TODO: Can we use console?
+    "no-cond-assign": 0,
+    "no-fallthrough": 0,
+  }
+};