Bug 1310003 - Rename and lint deprecated .eslintrc files. r=MakeMyDay
authoreslint <eslint@bugzilla.kewis.ch>
Thu, 13 Oct 2016 22:43:16 +0200
changeset 27411 b0d4176aaa7a033ce5e725a922a0d9159728c7d4
parent 27410 6a0ffd3c4376fc2e852427f137537b526d778a26
child 27412 8166f30a47b0f4cf32f63ad7d875d638ae2305cc
push id357
push userclokep@gmail.com
push dateTue, 07 Mar 2017 13:50:14 +0000
reviewersMakeMyDay
bugs1310003
Bug 1310003 - Rename and lint deprecated .eslintrc files. r=MakeMyDay MozReview-Commit-ID: CXzogLQ0gY0
.eslintignore
.eslintrc
.eslintrc.js
calendar/.eslintrc
calendar/.eslintrc.js
calendar/test/mozmill/.eslintrc
calendar/test/mozmill/.eslintrc.js
calendar/test/unit/.eslintrc
calendar/test/unit/.eslintrc.js
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,11 +1,14 @@
 # Always ignore node_modules.
 **/node_modules/**/*.*
 
+# lint eslint config files which are excluded by default
+!**/.eslintrc.js
+
 # Exclude expected objdirs.
 obj*/**
 
 # Exclude mozilla directory, this one is checked separately
 mozilla/**
 
 # These directories don't contain any js and are not meant to
 config/**
rename from .eslintrc
rename to .eslintrc.js
--- a/.eslintrc
+++ b/.eslintrc.js
@@ -1,12 +1,14 @@
-{
+"use strict";
+
+module.exports = {
   // When adding items to this file please check for effects on sub-directories.
   "plugins": [
     "mozilla"
   ],
   "rules": {
     "mozilla/import-globals": 1,
   },
   "env": {
     "es6": true
   },
-}
+};
rename from calendar/.eslintrc
rename to calendar/.eslintrc.js
--- a/calendar/.eslintrc
+++ b/calendar/.eslintrc.js
@@ -1,472 +1,474 @@
-{
-  "extends": [
-    "../mozilla/toolkit/.eslintrc"
-  ],
-  "rules": {
-    // Enforce one true brace style (opening brace on the same line)
-    // Allow single line (for now) because of the vast number of changes needed
-    "brace-style": [2, "1tbs", {"allowSingleLine": true}],
+"use strict";
 
-    // Enforce newline at the end of file, with no multiple empty lines.
-    "eol-last": 2,
+module.exports = {
+    "extends": [
+        "../mozilla/toolkit/.eslintrc"
+    ],
+    "rules": {
+        // Enforce one true brace style (opening brace on the same line)
+        // Allow single line (for now) because of the vast number of changes needed
+        "brace-style": [2, "1tbs", { allowSingleLine: true }],
 
-    // Disallow using variables outside the blocks they are defined
-    "block-scoped-var": 2,
+        // Enforce newline at the end of file, with no multiple empty lines.
+        "eol-last": 2,
 
-    // Allow trailing commas for easy list extension.  Having them does not
-    // impair readability, but also not required either.
-    "comma-dangle": 0,
+        // Disallow using variables outside the blocks they are defined
+        "block-scoped-var": 2,
 
-    // Enforce spacing before and after comma
-    "comma-spacing": [2, {"before": false, "after": true}],
+        // Allow trailing commas for easy list extension.  Having them does not
+        // impair readability, but also not required either.
+        "comma-dangle": 0,
 
-    // Enforce one true comma style.
-    "comma-style": [2, "last"],
+        // Enforce spacing before and after comma
+        "comma-spacing": [2, { before: false, after: true }],
 
-    // Enforce curly brace conventions for all control statements.
-    "curly": 2,
+        // Enforce one true comma style.
+        "comma-style": [2, "last"],
 
-    // Enforce the spacing around the * in generator functions.
-    "generator-star-spacing": [2, "after"],
+        // Enforce curly brace conventions for all control statements.
+        "curly": 2,
 
-    // Require space before/after arrow function's arrow
-    "arrow-spacing": [2, { "before": true, "after": true }],
+        // Enforce the spacing around the * in generator functions.
+        "generator-star-spacing": [2, "after"],
 
-    // Enforces spacing between keys and values in object literal properties.
-    "key-spacing": [2, {"beforeColon": false, "afterColon": true, "mode": "minimum"}],
+        // Require space before/after arrow function's arrow
+        "arrow-spacing": [2, { before: true, after: true }],
 
-    // Disallow the omission of parentheses when invoking a constructor with no
-    // arguments.
-    "new-parens": 2,
+        // Enforces spacing between keys and values in object literal properties.
+        "key-spacing": [2, { beforeColon: false, afterColon: true, mode: "minimum" }],
 
-    // Disallow use of the Array constructor.
-    "no-array-constructor": 2,
+        // Disallow the omission of parentheses when invoking a constructor with no
+        // arguments.
+        "new-parens": 2,
 
-    // disallow use of the Object constructor
-    "no-new-object": 2,
+        // Disallow use of the Array constructor.
+        "no-array-constructor": 2,
 
-    // Disallow Primitive Wrapper Instances
-    "no-new-wrappers": 2,
+        // disallow use of the Object constructor
+        "no-new-object": 2,
 
-    // Disallow the catch clause parameter name being the same as a variable in
-    // the outer scope, to avoid confusion.
-    "no-catch-shadow": 2,
+        // Disallow Primitive Wrapper Instances
+        "no-new-wrappers": 2,
 
-    // Disallow assignment in conditional expressions.
-    "no-cond-assign": 2,
+        // Disallow the catch clause parameter name being the same as a variable in
+        // the outer scope, to avoid confusion.
+        "no-catch-shadow": 2,
 
-    // Disallow use of debugger.
-    "no-debugger": 2,
+        // Disallow assignment in conditional expressions.
+        "no-cond-assign": 2,
 
-    // Disallow deletion of variables (deleting properties is fine).
-    "no-delete-var": 2,
+        // Disallow use of debugger.
+        "no-debugger": 2,
 
-    // Disallow duplicate arguments in functions.
-    "no-dupe-args": 2,
+        // Disallow deletion of variables (deleting properties is fine).
+        "no-delete-var": 2,
 
-    // Disallow duplicate keys when creating object literals.
-    "no-dupe-keys": 2,
+        // Disallow duplicate arguments in functions.
+        "no-dupe-args": 2,
 
-    // Disallow a duplicate case label.
-    "no-duplicate-case": 2,
+        // Disallow duplicate keys when creating object literals.
+        "no-dupe-keys": 2,
 
-    // Disallow the use of empty character classes in regular expressions.
-    "no-empty-character-class": 2,
+        // Disallow a duplicate case label.
+        "no-duplicate-case": 2,
 
-    // Disallow assigning to the exception in a catch block.
-    "no-ex-assign": 2,
+        // Disallow the use of empty character classes in regular expressions.
+        "no-empty-character-class": 2,
 
-    // Disallow adding to native types
-    "no-extend-native": 2,
+        // Disallow assigning to the exception in a catch block.
+        "no-ex-assign": 2,
 
-    // Disallow double-negation boolean casts in a boolean context.
-    "no-extra-boolean-cast": 2,
+        // Disallow adding to native types
+        "no-extend-native": 2,
 
-    // Disallow unnecessary semicolons.
-    "no-extra-semi": 2,
+        // Disallow double-negation boolean casts in a boolean context.
+        "no-extra-boolean-cast": 2,
 
-    // Disallow mixed spaces and tabs for indentation.
-    "no-mixed-spaces-and-tabs": 2,
+        // Disallow unnecessary semicolons.
+        "no-extra-semi": 2,
 
-    // Disallow reassignments of native objects.
-    "no-native-reassign": 2,
+        // Disallow mixed spaces and tabs for indentation.
+        "no-mixed-spaces-and-tabs": 2,
 
-    // Disallow nested ternary expressions, they make the code hard to read.
-    "no-nested-ternary": 2,
+        // Disallow reassignments of native objects.
+        "no-native-reassign": 2,
 
-    // Disallow use of octal literals.
-    "no-octal": 2,
+        // Disallow nested ternary expressions, they make the code hard to read.
+        "no-nested-ternary": 2,
 
-    // Disallow comparisons where both sides are exactly the same.
-    "no-self-compare": 2,
+        // Disallow use of octal literals.
+        "no-octal": 2,
 
-    // Disallow sparse arrays, eg. let arr = [,,2].
-    // Array destructuring is fine though:
-    // for (let [, breakpointPromise] of aPromises)
-    "no-sparse-arrays": 2,
+        // Disallow comparisons where both sides are exactly the same.
+        "no-self-compare": 2,
 
-    // Disallow trailing whitespace at the end of lines.
-    "no-trailing-spaces": 2,
+        // Disallow sparse arrays, eg. let arr = [,,2].
+        // Array destructuring is fine though:
+        // for (let [, breakpointPromise] of aPromises)
+        "no-sparse-arrays": 2,
 
-    // Disallow use of the with statement.
-    "no-with": 2,
+        // Disallow trailing whitespace at the end of lines.
+        "no-trailing-spaces": 2,
 
-    // Disallow comparisons with the value NaN.
-    "use-isnan": 2,
+        // Disallow use of the with statement.
+        "no-with": 2,
 
-    // Ensure that the results of typeof are compared against a valid string.
-    "valid-typeof": 2,
+        // Disallow comparisons with the value NaN.
+        "use-isnan": 2,
 
-    // disallow the use of object properties of the global object (Math and
-    // JSON) as functions
-    "no-obj-calls": 2,
+        // Ensure that the results of typeof are compared against a valid string.
+        "valid-typeof": 2,
 
-    // disallow use of octal escape sequences in string literals, such as
-    // var foo = "Copyright \251";
-    "no-octal-escape": 2,
+        // disallow the use of object properties of the global object (Math and
+        // JSON) as functions
+        "no-obj-calls": 2,
 
-    // disallow use of void operator
-    "no-void": 2,
+        // disallow use of octal escape sequences in string literals, such as
+        // var foo = "Copyright \251";
+        "no-octal-escape": 2,
 
-    // Disallow Yoda conditions (where literal value comes first).
-    "yoda": 2,
+        // disallow use of void operator
+        "no-void": 2,
 
-    // Require a space immediately following the // in a line comment.
-    "spaced-comment": [2, "always"],
+        // Disallow Yoda conditions (where literal value comes first).
+        "yoda": 2,
 
-    // Require use of the second argument for parseInt().
-    "radix": 2,
+        // Require a space immediately following the // in a line comment.
+        "spaced-comment": [2, "always"],
 
-    // Require spaces before/after unary operators (words on by default,
-    // nonwords off by default).
-    "space-unary-ops": [2, { "words": true, "nonwords": false }],
+        // Require use of the second argument for parseInt().
+        "radix": 2,
 
-    // Enforce spacing after semicolons.
-    "semi-spacing": [2, {"before": false, "after": true}],
+        // Require spaces before/after unary operators (words on by default,
+        // nonwords off by default).
+        "space-unary-ops": [2, { words: true, nonwords: false }],
 
-    // Disallow the use of Boolean literals in conditional expressions.
-    "no-unneeded-ternary": 2,
+        // Enforce spacing after semicolons.
+        "semi-spacing": [2, { before: false, after: true }],
 
-    // Disallow use of multiple spaces (sometimes used to align const values,
-    // array or object items, etc.). It's hard to maintain and doesn't add that
-    // much benefit.
-    "no-multi-spaces": 2,
+        // Disallow the use of Boolean literals in conditional expressions.
+        "no-unneeded-ternary": 2,
 
-    // Require spaces around operators, except for a|0.
-    // Disabled for now given eslint doesn't support default args yet
-    // "space-infix-ops": [2, {"int32Hint": true}],
+        // Disallow use of multiple spaces (sometimes used to align const values,
+        // array or object items, etc.). It's hard to maintain and doesn't add that
+        // much benefit.
+        "no-multi-spaces": 2,
 
-    // Require a space around all keywords.
-    "keyword-spacing": 2,
+        // Require spaces around operators, except for a|0.
+        // Disabled for now given eslint doesn't support default args yet
+        // "space-infix-ops": [2, { "int32Hint": true }],
 
-    // Disallow space between function identifier and application.
-    "no-spaced-func": 2,
+        // Require a space around all keywords.
+        "keyword-spacing": 2,
 
-    // Disallow shadowing of names such as arguments.
-    "no-shadow-restricted-names": 2,
+        // Disallow space between function identifier and application.
+        "no-spaced-func": 2,
 
-    // Disallow use of comma operator.
-    "no-sequences": 2,
+        // Disallow shadowing of names such as arguments.
+        "no-shadow-restricted-names": 2,
 
-    // Disallow use of assignment in return statement. It is preferable for a
-    // single line of code to have only one easily predictable effect.
-    "no-return-assign": 2,
+        // Disallow use of comma operator.
+        "no-sequences": 2,
 
-    // Require return statements to either always or never specify values
-    "consistent-return": 2,
-
-    // Disallow padding within blocks.
-    "padded-blocks": [2, "never"],
+        // Disallow use of assignment in return statement. It is preferable for a
+        // single line of code to have only one easily predictable effect.
+        "no-return-assign": 2,
 
-    // Disallow spaces inside parentheses.
-    "space-in-parens": [2, "never"],
+        // Require return statements to either always or never specify values
+        "consistent-return": 2,
 
-    // Require space after keyword for anonymous functions, but disallow space
-    // after name of named functions.
-    "space-before-function-paren": [2, {"anonymous": "never", "named": "never"}],
+        // Disallow padding within blocks.
+        "padded-blocks": [2, "never"],
+
+        // Disallow spaces inside parentheses.
+        "space-in-parens": [2, "never"],
 
-    // Disallow unreachable statements after a return, throw, continue, or break
-    // statement.
-    "no-unreachable": 2,
+        // Require space after keyword for anonymous functions, but disallow space
+        // after name of named functions.
+        "space-before-function-paren": [2, { anonymous: "never", named: "never" }],
 
-    // Always require use of semicolons wherever they are valid.
-    "semi": [2, "always"],
+        // Disallow unreachable statements after a return, throw, continue, or break
+        // statement.
+        "no-unreachable": 2,
 
-    // Disallow empty statements. This will report an error for:
-    // try { something(); } catch (e) {}
-    // but will not report it for:
-    // try { something(); } catch (e) { /* Silencing the error because ...*/ }
-    // which is a valid use case.
-    "no-empty": 2,
+        // Always require use of semicolons wherever they are valid.
+        "semi": [2, "always"],
 
-    // Disallow declaring the same variable more than once (we use let anyway).
-    "no-redeclare": 2,
+        // Disallow empty statements. This will report an error for:
+        // try { something(); } catch (e) {}
+        // but will not report it for:
+        // try { something(); } catch (e) { /* Silencing the error because ...*/ }
+        // which is a valid use case.
+        "no-empty": 2,
 
-    // Warn about declaration of variables already declared in the outer scope.
-    // This isn't an error because it sometimes is useful to use the same name
-    // in a small helper function rather than having to come up with another
-    // random name.  Still, making this a warning can help people avoid being
-    // confused.
-    "no-shadow": 2,
+        // Disallow declaring the same variable more than once (we use let anyway).
+        "no-redeclare": 2,
 
-    // We use var-only-at-top-level instead of no-var as we allow top level
-    // vars.
-    "no-var": 0,
-    "mozilla/var-only-at-top-level": 1,
+        // Warn about declaration of variables already declared in the outer scope.
+        // This isn't an error because it sometimes is useful to use the same name
+        // in a small helper function rather than having to come up with another
+        // random name.  Still, making this a warning can help people avoid being
+        // confused.
+        "no-shadow": 2,
 
-    // Disallow global and local variables that aren't used, but allow unused function arguments.
-    "no-unused-vars": [2, {"vars": "all", "args": "none", "varsIgnorePattern": "EXPORTED_SYMBOLS"}],
+        // We use var-only-at-top-level instead of no-var as we allow top level
+        // vars.
+        "no-var": 0,
+        "mozilla/var-only-at-top-level": 1,
 
-    "mozilla/mark-test-function-used": 1,
+        // Disallow global and local variables that aren't used, but allow unused function arguments.
+        "no-unused-vars": [2, { vars: "all", args: "none", varsIgnorePattern: "EXPORTED_SYMBOLS" }],
 
-    // Require padding inside curly braces
-    "object-curly-spacing": [2, "always"],
+        "mozilla/mark-test-function-used": 1,
 
-    // Disallow spaces inside of brackets
-    "array-bracket-spacing": [2, "never"],
+        // Require padding inside curly braces
+        "object-curly-spacing": [2, "always"],
 
-    // Disallow control characters in regular expressions
-    "no-control-regex": 2,
+        // Disallow spaces inside of brackets
+        "array-bracket-spacing": [2, "never"],
 
-    // Disallow invalid regular expression strings in RegExp constructors
-    "no-invalid-regexp": 2,
+        // Disallow control characters in regular expressions
+        "no-control-regex": 2,
 
-    // Disallow multiple spaces in regular expression literals
-    "no-regex-spaces": 2,
+        // Disallow invalid regular expression strings in RegExp constructors
+        "no-invalid-regexp": 2,
 
-    // Disallow irregular whitespace
-    "no-irregular-whitespace": 2,
+        // Disallow multiple spaces in regular expression literals
+        "no-regex-spaces": 2,
 
-    // Disallow negating the left operand in `in` expressions
-    "no-negated-in-lhs": 2,
+        // Disallow irregular whitespace
+        "no-irregular-whitespace": 2,
 
-    // Allow constant expressions in conditions
-    // With 2.11.0 we can enable this with checkLoops: false
-    "no-constant-condition": [2, {"checkLoops": false}],
+        // Disallow negating the left operand in `in` expressions
+        "no-negated-in-lhs": 2,
 
-    // Disallow Regexs That Look Like Division
-    "no-div-regex": 2,
+        // Allow constant expressions in conditions
+        // With 2.11.0 we can enable this with checkLoops: false
+        "no-constant-condition": [2, { checkLoops: false }],
 
-    // Disallow Iterator (using __iterator__)
-    "no-iterator": 2,
+        // Disallow Regexs That Look Like Division
+        "no-div-regex": 2,
 
-    // Enforce consistent linebreak style
-    "linebreak-style": [2, "unix"],
+        // Disallow Iterator (using __iterator__)
+        "no-iterator": 2,
 
-    // Enforces return statements in callbacks of array's methods
-    "array-callback-return": 2,
+        // Enforce consistent linebreak style
+        "linebreak-style": [2, "unix"],
 
-    // Verify super() calls in constructors
-    "constructor-super": 2,
+        // Enforces return statements in callbacks of array's methods
+        "array-callback-return": 2,
 
-    // Disallow modifying variables of class declarations
-    "no-class-assign": 2,
+        // Verify super() calls in constructors
+        "constructor-super": 2,
 
-    // Disallow modifying variables that are declared using const
-    "no-const-assign": 2,
+        // Disallow modifying variables of class declarations
+        "no-class-assign": 2,
 
-    // Disallow duplicate name in class members
-    "no-dupe-class-members": 2,
+        // Disallow modifying variables that are declared using const
+        "no-const-assign": 2,
 
-    // Disallow use of this/super before calling super() in constructors
-    "no-this-before-super": 2,
+        // Disallow duplicate name in class members
+        "no-dupe-class-members": 2,
 
-    // Disallow duplicate imports
-    "no-duplicate-imports": 2,
+        // Disallow use of this/super before calling super() in constructors
+        "no-this-before-super": 2,
 
-    // Disallow empty destructuring patterns
-    "no-empty-pattern": 2,
+        // Disallow duplicate imports
+        "no-duplicate-imports": 2,
 
-    // Disallow Labeled Statements
-    "no-labels": 2,
+        // Disallow empty destructuring patterns
+        "no-empty-pattern": 2,
 
-    // Disallow Multiline Strings
-    "no-multi-str": 2,
+        // Disallow Labeled Statements
+        "no-labels": 2,
 
-    // Disallow Symbol Constructor
-    "no-new-symbol": 2,
+        // Disallow Multiline Strings
+        "no-multi-str": 2,
 
-    // Disallow Initializing to undefined
-    "no-undef-init": 2,
+        // Disallow Symbol Constructor
+        "no-new-symbol": 2,
 
-    // Disallow control flow statements in finally blocks
-    "no-unsafe-finally": 2,
+        // Disallow Initializing to undefined
+        "no-undef-init": 2,
 
-    // Disallow Unused Labels
-    "no-unused-labels": 2,
+        // Disallow control flow statements in finally blocks
+        "no-unsafe-finally": 2,
 
-    // Disallow unnecessary computed property keys on objects
-    "no-useless-computed-key": 2,
+        // Disallow Unused Labels
+        "no-unused-labels": 2,
 
-    // Disallow unnecessary constructor
-    "no-useless-constructor": 2,
+        // Disallow unnecessary computed property keys on objects
+        "no-useless-computed-key": 2,
 
-    // Disallow renaming import, export, and destructured assignments to the
-    // same name
-    "no-useless-rename": 2,
+        // Disallow unnecessary constructor
+        "no-useless-constructor": 2,
 
-    // Enforce spacing between rest and spread operators and their expressions
-    "rest-spread-spacing": [2, "never"],
+        // Disallow renaming import, export, and destructured assignments to the
+        // same name
+        "no-useless-rename": 2,
 
-    // Disallow usage of spacing in template string expressions
-    "template-curly-spacing": [2, "never"],
+        // Enforce spacing between rest and spread operators and their expressions
+        "rest-spread-spacing": [2, "never"],
 
-    // Disallow the Unicode Byte Order Mark
-    "unicode-bom": [2, "never"],
+        // Disallow usage of spacing in template string expressions
+        "template-curly-spacing": [2, "never"],
 
-    // Enforce spacing around the * in yield* expressions
-    "yield-star-spacing": [2, "after"],
+        // Disallow the Unicode Byte Order Mark
+        "unicode-bom": [2, "never"],
 
-    // Disallow Implied eval
-    "no-implied-eval": 2,
+        // Enforce spacing around the * in yield* expressions
+        "yield-star-spacing": [2, "after"],
 
-    // Disallow unnecessary function binding
-    "no-extra-bind": 2,
+        // Disallow Implied eval
+        "no-implied-eval": 2,
 
-    // Disallow new For Side Effects
-    "no-new": 2,
+        // Disallow unnecessary function binding
+        "no-extra-bind": 2,
 
-    // Disallow Self Assignment
-    "no-self-assign": 2,
+        // Disallow new For Side Effects
+        "no-new": 2,
 
-    // Disallow confusing multiline expressions
-    "no-unexpected-multiline": 2,
+        // Disallow Self Assignment
+        "no-self-assign": 2,
 
-    // Require IIFEs to be Wrapped
-    "wrap-iife": [2, "inside"],
+        // Disallow confusing multiline expressions
+        "no-unexpected-multiline": 2,
 
-    // Disallow Unused Expressions
-    "no-unused-expressions": 2,
+        // Require IIFEs to be Wrapped
+        "wrap-iife": [2, "inside"],
 
-    // Disallow function or var declarations in nested blocks
-    "no-inner-declarations": 2,
+        // Disallow Unused Expressions
+        "no-unused-expressions": 2,
+
+        // Disallow function or var declarations in nested blocks
+        "no-inner-declarations": 2,
 
-    // Enforce newline before and after dot
-    "dot-location": [2, "property"],
+        // Enforce newline before and after dot
+        "dot-location": [2, "property"],
 
-    // Disallow Use of caller/callee
-    "no-caller": 2,
+        // Disallow Use of caller/callee
+        "no-caller": 2,
 
-    // Disallow Case Statement Fallthrough
-    "no-fallthrough": 2,
+        // Disallow Case Statement Fallthrough
+        "no-fallthrough": 2,
 
-    // Disallow Floating Decimals
-    "no-floating-decimal": 2,
+        // Disallow Floating Decimals
+        "no-floating-decimal": 2,
 
-    // Require Space Before Blocks
-    "space-before-blocks": 2,
+        // Require Space Before Blocks
+        "space-before-blocks": 2,
 
-    // Operators always before the line break
-    "operator-linebreak": [2, "after", { "overrides": { ":": "before", "?": "ignore"}}],
+        // Operators always before the line break
+        "operator-linebreak": [2, "after", { overrides: { ":": "before", "?": "ignore" } }],
 
-    // Restricts the use of parentheses to only where they are necessary
-    // Disabled for now since this also removes parens around assignments, e.g. let foo = bar == baz
-    // "no-extra-parens": [2, "all", { "conditionalAssign": false, "returnAssign": false, "nestedBinaryExpressions": false }],
+        // Restricts the use of parentheses to only where they are necessary
+        // Disabled for now since this also removes parens around assignments, e.g. let foo = bar == baz
+        // "no-extra-parens": [2, "all", { "conditionalAssign": false, "returnAssign": false, "nestedBinaryExpressions": false }],
 
-    // Double quotes should be used.
-    "quotes": [2, "double", { "avoidEscape": true }],
+        // Double quotes should be used.
+        "quotes": [2, "double", { avoidEscape: true }],
 
-    // Disallow if as the only statement in an else block.
-    "no-lonely-if": 2,
+        // Disallow if as the only statement in an else block.
+        "no-lonely-if": 2,
 
-    // Not more than two empty lines with in the file, and no extra lines at
-    // beginning or end of file.
-    "no-multiple-empty-lines": [2, { "max": 2, "maxEOF": 0, "maxBOF": 0 }],
+        // Not more than two empty lines with in the file, and no extra lines at
+        // beginning or end of file.
+        "no-multiple-empty-lines": [2, { max: 2, maxEOF: 0, maxBOF: 0 }],
 
-    // Make sure all setters have a corresponding getter
-    "accessor-pairs": 2,
+        // Make sure all setters have a corresponding getter
+        "accessor-pairs": 2,
 
-    // Enforce spaces inside of single line blocks
-    "block-spacing": [2, "always"],
+        // Enforce spaces inside of single line blocks
+        "block-spacing": [2, "always"],
 
-    // Disallow spaces inside of computed properties
-    "computed-property-spacing": [2, "never"],
+        // Disallow spaces inside of computed properties
+        "computed-property-spacing": [2, "never"],
 
-    // Require consistent this (using |self|)
-    "consistent-this": [2, "self"],
+        // Require consistent this (using |self|)
+        "consistent-this": [2, "self"],
 
-    // Disallow unnecessary .call() and .apply()
-    "no-useless-call": 2,
+        // Disallow unnecessary .call() and .apply()
+        "no-useless-call": 2,
 
-    // Require dot notation when accessing properties
-    "dot-notation": 2,
+        // Require dot notation when accessing properties
+        "dot-notation": 2,
 
-    // Disallow named function expressions
-    "func-names": [2, "never"],
+        // Disallow named function expressions
+        "func-names": [2, "never"],
 
-    // Enforce placing object properties on separate lines
-    "object-property-newline": [2, { "allowMultiplePropertiesPerLine": true }],
+        // Enforce placing object properties on separate lines
+        "object-property-newline": [2, { allowMultiplePropertiesPerLine: true }],
 
-    // Enforce consistent line breaks inside braces
-    "object-curly-newline": [2, { "multiline": true }],
+        // Enforce consistent line breaks inside braces
+        "object-curly-newline": [2, { multiline: true }],
 
-    // Disallow whitespace before properties
-    "no-whitespace-before-property": 2,
+        // Disallow whitespace before properties
+        "no-whitespace-before-property": 2,
 
-    // Disallow unnecessary escape usage
-    "no-useless-escape": 2,
+        // Disallow unnecessary escape usage
+        "no-useless-escape": 2,
 
-    // Disallow mixes of different operators, but allow simple math operations.
-    "no-mixed-operators": [2, {
-        "groups": [
-            /* ["+", "-", "*", "/", "%", "**"], */
-            ["&", "|", "^", "~", "<<", ">>", ">>>"],
-            ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
-            ["&&", "||"],
-            ["in", "instanceof"]
-        ]
-    }],
+        // Disallow mixes of different operators, but allow simple math operations.
+        "no-mixed-operators": [2, {
+            groups: [
+                /* ["+", "-", "*", "/", "%", "**"], */
+                ["&", "|", "^", "~", "<<", ">>", ">>>"],
+                ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
+                ["&&", "||"],
+                ["in", "instanceof"]
+            ]
+        }],
 
-    // Disallow unnecessary concatenation of strings
-    "no-useless-concat": 2,
+        // Disallow unnecessary concatenation of strings
+        "no-useless-concat": 2,
 
-    // Disallow unmodified conditions of loops
-    "no-unmodified-loop-condition": 2,
+        // Disallow unmodified conditions of loops
+        "no-unmodified-loop-condition": 2,
 
-    // Suggest using arrow functions as callbacks
-    "prefer-arrow-callback": [2, { "allowNamedFunctions": true }],
+        // Suggest using arrow functions as callbacks
+        "prefer-arrow-callback": [2, { allowNamedFunctions: true }],
 
-    // Suggest using the spread operator instead of .apply()
-    "prefer-spread": 2,
+        // Suggest using the spread operator instead of .apply()
+        "prefer-spread": 2,
 
-    // Quoting style for property names
-    "quote-props": ["error", "consistent-as-needed", { "keywords": true }],
+        // Quoting style for property names
+        "quote-props": [2, "consistent-as-needed", { keywords: true }],
 
-    // Disallow negated conditions
-    "no-negated-condition": 2,
+        // Disallow negated conditions
+        "no-negated-condition": 2,
 
-    // Enforce a maximum number of statements allowed per line
-    "max-statements-per-line": [2, { "max": 2 }],
+        // Enforce a maximum number of statements allowed per line
+        "max-statements-per-line": [2, { max: 2 }],
 
-    // Disallow arrow functions where they could be confused with comparisons
-    "no-confusing-arrow": 2,
+        // Disallow arrow functions where they could be confused with comparisons
+        "no-confusing-arrow": 2,
 
-    // Disallow Unnecessary Nested Blocks
-    "no-lone-blocks": 2,
+        // Disallow Unnecessary Nested Blocks
+        "no-lone-blocks": 2,
 
-    // Enforce minimum identifier length
-    "id-length": [2, {
-      "min": 3,
-      "exceptions": [
-        /* sorting */ "a", "b",
-        /* exceptions */ "e", "ex",
-        /* loop indices */ "i", "j", "k", "n",
-        /* coordinates */ "x", "y",
-        /* regexes */ "re",
-        /* known words */ "rc", "rv", "id", "OS", "os", "db",
-        /* mail/calendar words */ "to", "cc",
-        /* Components */ "Ci", "Cc", "Cu", "Cr",
-      ]
-    }],
+        // Enforce minimum identifier length
+        "id-length": [2, {
+            min: 3,
+            exceptions: [
+                /* sorting */ "a", "b",
+                /* exceptions */ "e", "ex",
+                /* loop indices */ "i", "j", "k", "n",
+                /* coordinates */ "x", "y",
+                /* regexes */ "re",
+                /* known words */ "rc", "rv", "id", "OS", "os", "db",
+                /* mail/calendar words */ "to", "cc",
+                /* Components */ "Ci", "Cc", "Cu", "Cr",
+            ]
+        }],
 
-    // Disallow lexical declarations in case/default clauses
-    "no-case-declarations": 2,
+        // Disallow lexical declarations in case/default clauses
+        "no-case-declarations": 2,
 
-    // Enforce consistent indentation (4-space)
-    "indent": [2, 4, { "SwitchCase": 1 }],
+        // Enforce consistent indentation (4-space)
+        "indent": [2, 4, { SwitchCase: 1 }],
 
-    // The following rules will not be enabled currently, but are kept here for
-    // easier updates in the future.
-    "no-else-return": 0,
-  }
-}
+        // The following rules will not be enabled currently, but are kept here for
+        // easier updates in the future.
+        "no-else-return": 0,
+    }
+};
rename from calendar/test/mozmill/.eslintrc
rename to calendar/test/mozmill/.eslintrc.js
--- a/calendar/test/mozmill/.eslintrc
+++ b/calendar/test/mozmill/.eslintrc.js
@@ -1,20 +1,21 @@
-{
-  "globals": {
-    "elementslib": true,
-    "controller": true,
-    "mozmill": true,
-    "utils": true,
-    "require": true,
-    "exports": true,
-    "module": true
-  },
-  "rules": {
-    // Allow mozmill test methods to be used without warning
-    "no-unused-vars": [2, {
-      "vars": "all",
-      "args": "none",
-      "varsIgnorePattern": "(MODULE_NAME|MODULE_REQUIRES|RELATIVE_ROOT|setupModule|teardownTest|^test[A-Z].*)"
-      }
-    ]
-  }
-}
+"use strict";
+
+module.exports = {
+    globals: {
+        elementslib: true,
+        controller: true,
+        mozmill: true,
+        utils: true,
+        require: true,
+        exports: true,
+        module: true
+    },
+    rules: {
+        // Allow mozmill test methods to be used without warning
+        "no-unused-vars": [2, {
+            vars: "all",
+            args: "none",
+            varsIgnorePattern: "(MODULE_NAME|MODULE_REQUIRES|RELATIVE_ROOT|setupModule|teardownTest|^test[A-Z].*)"
+        }]
+    }
+};
rename from calendar/test/unit/.eslintrc
rename to calendar/test/unit/.eslintrc.js
--- a/calendar/test/unit/.eslintrc
+++ b/calendar/test/unit/.eslintrc.js
@@ -1,21 +1,23 @@
-{
-  "extends": [
-    "../../../mozilla/testing/xpcshell/xpcshell.eslintrc"
-  ],
-  "rules": {
-    // Allow non-camelcase so that run_test doesn't produce a warning.
-    "camelcase": 0,
-    // Allow using undefined variables so that tests can refer to functions
-    // and variables defined in head.js files, without having to maintain a
-    // list of globals in each .eslintrc file.
-    // Note that bug 1168340 will eventually help auto-registering globals
-    // from head.js files.
-    "no-undef": 0,
-    "block-scoped-var": 0,
-    // Allow run_test to be unused in xpcshell
-    "no-unused-vars": [2, { "vars": "all", "args": "none", "varsIgnorePattern": "run_test" }],
+"use strict";
 
-    // Allow function names, because they are useful for add_test/add_task
-    "func-names": 0,
-  }
-}
+module.exports = {
+    "extends": [
+        "../../../mozilla/testing/xpcshell/xpcshell.eslintrc"
+    ],
+    "rules": {
+        // Allow non-camelcase so that run_test doesn't produce a warning.
+        "camelcase": 0,
+        // Allow using undefined variables so that tests can refer to functions
+        // and variables defined in head.js files, without having to maintain a
+        // list of globals in each .eslintrc file.
+        // Note that bug 1168340 will eventually help auto-registering globals
+        // from head.js files.
+        "no-undef": 0,
+        "block-scoped-var": 0,
+        // Allow run_test to be unused in xpcshell
+        "no-unused-vars": [2, { vars: "all", args: "none", varsIgnorePattern: "run_test" }],
+
+        // Allow function names, because they are useful for add_test/add_task
+        "func-names": 0,
+    }
+};