Bug 1616608 - Remove separate ESLint rules in calendar. r=mkmelin,pmorris,fallen
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 20 Feb 2020 11:24:47 +1300
changeset 38282 f61f27a35d891c977792cfdd4b10d1031b5ec10d
parent 38281 7c243455ebe5e4bd08075abfe1f0b87a5c15dcf5
child 38283 75aa7d5dbcfdf0b36ce508b1838ec209c09b230a
push id399
push userclokep@gmail.com
push dateMon, 06 Apr 2020 18:42:02 +0000
reviewersmkmelin, pmorris, fallen
bugs1616608
Bug 1616608 - Remove separate ESLint rules in calendar. r=mkmelin,pmorris,fallen
.eslintrc.js
calendar/.eslintrc.js
calendar/base/backend/calBackendLoader.js
calendar/base/backend/icaljs/calDateTime.js
calendar/base/backend/icaljs/calDuration.js
calendar/base/backend/icaljs/calICSService.js
calendar/base/backend/icaljs/calPeriod.js
calendar/base/backend/icaljs/calRecurrenceRule.js
calendar/base/content/agenda-listbox-utils.js
calendar/base/content/calendar-chrome-startup.js
calendar/base/content/calendar-command-controller.js
calendar/base/content/calendar-dnd-listener.js
calendar/base/content/calendar-event-column.js
calendar/base/content/calendar-extract.js
calendar/base/content/calendar-invitations-manager.js
calendar/base/content/calendar-item-editing.js
calendar/base/content/calendar-management.js
calendar/base/content/calendar-migration.js
calendar/base/content/calendar-multiday-base-view.js
calendar/base/content/calendar-statusbar.js
calendar/base/content/calendar-task-editing.js
calendar/base/content/calendar-task-tree.js
calendar/base/content/calendar-task-view.js
calendar/base/content/calendar-unifinder.js
calendar/base/content/calendar-views-utils.js
calendar/base/content/dialogs/calendar-event-dialog-attendees.js
calendar/base/content/dialogs/calendar-event-dialog-reminder.js
calendar/base/content/dialogs/calendar-invitations-dialog.js
calendar/base/content/dialogs/calendar-migration-dialog.js
calendar/base/content/dialogs/calendar-print-dialog.js
calendar/base/content/dialogs/calendar-subscriptions-dialog.js
calendar/base/content/import-export.js
calendar/base/content/preferences/alarms.js
calendar/base/content/preferences/categories.js
calendar/base/content/preferences/general.js
calendar/base/content/preferences/views.js
calendar/base/content/today-pane.js
calendar/base/modules/calExtract.jsm
calendar/base/modules/calHashedArray.jsm
calendar/base/modules/calUtils.jsm
calendar/base/modules/utils/calACLUtils.jsm
calendar/base/modules/utils/calAlarmUtils.jsm
calendar/base/modules/utils/calAsyncUtils.jsm
calendar/base/modules/utils/calAuthUtils.jsm
calendar/base/modules/utils/calCategoryUtils.jsm
calendar/base/modules/utils/calDataUtils.jsm
calendar/base/modules/utils/calDateTimeUtils.jsm
calendar/base/modules/utils/calEmailUtils.jsm
calendar/base/modules/utils/calItemUtils.jsm
calendar/base/modules/utils/calIteratorUtils.jsm
calendar/base/modules/utils/calItipUtils.jsm
calendar/base/modules/utils/calL10NUtils.jsm
calendar/base/modules/utils/calPrintUtils.jsm
calendar/base/modules/utils/calProviderUtils.jsm
calendar/base/modules/utils/calUnifinderUtils.jsm
calendar/base/modules/utils/calViewUtils.jsm
calendar/base/modules/utils/calWindowUtils.jsm
calendar/base/modules/utils/calXMLUtils.jsm
calendar/base/src/calAlarm.js
calendar/base/src/calAlarmMonitor.js
calendar/base/src/calAlarmService.js
calendar/base/src/calAttachment.js
calendar/base/src/calAttendee.js
calendar/base/src/calCachedCalendar.js
calendar/base/src/calCalendarManager.js
calendar/base/src/calCalendarSearchService.js
calendar/base/src/calDateTimeFormatter.js
calendar/base/src/calDefaultACLManager.js
calendar/base/src/calDeletedItems.js
calendar/base/src/calEvent.js
calendar/base/src/calFilter.js
calendar/base/src/calFreeBusyService.js
calendar/base/src/calIcsParser.js
calendar/base/src/calIcsSerializer.js
calendar/base/src/calItemBase.js
calendar/base/src/calItipItem.js
calendar/base/src/calProtocolHandler.js
calendar/base/src/calRecurrenceDate.js
calendar/base/src/calRecurrenceInfo.js
calendar/base/src/calRelation.js
calendar/base/src/calSleepMonitor.js
calendar/base/src/calStartupService.js
calendar/base/src/calTimezone.js
calendar/base/src/calTimezoneService.js
calendar/base/src/calTodo.js
calendar/base/src/calTransactionManager.js
calendar/base/src/calWeekInfoService.js
calendar/import-export/calHtmlExport.js
calendar/import-export/calIcsImportExport.js
calendar/import-export/calListFormatter.js
calendar/import-export/calMonthGridPrinter.js
calendar/import-export/calOutlookCSVImportExport.js
calendar/import-export/calWeekPrinter.js
calendar/itip/calItipEmailTransport.js
calendar/lightning/components/calItipProtocolHandler.js
calendar/lightning/components/lightningTextCalendarConverter.js
calendar/lightning/content/html-item-editing/react-code.js
calendar/lightning/content/imip-bar.js
calendar/lightning/content/lightning-item-iframe.js
calendar/lightning/content/messenger-overlay-preferences.js
calendar/lightning/content/messenger-overlay-sidebar.js
calendar/lightning/modules/ltnInvitationUtils.jsm
calendar/providers/caldav/calDavCalendar.js
calendar/providers/caldav/calDavRequestHandlers.js
calendar/providers/composite/calCompositeCalendar.js
calendar/providers/ics/calICSCalendar.js
calendar/providers/memory/calMemoryCalendar.js
calendar/providers/storage/calStorageCalendar.js
calendar/providers/storage/calStorageHelpers.jsm
calendar/providers/storage/calStorageUpgrade.jsm
calendar/resources/content/mouseoverPreviews.js
calendar/resources/content/publish.js
calendar/resources/content/publishDialog.js
calendar/test/modules/CalendarUtils.jsm
calendar/test/unit/head_consts.js
calendar/test/unit/test_alarmservice.js
calendar/test/unit/test_alarmutils.js
calendar/test/unit/test_bug494140.js
calendar/test/unit/test_calmgr.js
calendar/test/unit/test_data_bags.js
calendar/test/unit/test_freebusy_service.js
calendar/test/unit/test_hashedarray.js
calendar/test/unit/test_ics.js
calendar/test/unit/test_ics_parser.js
calendar/test/unit/test_items.js
calendar/test/unit/test_providers.js
calendar/test/unit/test_search_service.js
calendar/test/unit/test_startup_service.js
calendar/test/unit/test_storage.js
calendar/test/unit/test_timezone.js
calendar/test/unit/test_utils.js
calendar/test/unit/test_webcal.js
mailnews/extensions/newsblog/.eslintrc.js
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -27,16 +27,17 @@ module.exports = {
   // We would like the same base rules as provided by
   // mozilla/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
   extends: ["plugin:mozilla/recommended"],
 
   // When adding items to this file please check for effects on sub-directories.
   plugins: ["html", "mozilla"],
 
   rules: {
+    complexity: ["error", 80],
     "func-names": ["error", "never"],
     "mozilla/prefer-boolean-length-check": "off",
   },
 
   // To avoid bad interactions of the html plugin with the xml preprocessor in
   // eslint-plugin-mozilla, we turn off processing of the html plugin for .xml
   // files.
   settings: {
deleted file mode 100644
--- a/calendar/.eslintrc.js
+++ /dev/null
@@ -1,541 +0,0 @@
-"use strict";
-
-module.exports = {
-  extends: ["../../toolkit/.eslintrc.js"],
-  rules: {
-    // Enforce newline at the end of file, with no multiple empty lines.
-    "eol-last": 2,
-
-    // Disallow using variables outside the blocks they are defined
-    "block-scoped-var": 2,
-
-    // Allow trailing commas for easy list extension.  Having them does not
-    // impair readability, but also not required either.
-    "comma-dangle": 0,
-
-    // Enforce spacing before and after comma
-    "comma-spacing": [2, { before: false, after: true }],
-
-    // Enforce one true comma style.
-    "comma-style": [2, "last"],
-
-    // We should get better at complexity, but at the moment it is what it is
-    complexity: [2, 90],
-
-    // 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 }],
-
-    // Enforces spacing between keys and values in object literal properties.
-    "key-spacing": [2, { beforeColon: false, afterColon: true, mode: "minimum" }],
-
-    // Disallow the omission of parentheses when invoking a constructor with no
-    // arguments.
-    "new-parens": 2,
-
-    // Disallow use of the Array constructor.
-    "no-array-constructor": 2,
-
-    // disallow use of the Object constructor
-    "no-new-object": 2,
-
-    // Disallow Primitive Wrapper Instances
-    "no-new-wrappers": 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 assignment in conditional expressions.
-    "no-cond-assign": 2,
-
-    // Disallow use of debugger.
-    "no-debugger": 2,
-
-    // Disallow deletion of variables (deleting properties is fine).
-    "no-delete-var": 2,
-
-    // Disallow duplicate arguments in functions.
-    "no-dupe-args": 2,
-
-    // Disallow duplicate keys when creating object literals.
-    "no-dupe-keys": 2,
-
-    // Disallow a duplicate case label.
-    "no-duplicate-case": 2,
-
-    // Disallow the use of empty character classes in regular expressions.
-    "no-empty-character-class": 2,
-
-    // Disallow assigning to the exception in a catch block.
-    "no-ex-assign": 2,
-
-    // Disallow adding to native types
-    "no-extend-native": 2,
-
-    // Disallow double-negation boolean casts in a boolean context.
-    "no-extra-boolean-cast": 2,
-
-    // Disallow unnecessary semicolons.
-    "no-extra-semi": 2,
-
-    // Disallow mixed spaces and tabs for indentation.
-    "no-mixed-spaces-and-tabs": 2,
-
-    // Disallow reassignments of native objects.
-    "no-native-reassign": 2,
-
-    // Disallow nested ternary expressions, they make the code hard to read.
-    "no-nested-ternary": 2,
-
-    // Disallow use of octal literals.
-    "no-octal": 2,
-
-    // Disallow comparisons where both sides are exactly the same.
-    "no-self-compare": 2,
-
-    // Disallow sparse arrays, eg. let arr = [,,2].
-    // Array destructuring is fine though:
-    // for (let [, breakpointPromise] of aPromises)
-    "no-sparse-arrays": 2,
-
-    // Disallow trailing whitespace at the end of lines.
-    "no-trailing-spaces": 2,
-
-    // Disallow use of the with statement.
-    "no-with": 2,
-
-    // Disallow comparisons with the value NaN.
-    "use-isnan": 2,
-
-    // Ensure that the results of typeof are compared against a valid string.
-    "valid-typeof": 2,
-
-    // disallow the use of object properties of the global object (Math and
-    // JSON) as functions
-    "no-obj-calls": 2,
-
-    // disallow use of octal escape sequences in string literals, such as
-    // var foo = "Copyright \251";
-    "no-octal-escape": 2,
-
-    // disallow use of void operator
-    "no-void": 2,
-
-    // Disallow Yoda conditions (where literal value comes first).
-    yoda: 2,
-
-    // Require a space immediately following the // in a line comment.
-    "spaced-comment": [2, "always"],
-
-    // Require use of the second argument for parseInt().
-    radix: 2,
-
-    // Require spaces before/after unary operators (words on by default,
-    // nonwords off by default).
-    "space-unary-ops": [2, { words: true, nonwords: false }],
-
-    // Enforce spacing after semicolons.
-    "semi-spacing": [2, { before: false, after: true }],
-
-    // Disallow the use of Boolean literals in conditional expressions.
-    "no-unneeded-ternary": 2,
-
-    // 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, { ignoreEOLComments: true }],
-
-    // 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 }],
-    "space-infix-ops": 0,
-
-    // Require a space around all keywords.
-    "keyword-spacing": 2,
-
-    // Disallow space between function identifier and application.
-    "no-spaced-func": 2,
-
-    // Disallow shadowing of names such as arguments.
-    "no-shadow-restricted-names": 2,
-
-    // Disallow use of comma operator.
-    "no-sequences": 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,
-
-    // Require return statements to either always or never specify values
-    "consistent-return": 2,
-
-    // Disallow padding within blocks.
-    "padded-blocks": [2, "never"],
-
-    // Disallow spaces inside parentheses.
-    "space-in-parens": [2, "never"],
-
-    // 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 unreachable statements after a return, throw, continue, or break
-    // statement.
-    "no-unreachable": 2,
-
-    // Always require use of semicolons wherever they are valid.
-    semi: [2, "always"],
-
-    // 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,
-
-    // Disallow declaring the same variable more than once (we use let anyway).
-    "no-redeclare": 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,
-
-    // 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,
-
-    // 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" }],
-
-    "mozilla/mark-test-function-used": 1,
-
-    // Require padding inside curly braces
-    "object-curly-spacing": [2, "always"],
-
-    // Disallow spaces inside of brackets
-    "array-bracket-spacing": [2, "never"],
-
-    // Disallow control characters in regular expressions
-    "no-control-regex": 2,
-
-    // Disallow invalid regular expression strings in RegExp constructors
-    "no-invalid-regexp": 2,
-
-    // Disallow multiple spaces in regular expression literals
-    "no-regex-spaces": 2,
-
-    // Disallow irregular whitespace
-    "no-irregular-whitespace": 2,
-
-    // Disallow negating the left operand in `in` expressions
-    "no-negated-in-lhs": 2,
-
-    // Allow constant expressions in conditions
-    // With 2.11.0 we can enable this with checkLoops: false
-    "no-constant-condition": [2, { checkLoops: false }],
-
-    // Disallow Regexs That Look Like Division
-    "no-div-regex": 2,
-
-    // Disallow Iterator (using __iterator__)
-    "no-iterator": 2,
-
-    // Enforce consistent linebreak style
-    "linebreak-style": [2, "unix"],
-
-    // Enforces return statements in callbacks of array's methods
-    "array-callback-return": 2,
-
-    // Verify super() calls in constructors
-    "constructor-super": 2,
-
-    // Disallow modifying variables of class declarations
-    "no-class-assign": 2,
-
-    // Disallow modifying variables that are declared using const
-    "no-const-assign": 2,
-
-    // Disallow duplicate name in class members
-    "no-dupe-class-members": 2,
-
-    // Disallow use of this/super before calling super() in constructors
-    "no-this-before-super": 2,
-
-    // Disallow duplicate imports
-    "no-duplicate-imports": 2,
-
-    // Disallow empty destructuring patterns
-    "no-empty-pattern": 2,
-
-    // Disallow Labeled Statements
-    "no-labels": 2,
-
-    // Disallow Multiline Strings
-    "no-multi-str": 2,
-
-    // Disallow Symbol Constructor
-    "no-new-symbol": 2,
-
-    // Disallow Initializing to undefined
-    "no-undef-init": 2,
-
-    // Disallow control flow statements in finally blocks
-    "no-unsafe-finally": 2,
-
-    // Disallow Unused Labels
-    "no-unused-labels": 2,
-
-    // Disallow unnecessary computed property keys on objects
-    "no-useless-computed-key": 2,
-
-    // Disallow unnecessary constructor
-    "no-useless-constructor": 2,
-
-    // Disallow renaming import, export, and destructured assignments to the
-    // same name
-    "no-useless-rename": 2,
-
-    // Enforce spacing between rest and spread operators and their expressions
-    "rest-spread-spacing": [2, "never"],
-
-    // Disallow usage of spacing in template string expressions
-    "template-curly-spacing": [2, "never"],
-
-    // Disallow the Unicode Byte Order Mark
-    "unicode-bom": [2, "never"],
-
-    // Enforce spacing around the * in yield* expressions
-    "yield-star-spacing": [2, "after"],
-
-    // Disallow Implied eval
-    "no-implied-eval": 2,
-
-    // Disallow unnecessary function binding
-    "no-extra-bind": 2,
-
-    // Disallow new For Side Effects
-    "no-new": 2,
-
-    // Disallow Self Assignment
-    "no-self-assign": 2,
-
-    // Disallow confusing multiline expressions
-    "no-unexpected-multiline": 2,
-
-    // Require IIFEs to be Wrapped
-    "wrap-iife": [2, "inside"],
-
-    // 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"],
-
-    // Disallow Use of caller/callee
-    "no-caller": 2,
-
-    // Disallow Case Statement Fallthrough
-    "no-fallthrough": 2,
-
-    // Disallow Floating Decimals
-    "no-floating-decimal": 2,
-
-    // Require Space Before Blocks
-    "space-before-blocks": 2,
-
-    // 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 }],
-
-    // Double quotes should be used.
-    quotes: [2, "double", { avoidEscape: true }],
-
-    // 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 }],
-
-    // Make sure all setters have a corresponding getter
-    "accessor-pairs": 2,
-
-    // Enforce spaces inside of single line blocks
-    "block-spacing": [2, "always"],
-
-    // Disallow spaces inside of computed properties
-    "computed-property-spacing": [2, "never"],
-
-    // Require consistent this (using |self|)
-    "consistent-this": [2, "self"],
-
-    // Disallow unnecessary .call() and .apply()
-    "no-useless-call": 2,
-
-    // Require dot notation when accessing properties
-    "dot-notation": 2,
-
-    // Enforce placing object properties on separate lines
-    "object-property-newline": [2, { allowMultiplePropertiesPerLine: true }],
-
-    // Do Not Require Object Literal Shorthand Syntax
-    // (Override the parent eslintrc setting for this.)
-    "object-shorthand": "off",
-
-    // Disallow whitespace before properties
-    "no-whitespace-before-property": 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 unnecessary concatenation of strings
-    "no-useless-concat": 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 the spread operator instead of .apply()
-    "prefer-spread": 2,
-
-    // Disallow negated conditions
-    "no-negated-condition": 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 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",
-          "is",
-          /* mail/calendar words */
-          "to",
-          "cc",
-          /* Components */
-          "Ci",
-          "Cc",
-          "Cu",
-          "Cr",
-        ],
-      },
-    ],
-
-    // Disallow lexical declarations in case/default clauses
-    "no-case-declarations": 2,
-
-    // The following rules will not be enabled currently, but are kept here for
-    // easier updates in the future.
-    "no-else-return": 0,
-  },
-  overrides: [
-    {
-      files: [
-        "base/modules/utils/calAuthUtils.jsm",
-        "base/modules/utils/calEmailUtils.jsm",
-        "base/modules/utils/calIteratorUtils.jsm",
-        "base/modules/utils/calItipUtils.jsm",
-        "base/modules/utils/calL10NUtils.jsm",
-        "base/modules/utils/calProviderUtils.jsm",
-        "base/modules/utils/calUnifinderUtils.jsm",
-      ],
-      rules: {
-        "require-jsdoc": [2, { require: { ClassDeclaration: true } }],
-
-        "valid-jsdoc": [
-          2,
-          {
-            prefer: { returns: "return" },
-            preferType: {
-              boolean: "Boolean",
-              string: "String",
-              number: "Number",
-              object: "Object",
-              function: "Function",
-              map: "Map",
-              set: "Set",
-              date: "Date",
-            },
-            requireReturn: false,
-          },
-        ],
-      },
-    },
-    {
-      // If it is a test head file, we turn off global unused variable checks, as it
-      // would require searching the other test files to know if they are used or not.
-      // This would be expensive and slow, and it isn't worth it for head files.
-      // We could get developers to declare as exported, but that doesn't seem worth it.
-      files: ["test/**/head*.js"],
-      rules: {
-        "no-unused-vars": [
-          "error",
-          {
-            args: "none",
-            vars: "local",
-          },
-        ],
-      },
-    },
-  ],
-};
--- a/calendar/base/backend/calBackendLoader.js
+++ b/calendar/base/backend/calBackendLoader.js
@@ -15,21 +15,21 @@ function calBackendLoader() {
 }
 
 calBackendLoader.prototype = {
   classID: Components.ID("{0314c271-7168-40fa-802e-83c8c46a557e}"),
   QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
   loaded: false,
 
-  observe: function() {
+  observe() {
     // Nothing to do here, just need the entry so this is instantiated
   },
 
-  loadBackend: function() {
+  loadBackend() {
     if (this.loaded) {
       return;
     }
 
     if (Services.prefs.getBoolPref("calendar.icaljs", false)) {
       let contracts = {
         "@mozilla.org/calendar/datetime;1": "{36783242-ec94-4d8a-9248-d2679edd55b9}",
         "@mozilla.org/calendar/ics-service;1": "{c61cb903-4408-41b3-bc22-da0b27efdfe1}",
@@ -57,20 +57,20 @@ calBackendLoader.prototype = {
     }
 
     this.loaded = true;
   },
 };
 
 function lazyFactoryFor(backendScope, classID) {
   return {
-    createInstance: function(aOuter, aIID) {
+    createInstance(aOuter, aIID) {
       let realFactory = backendScope.NSGetFactory(classID);
       return realFactory.createInstance(aOuter, aIID);
     },
-    lockFactory: function(lock) {
+    lockFactory(lock) {
       let realFactory = backendScope.NSGetFactory(classID);
       return realFactory.lockFactory(lock);
     },
   };
 }
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([calBackendLoader]);
--- a/calendar/base/backend/icaljs/calDateTime.js
+++ b/calendar/base/backend/icaljs/calDateTime.js
@@ -13,20 +13,20 @@ function calDateTime(innerObject) {
   this.innerObject = innerObject || ICAL.Time.epochTime.clone();
 }
 
 calDateTime.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.calIDateTime]),
   classID: Components.ID("{36783242-ec94-4d8a-9248-d2679edd55b9}"),
 
   isMutable: true,
-  makeImmutable: function() {
+  makeImmutable() {
     this.isMutable = false;
   },
-  clone: function() {
+  clone() {
     return new calDateTime(this.innerObject.clone());
   },
 
   isValid: true,
   innerObject: null,
 
   get nativeTime() {
     return this.innerObject.toUnixTime() * UNIX_TIME_TO_PRTIME;
@@ -87,29 +87,29 @@ calDateTime.prototype = {
       function(val) {
         this.innerObject.zone = val;
         return val;
       },
       this
     );
   },
 
-  resetTo: function(year, month, day, hour, minute, second, timezone) {
+  resetTo(year, month, day, hour, minute, second, timezone) {
     this.innerObject.fromData({
-      year: year,
+      year,
       month: month + 1,
-      day: day,
-      hour: hour,
-      minute: minute,
-      second: second,
+      day,
+      hour,
+      minute,
+      second,
     });
     this.timezone = timezone;
   },
 
-  reset: function() {
+  reset() {
     this.innerObject.reset();
   },
 
   get timezoneOffset() {
     return this.innerObject.utcOffset();
   },
   get isDate() {
     return this.innerObject.isDate;
@@ -120,17 +120,17 @@ calDateTime.prototype = {
 
   get weekday() {
     return this.innerObject.dayOfWeek() - 1;
   },
   get yearday() {
     return this.innerObject.dayOfYear();
   },
 
-  toString: function() {
+  toString() {
     return this.innerObject.toString();
   },
 
   getInTimezone: unwrap(ICAL.Timezone, function(val) {
     return new calDateTime(this.innerObject.convertToZone(val));
   }),
 
   addDuration: unwrap(ICAL.Duration, function(val) {
@@ -150,20 +150,19 @@ calDateTime.prototype = {
     if (a.zone == ICAL.Timezone.localTimezone || b.zone == ICAL.Timezone.localTimezone) {
       a = a.convertToZone(ICAL.Timezone.localTimezone);
       b = b.convertToZone(ICAL.Timezone.localTimezone);
     }
 
     if (a.isDate || b.isDate) {
       // Lightning expects 20120101 and 20120101T010101 to be equal
       return a.compareDateOnlyTz(b, a.zone);
-    } else {
-      // If both are dates or date-times, then just do the normal compare
-      return a.compare(b);
     }
+    // If both are dates or date-times, then just do the normal compare
+    return a.compare(b);
   }),
 
   get startOfWeek() {
     return new calDateTime(this.innerObject.startOfWeek());
   },
   get endOfWeek() {
     return new calDateTime(this.innerObject.endOfWeek());
   },
--- a/calendar/base/backend/icaljs/calDuration.js
+++ b/calendar/base/backend/icaljs/calDuration.js
@@ -16,20 +16,20 @@ calDuration.prototype = {
   get icalDuration() {
     return this.innerObject;
   },
   set icalDuration(val) {
     this.innerObject = val;
   },
 
   isMutable: true,
-  makeImmutable: function() {
+  makeImmutable() {
     this.isMutable = false;
   },
-  clone: function() {
+  clone() {
     return new calDuration(this.innerObject.clone());
   },
 
   get isNegative() {
     return this.innerObject.isNegative;
   },
   set isNegative(val) {
     this.innerObject.isNegative = val;
@@ -80,23 +80,23 @@ calDuration.prototype = {
   addDuration: unwrap(ICAL.Duration, function(val) {
     this.innerObject.fromSeconds(this.innerObject.toSeconds() + val.toSeconds());
   }),
 
   compare: unwrap(ICAL.Duration, function(val) {
     return this.innerObject.compare(val);
   }),
 
-  reset: function() {
+  reset() {
     this.innerObject.reset();
   },
-  normalize: function() {
+  normalize() {
     this.innerObject.normalize();
   },
-  toString: function() {
+  toString() {
     return this.innerObject.toString();
   },
 
   get icalString() {
     return this.innerObject.toString();
   },
   set icalString(val) {
     this.innerObject = ICAL.Duration.fromString(val);
--- a/calendar/base/backend/icaljs/calICSService.js
+++ b/calendar/base/backend/icaljs/calICSService.js
@@ -26,17 +26,17 @@ calIcalProperty.prototype = {
   },
   set icalProperty(val) {
     this.innerObject = val;
   },
 
   get parent() {
     return this.innerObject.parent;
   },
-  toString: function() {
+  toString() {
     return this.innerObject.toICAL();
   },
 
   get value() {
     // Unescaped value for properties of TEXT, escaped otherwise.
     if (this.innerObject.type == "text") {
       return this.innerObject.getValues().join(",");
     }
@@ -58,19 +58,18 @@ calIcalProperty.prototype = {
       .getValues()
       .map(val => {
         if (type == "text") {
           return ICAL.stringify.value(val, type, ICAL.design.icalendar);
         } else if (typeof val == "number" || typeof val == "string") {
           return val;
         } else if ("toICALString" in val) {
           return val.toICALString();
-        } else {
-          return val.toString();
         }
+        return val.toString();
       })
       .join(",");
   },
   set valueAsIcalString(val) {
     let mockLine = this.propertyName + ":" + val;
     let prop = ICAL.Property.fromString(mockLine, ICAL.design.icalendar);
 
     if (this.innerObject.isMultiValue) {
@@ -111,31 +110,31 @@ calIcalProperty.prototype = {
       this
     );
   },
 
   get propertyName() {
     return this.innerObject.name.toUpperCase();
   },
 
-  getParameter: function(name) {
+  getParameter(name) {
     // Unfortunately getting the "VALUE" parameter won't work, since in
     // jCal it has been translated to the value type id.
     if (name == "VALUE") {
       let defaultType = this.innerObject.getDefaultType();
       if (this.innerObject.type != defaultType) {
         // Default type doesn't match object type, so we have a VALUE
         // parameter
         return this.innerObject.type.toUpperCase();
       }
     }
 
     return this.innerObject.getParameter(name.toLowerCase());
   },
-  setParameter: function(name, value) {
+  setParameter(name, value) {
     // Similar problems for setting the value parameter. Lightning code
     // expects setting the value parameter to just change the value type
     // and attempt to use the previous value as the new one. To do this in
     // ICAL.js we need to save the value, reset the type and then try to
     // set the value again.
     if (name == "VALUE") {
       let oldValues;
       let type = this.innerObject.type;
@@ -167,81 +166,80 @@ calIcalProperty.prototype = {
         } else {
           this.innerObject.setValue(oldValues.join(","));
         }
       }
     } else {
       this.innerObject.setParameter(name.toLowerCase(), value);
     }
   },
-  removeParameter: function(name) {
+  removeParameter(name) {
     // Again, VALUE needs special handling. Removing the value parameter is
     // kind of like resetting it to the default type. So find out the
     // default type and then set the value parameter to it.
     if (name == "VALUE") {
       let propname = this.innerObject.name.toLowerCase();
       if (propname in ICAL.design.icalendar.property) {
         let details = ICAL.design.icalendar.property[propname];
         if ("defaultType" in details) {
           this.setParameter("VALUE", details.defaultType);
         }
       }
     } else {
       this.innerObject.removeParameter(name.toLowerCase());
     }
   },
 
-  clearXParameters: function() {
+  clearXParameters() {
     cal.WARN(
       "calIICSService::clearXParameters is no longer implemented, please use removeParameter"
     );
   },
 
   paramIterator: null,
-  getFirstParameterName: function() {
+  getFirstParameterName() {
     let innerObject = this.innerObject;
     this.paramIterator = (function*() {
       let defaultType = innerObject.getDefaultType();
       if (defaultType != innerObject.type) {
         yield "VALUE";
       }
 
       let paramNames = Object.keys(innerObject.jCal[1] || {});
       for (let name of paramNames) {
         yield name.toUpperCase();
       }
     })();
     return this.getNextParameterName();
   },
 
-  getNextParameterName: function() {
+  getNextParameterName() {
     if (this.paramIterator) {
       let next = this.paramIterator.next();
       if (next.done) {
         this.paramIterator = null;
       }
 
       return next.value;
-    } else {
-      return this.getFirstParameterName();
     }
+    return this.getFirstParameterName();
   },
 };
 
 function calIcalComponent(innerObject) {
   this.innerObject = innerObject || new ICAL.Component();
   this.wrappedJSObject = this;
   this.mReferencedZones = {};
 }
 
 calIcalComponent.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.calIIcalComponent]),
   classID: Components.ID("{51ac96fd-1279-4439-a85b-6947b37f4cea}"),
 
-  clone: function() {
+  clone() {
     return new calIcalComponent(new ICAL.Component(this.innerObject.toJSON()));
   },
 
   get parent() {
     return wrapGetter(calIcalComponent, this.innerObject.parent);
   },
 
   get icalTimezone() {
@@ -250,44 +248,43 @@ calIcalComponent.prototype = {
   get icalComponent() {
     return this.innerObject;
   },
   set icalComponent(val) {
     this.innerObject = val;
   },
 
   componentIterator: null,
-  getFirstSubcomponent: function(kind) {
+  getFirstSubcomponent(kind) {
     if (kind == "ANY") {
       kind = null;
     } else if (kind) {
       kind = kind.toLowerCase();
     }
     let innerObject = this.innerObject;
     this.componentIterator = (function*() {
       let comps = innerObject.getAllSubcomponents(kind);
       if (comps) {
         for (let comp of comps) {
           yield new calIcalComponent(comp);
         }
       }
     })();
     return this.getNextSubcomponent(kind);
   },
-  getNextSubcomponent: function(kind) {
+  getNextSubcomponent(kind) {
     if (this.componentIterator) {
       let next = this.componentIterator.next();
       if (next.done) {
         this.componentIterator = null;
       }
 
       return next.value;
-    } else {
-      return this.getFirstSubcomponent(kind);
     }
+    return this.getFirstSubcomponent(kind);
   },
 
   get componentType() {
     return this.innerObject.name.toUpperCase();
   },
 
   get uid() {
     return this.innerObject.getFirstPropertyValue("uid");
@@ -366,17 +363,17 @@ calIcalComponent.prototype = {
     let prop = this.innerObject.getFirstProperty("priority");
     let val = prop ? prop.getFirstValue() : null;
     return val === null ? INVALID_VALUE : val;
   },
   set priority(val) {
     this.innerObject.updatePropertyWithValue("priority", val);
   },
 
-  _setTimeAttr: function(propName, val) {
+  _setTimeAttr(propName, val) {
     let prop = this.innerObject.updatePropertyWithValue(propName, val);
     if (
       val &&
       val.zone &&
       val.zone != ICAL.Timezone.utcTimezone &&
       val.zone != ICAL.Timezone.localTimezone
     ) {
       prop.setParameter("TZID", val.zone.tzid);
@@ -441,31 +438,31 @@ calIcalComponent.prototype = {
 
   get recurrenceId() {
     return wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("recurrence-id"));
   },
   set recurrenceId(val) {
     unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "recurrence-id"), this);
   },
 
-  serializeToICS: function() {
+  serializeToICS() {
     return this.innerObject.toString() + ICAL.newLineChar;
   },
-  toString: function() {
+  toString() {
     return this.innerObject.toString();
   },
 
-  addSubcomponent: function(comp) {
+  addSubcomponent(comp) {
     comp.getReferencedTimezones().forEach(this.addTimezoneReference, this);
     let jscomp = unwrapSingle(ICAL.Component, comp);
     this.innerObject.addSubcomponent(jscomp);
   },
 
   propertyIterator: null,
-  getFirstProperty: function(kind) {
+  getFirstProperty(kind) {
     if (kind == "ANY") {
       kind = null;
     } else if (kind) {
       kind = kind.toLowerCase();
     }
     let innerObject = this.innerObject;
     this.propertyIterator = (function*() {
       let props = innerObject.getAllProperties(kind);
@@ -487,94 +484,93 @@ calIcalComponent.prototype = {
           yield new calIcalProperty(prop);
         }
       }
     })();
 
     return this.getNextProperty(kind);
   },
 
-  getNextProperty: function(kind) {
+  getNextProperty(kind) {
     if (this.propertyIterator) {
       let next = this.propertyIterator.next();
       if (next.done) {
         this.propertyIterator = null;
       }
 
       return next.value;
-    } else {
-      return this.getFirstProperty(kind);
     }
+    return this.getFirstProperty(kind);
   },
 
-  _getNextParentVCalendar: function() {
+  _getNextParentVCalendar() {
     let vcalendar = this; // eslint-disable-line consistent-this
     while (vcalendar && vcalendar.componentType != "VCALENDAR") {
       vcalendar = vcalendar.parent;
     }
     return vcalendar || this;
   },
 
-  addProperty: function(prop) {
+  addProperty(prop) {
     try {
       let datetime = prop.valueAsDatetime;
       if (datetime && datetime.timezone) {
         this._getNextParentVCalendar().addTimezoneReference(datetime.timezone);
       }
     } catch (e) {
       // If there is an issue adding the timezone reference, don't make
       // that break adding the property.
     }
 
     let jsprop = unwrapSingle(ICAL.Property, prop);
     this.innerObject.addProperty(jsprop);
   },
 
-  addTimezoneReference: function(timezone) {
+  addTimezoneReference(timezone) {
     if (timezone) {
       if (!(timezone.tzid in this.mReferencedZones) && this.componentType == "VCALENDAR") {
         let comp = timezone.icalComponent;
         if (comp) {
           this.addSubcomponent(comp);
         }
       }
 
       this.mReferencedZones[timezone.tzid] = timezone;
     }
   },
 
-  getReferencedTimezones: function(aCount) {
+  getReferencedTimezones(aCount) {
     return Object.keys(this.mReferencedZones).map(timezone => this.mReferencedZones[timezone]);
   },
 
-  serializeToICSStream: function() {
+  serializeToICSStream() {
     let unicodeConverter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(
       Ci.nsIScriptableUnicodeConverter
     );
     unicodeConverter.charset = "UTF-8";
     return unicodeConverter.convertToInputStream(this.innerObject.toString());
   },
 };
 
 function calICSService() {
   this.wrappedJSObject = this;
 }
 
 calICSService.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.calIICSService]),
   classID: Components.ID("{c61cb903-4408-41b3-bc22-da0b27efdfe1}"),
 
-  parseICS: function(serialized, tzProvider) {
+  parseICS(serialized, tzProvider) {
     // TODO ical.js doesn't support tz providers, but this is usually null
     // or our timezone service anyway.
     let comp = ICAL.parse(serialized);
     return new calIcalComponent(new ICAL.Component(comp));
   },
 
-  parseICSAsync: function(serialized, tzProvider, listener) {
+  parseICSAsync(serialized, tzProvider, listener) {
     // There are way too many error checking messages here, but I had so
     // much pain with this method that I don't want it to break again.
     try {
       let worker = new ChromeWorker("resource:///components/calICSService-worker.js");
       worker.onmessage = function(event) {
         let rc = Cr.NS_ERROR_FAILURE;
         let icalComp = null;
         try {
@@ -596,20 +592,20 @@ calICSService.prototype = {
       worker.postMessage(serialized);
     } catch (e) {
       // If an error occurs above, the calling code will hang. Catch the exception just in case
       cal.ERROR("[calICSService] Error starting parsing worker: " + e);
       listener.onParsingComplete(Cr.NS_ERROR_FAILURE, null);
     }
   },
 
-  createIcalComponent: function(kind) {
+  createIcalComponent(kind) {
     return new calIcalComponent(new ICAL.Component(kind.toLowerCase()));
   },
 
-  createIcalProperty: function(kind) {
+  createIcalProperty(kind) {
     return new calIcalProperty(new ICAL.Property(kind.toLowerCase()));
   },
 
-  createIcalPropertyFromString: function(str) {
+  createIcalPropertyFromString(str) {
     return new calIcalProperty(ICAL.Property.fromString(str.trim(), ICAL.design.icalendar));
   },
 };
--- a/calendar/base/backend/icaljs/calPeriod.js
+++ b/calendar/base/backend/icaljs/calPeriod.js
@@ -22,20 +22,20 @@ calPeriod.prototype = {
 
   get icalPeriod() {
     return this.innerObject;
   },
   set icalPeriod(val) {
     this.innerObject = val;
   },
 
-  makeImmutable: function() {
+  makeImmutable() {
     this.isMutable = false;
   },
-  clone: function() {
+  clone() {
     return new calPeriod(this.innerObject.clone());
   },
 
   get start() {
     return wrapGetter(calDateTime, this.innerObject.start);
   },
   set start(rawval) {
     unwrapSetter(
@@ -73,12 +73,12 @@ calPeriod.prototype = {
     return this.innerObject.toICALString();
   },
   set icalString(val) {
     let dates = ICAL.parse._parseValue(val, "period", ICAL.design.icalendar);
     this.innerObject = ICAL.Period.fromString(dates.join("/"));
     return val;
   },
 
-  toString: function() {
+  toString() {
     return this.innerObject.toString();
   },
 };
--- a/calendar/base/backend/icaljs/calRecurrenceRule.js
+++ b/calendar/base/backend/icaljs/calRecurrenceRule.js
@@ -24,40 +24,40 @@ calRecurrenceRule.prototype = {
     classDescription: "Calendar Recurrence Rule",
     classID: calRecurrenceRuleClassID,
     interfaces: calRecurrenceRuleInterfaces,
   }),
 
   innerObject: null,
 
   isMutable: true,
-  makeImmutable: function() {
+  makeImmutable() {
     this.isMutable = false;
   },
-  ensureMutable: function() {
+  ensureMutable() {
     if (!this.isMutable) {
       throw Cr.NS_ERROR_OBJECT_IS_IMMUTABLE;
     }
   },
-  clone: function() {
+  clone() {
     return new calRecurrenceRule(new ICAL.Recur(this.innerObject));
   },
 
   isNegative: false, // We don't support EXRULE anymore
   get isFinite() {
     return this.innerObject.isFinite();
   },
 
-  getNextOccurrence: function(aStartTime, aRecId) {
+  getNextOccurrence(aStartTime, aRecId) {
     aStartTime = unwrapSingle(ICAL.Time, aStartTime);
     aRecId = unwrapSingle(ICAL.Time, aRecId);
     return wrapGetter(calDateTime, this.innerObject.getNextOccurrence(aStartTime, aRecId));
   },
 
-  getOccurrences: function(aStartTime, aRangeStart, aRangeEnd, aMaxCount) {
+  getOccurrences(aStartTime, aRangeStart, aRangeEnd, aMaxCount) {
     aStartTime = unwrapSingle(ICAL.Time, aStartTime);
     aRangeStart = unwrapSingle(ICAL.Time, aRangeStart);
     aRangeEnd = unwrapSingle(ICAL.Time, aRangeEnd);
 
     if (!aMaxCount && !aRangeEnd && this.count == 0 && this.until == null) {
       throw Cr.NS_ERROR_INVALID_ARG;
     }
 
@@ -157,19 +157,18 @@ calRecurrenceRule.prototype = {
   set count(val) {
     this.ensureMutable();
     this.innerObject.count = val && val > 0 ? val : null;
   },
 
   get untilDate() {
     if (this.innerObject.until) {
       return new calDateTime(this.innerObject.until);
-    } else {
-      return null;
     }
+    return null;
   },
   set untilDate(rawval) {
     this.ensureMutable();
     unwrapSetter(
       ICAL.Time,
       rawval,
       function(val) {
         if (
@@ -192,17 +191,17 @@ calRecurrenceRule.prototype = {
   get weekStart() {
     return this.innerObject.wkst - 1;
   },
   set weekStart(val) {
     this.ensureMutable();
     this.innerObject.wkst = val + 1;
   },
 
-  getComponent: function(aType) {
+  getComponent(aType) {
     let values = this.innerObject.getComponent(aType);
     if (aType == "BYDAY") {
       // BYDAY values are alphanumeric: SU, MO, TU, etc..
       for (let i = 0; i < values.length; i++) {
         let match = /^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/.exec(values[i]);
         if (!match) {
           cal.ERROR("Malformed BYDAY rule\n" + cal.STACK(10));
           return [];
@@ -217,17 +216,17 @@ calRecurrenceRule.prototype = {
           values[i] *= -1;
         }
       }
     }
 
     return values;
   },
 
-  setComponent: function(aType, aValues) {
+  setComponent(aType, aValues) {
     let values = aValues;
     if (aType == "BYDAY") {
       // BYDAY values are alphanumeric: SU, MO, TU, etc..
       for (let i = 0; i < values.length; i++) {
         let absValue = Math.abs(values[i]);
         if (absValue > 7) {
           let ordinal = Math.trunc(values[i] / 8);
           let day = ICAL.Recur.numericDayToIcalDay(absValue % 8);
--- a/calendar/base/content/agenda-listbox-utils.js
+++ b/calendar/base/content/agenda-listbox-utils.js
@@ -46,17 +46,17 @@ agendaListbox.init = function() {
 
   for (let header of [showTodayHeader, showTomorrowHeader, showSoonHeader]) {
     header.getCheckbox().addEventListener("CheckboxStateChange", this.onCheckboxChange, true);
   }
 
   // At this point, we're ready and waiting for refreshPeriodDates to be called by TodayPane.
 
   let prefObserver = {
-    observe: function(aSubject, aTopic, aPrefName) {
+    observe(aSubject, aTopic, aPrefName) {
       switch (aPrefName) {
         case "calendar.agendaListbox.soondays":
           agendaListbox.soonDays = getSoondaysPreference();
           agendaListbox.updateSoonSection();
           break;
       }
     },
   };
@@ -383,20 +383,19 @@ agendaListbox.isBefore = function(aItem,
         // starting day of an all-day events spannig multiple days
         return !compItemDate.isDate || aCompItem.duration.days != 1;
       } else if (aItem.endDate.compare(itemDateEndDate) == 0) {
         // ending day of an all-day events spannig multiple days
         return (
           !compItemDate.isDate ||
           (aCompItem.duration.days != 1 && aCompItem.startDate.compare(compItemDate) != 0)
         );
-      } else {
-        // intermediate day of an all-day events spannig multiple days
-        return !compItemDate.isDate;
       }
+      // intermediate day of an all-day events spannig multiple days
+      return !compItemDate.isDate;
     } else if (aCompItem.startDate.isDate) {
       return false;
     }
   }
   // Non all-day event sorted by date-time. When equal, sorted by start
   // date-time then by end date-time.
   let comp = itemDate.compare(compItemDate);
   if (comp == 0) {
@@ -610,45 +609,45 @@ agendaListbox.refreshCalendarQuery = fun
   let refreshJob = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
     agendaListbox: this,
     calendar: null,
     calId: null,
     operation: null,
     cancelled: false,
 
-    onOperationComplete: function(aOpCalendar, aStatus, aOperationType, aId, aDateTime) {
+    onOperationComplete(aOpCalendar, aStatus, aOperationType, aId, aDateTime) {
       if (this.agendaListbox.mPendingRefreshJobs.has(this.calId)) {
         this.agendaListbox.mPendingRefreshJobs.delete(this.calId);
       }
 
       if (!this.cancelled) {
         setCurrentEvent();
       }
     },
 
-    onGetResult: function(aOpCalendar, aStatus, aItemType, aDetail, aItems) {
+    onGetResult(aOpCalendar, aStatus, aItemType, aDetail, aItems) {
       if (this.cancelled || !Components.isSuccessCode(aStatus)) {
         return;
       }
       for (let item of aItems) {
         this.agendaListbox.addItem(item);
       }
     },
 
-    cancel: function() {
+    cancel() {
       this.cancelled = true;
       let operation = cal.wrapInstance(this.operation, Ci.calIOperation);
       if (operation && operation.isPending) {
         operation.cancel();
         this.operation = null;
       }
     },
 
-    execute: function() {
+    execute() {
       if (!(aStart || aEnd || aCalendar)) {
         this.agendaListbox.removeListItems();
       }
 
       if (!aCalendar) {
         aCalendar = this.agendaListbox.calendar;
       }
       if (!aStart) {
@@ -850,24 +849,24 @@ agendaListbox.getListItemByHashId = func
   } while (!leaveloop);
   return null;
 };
 
 /**
  * The operation listener used for calendar queries.
  * Implements calIOperationListener.
  */
-agendaListbox.calendarOpListener = { agendaListbox: agendaListbox };
+agendaListbox.calendarOpListener = { agendaListbox };
 
 /**
  * Calendar and composite observer, used to keep agenda listbox up to date.
  * @see calIObserver
  * @see calICompositeObserver
  */
-agendaListbox.calendarObserver = { agendaListbox: agendaListbox };
+agendaListbox.calendarObserver = { agendaListbox };
 
 agendaListbox.calendarObserver.QueryInterface = cal.generateQI([
   Ci.calIObserver,
   Ci.calICompositeObserver,
 ]);
 
 // calIObserver:
 agendaListbox.calendarObserver.onStartBatch = function() {
@@ -1068,27 +1067,27 @@ var gEventTimer;
  * @param aMsUntil              The number of milliseconds until the next event
  *                                is current.
  */
 function scheduleNextCurrentEventUpdate(aRefreshCallback, aMsUntil) {
   // Is an nsITimer/callback extreme overkill here? Yes, but it's necessary to
   // workaround bug 291386.  If we don't, we stand a decent chance of getting
   // stuck in an infinite loop.
   let udCallback = {
-    notify: function(timer) {
+    notify(timer) {
       aRefreshCallback();
     },
   };
 
   if (gEventTimer) {
     gEventTimer.cancel();
   } else {
     // Observer for wake after sleep/hibernate/standby to create new timers and refresh UI
     let wakeObserver = {
-      observe: function(aSubject, aTopic, aData) {
+      observe(aSubject, aTopic, aData) {
         if (aTopic == "wake_notification") {
           aRefreshCallback();
         }
       },
     };
     // Add observer
     Services.obs.addObserver(wakeObserver, "wake_notification");
 
--- a/calendar/base/content/calendar-chrome-startup.js
+++ b/calendar/base/content/calendar-chrome-startup.js
@@ -101,36 +101,36 @@ function commonFinishCalendar() {
  * there are more prefs that need to be observed on a global basis that don't fit
  * into the calendar manager.
  */
 var calendarWindowPrefs = {
   /** nsISupports QueryInterface */
   QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
   /** Initialize the preference observers */
-  init: function() {
+  init() {
     Services.prefs.addObserver("calendar.view.useSystemColors", this);
     Services.ww.registerNotification(this);
 
     // Trigger setting pref on all open windows
     this.observe(null, "nsPref:changed", "calendar.view.useSystemColors");
   },
 
   /**  Cleanup the preference observers */
-  cleanup: function() {
+  cleanup() {
     Services.prefs.removeObserver("calendar.view.useSystemColors", this);
     Services.ww.unregisterNotification(this);
   },
 
   /**
    * Observer function called when a pref has changed
    *
    * @see nsIObserver
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == "nsPref:changed") {
       switch (aData) {
         case "calendar.view.useSystemColors": {
           let attributeValue =
             Services.prefs.getBoolPref("calendar.view.useSystemColors", false) && "true";
           for (let win of Services.ww.getWindowEnumerator()) {
             setElementValue(win.document.documentElement, attributeValue, "systemcolors");
           }
--- a/calendar/base/content/calendar-command-controller.js
+++ b/calendar/base/content/calendar-command-controller.js
@@ -105,33 +105,34 @@ var calendarController = {
     calendar_in_foreground: true,
     calendar_in_background: true,
     calendar_mode_calendar: true,
     calendar_mode_task: true,
 
     cmd_selectAll: true,
   },
 
-  updateCommands: function() {
+  updateCommands() {
     for (let command in this.commands) {
       goUpdateCommand(command);
     }
   },
 
-  supportsCommand: function(aCommand) {
+  supportsCommand(aCommand) {
     if (aCommand in this.commands) {
       return true;
     }
     if (this.defaultContoller) {
       return this.defaultContoller.supportsCommand(aCommand);
     }
     return false;
   },
 
-  isCommandEnabled: function(aCommand) {
+  /* eslint-disable complexity */
+  isCommandEnabled(aCommand) {
     switch (aCommand) {
       case "calendar_new_event_command":
       case "calendar_new_event_context_command":
       case "calendar_new_event_todaypane_command":
         return CalendarNewEventsCommandEnabled;
       case "calendar_modify_focused_item_command":
         return this.item_selected;
       case "calendar_modify_event_command":
@@ -275,18 +276,19 @@ var calendarController = {
         }
         if (aCommand in this.commands) {
           // All other commands we support should be enabled by default
           return true;
         }
     }
     return false;
   },
+  /* eslint-enable complexity */
 
-  doCommand: function(aCommand) {
+  doCommand(aCommand) {
     switch (aCommand) {
       // Common Commands
       case "calendar_new_event_command":
         createEventWithDialog(
           getSelectedCalendar(),
           cal.dtz.getDefaultStartDate(currentView().selectedDay)
         );
         break;
@@ -457,35 +459,35 @@ var calendarController = {
         if (this.defaultController && !this.isCalendarInForeground()) {
           // If calendar is not in foreground, let the default controller take
           // care. If we don't have a default controller, just continue.
           this.defaultController.doCommand(aCommand);
         }
     }
   },
 
-  onEvent: function(aEvent) {},
+  onEvent(aEvent) {},
 
-  isCalendarInForeground: function() {
+  isCalendarInForeground() {
     return gCurrentMode && gCurrentMode != "mail";
   },
 
-  isInMode: function(mode) {
+  isInMode(mode) {
     switch (mode) {
       case "mail":
         return !this.isCalendarInForeground();
       case "calendar":
         return gCurrentMode && gCurrentMode == "calendar";
       case "task":
         return gCurrentMode && gCurrentMode == "task";
     }
     return false;
   },
 
-  onSelectionChanged: function(aEvent) {
+  onSelectionChanged(aEvent) {
     let selectedItems = aEvent.detail;
 
     calendarUpdateDeleteCommand(selectedItems);
     calendarController.item_selected = selectedItems && selectedItems.length > 0;
 
     let selLength = selectedItems === undefined ? 0 : selectedItems.length;
     let selected_events_readonly = 0;
     let selected_events_requires_network = 0;
@@ -704,17 +706,17 @@ var calendarController2 = {
     cmd_showQuickFilterBar: true,
   },
 
   // These functions can use the same from the calendar controller for now.
   updateCommands: calendarController.updateCommands,
   supportsCommand: calendarController.supportsCommand,
   onEvent: calendarController.onEvent,
 
-  isCommandEnabled: function(aCommand) {
+  isCommandEnabled(aCommand) {
     switch (aCommand) {
       // Thunderbird Commands
       case "cmd_cut":
         return calendarController.selected_items_writable;
       case "cmd_copy":
         return calendarController.item_selected;
       case "cmd_paste":
         return canPaste();
@@ -736,17 +738,17 @@ var calendarController2 = {
         return false;
       case "cmd_showQuickFilterBar":
         return calendarController.isInMode("task");
       default:
         return true;
     }
   },
 
-  doCommand: function(aCommand) {
+  doCommand(aCommand) {
     if (!this.isCommandEnabled(aCommand)) {
       // doCommand is triggered for cmd_cut even if the command is disabled
       // so we bail out here
       return;
     }
     switch (aCommand) {
       case "cmd_cut":
         cutToClipboard();
--- a/calendar/base/content/calendar-dnd-listener.js
+++ b/calendar/base/content/calendar-dnd-listener.js
@@ -18,17 +18,17 @@ var { AppConstants } = ChromeUtils.impor
 
 var itemConversion = {
   /**
    * Converts an email message to a calendar item.
    *
    * @param aItem     The target calIItemBase.
    * @param aMessage  The nsIMsgHdr to convert from.
    */
-  calendarItemFromMessage: function(aItem, aMsgHdr) {
+  calendarItemFromMessage(aItem, aMsgHdr) {
     let msgFolder = aMsgHdr.folder;
     let msgUri = msgFolder.getUriForMsg(aMsgHdr);
 
     aItem.calendar = getSelectedCalendar();
     aItem.title = aMsgHdr.mime2DecodedSubject;
 
     cal.dtz.setDefaultStartEndHour(aItem);
     cal.alarms.setDefaultValues(aItem);
@@ -57,17 +57,17 @@ var itemConversion = {
   /**
    * Copy base item properties from aItem to aTarget. This includes properties
    * like title, location, description, priority, transparency,
    * attendees, categories, calendar, recurrence and possibly more.
    *
    * @param aItem     The item to copy from.
    * @param aTarget   the item to copy to.
    */
-  copyItemBase: function(aItem, aTarget) {
+  copyItemBase(aItem, aTarget) {
     const copyProps = ["SUMMARY", "LOCATION", "DESCRIPTION", "URL", "CLASS", "PRIORITY"];
 
     for (let prop of copyProps) {
       aTarget.setProperty(prop, aItem.getProperty(prop));
     }
 
     // Attendees
     let attendees = aItem.getAttendees();
@@ -94,17 +94,17 @@ var itemConversion = {
 
   /**
    * Creates a task from the passed event. This function copies the base item
    * and a few event specific properties (dates, alarms, ...).
    *
    * @param aEvent    The event to copy from.
    * @return          The resulting task.
    */
-  taskFromEvent: function(aEvent) {
+  taskFromEvent(aEvent) {
     let item = cal.createTodo();
 
     this.copyItemBase(aEvent, item);
 
     // Dates and alarms
     if (!aEvent.startDate.isDate && !aEvent.endDate.isDate) {
       // Dates
       item.entryDate = aEvent.startDate.clone();
@@ -132,17 +132,17 @@ var itemConversion = {
   /**
    * Creates an event from the passed task. This function copies the base item
    * and a few task specific properties (dates, alarms, ...). If the task has
    * no due date, the default event length is used.
    *
    * @param aTask     The task to copy from.
    * @return          The resulting event.
    */
-  eventFromTask: function(aTask) {
+  eventFromTask(aTask) {
     let item = cal.createEvent();
 
     this.copyItemBase(aTask, item);
 
     // Dates and alarms
     item.startDate = aTask.entryDate;
     if (!item.startDate) {
       if (aTask.dueDate) {
@@ -186,33 +186,33 @@ var itemConversion = {
  * @class calDNDBaseObserver
  */
 function calDNDBaseObserver() {
   cal.ASSERT(false, "Inheriting objects call calDNDBaseObserver!");
 }
 
 calDNDBaseObserver.prototype = {
   // initialize this class's members
-  initBase: function() {},
+  initBase() {},
 
-  getSupportedFlavours: function() {
+  getSupportedFlavours() {
     let flavourSet = new FlavourSet();
     flavourSet.appendFlavour("text/calendar");
     flavourSet.appendFlavour("text/x-moz-url");
     flavourSet.appendFlavour("text/x-moz-message");
     flavourSet.appendFlavour("text/unicode");
     flavourSet.appendFlavour("application/x-moz-file");
     return flavourSet;
   },
 
   /**
    * Action to take when dropping the event.
    */
 
-  onDrop: function(aEvent, aTransferData, aDragSession) {
+  onDrop(aEvent, aTransferData, aDragSession) {
     let transferable = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
     transferable.init(null);
     transferable.addDataFlavor("text/calendar");
     transferable.addDataFlavor("text/x-moz-url");
     transferable.addDataFlavor("text/x-moz-message");
     transferable.addDataFlavor("text/unicode");
     transferable.addDataFlavor("application/x-moz-file");
 
@@ -284,17 +284,17 @@ calDNDBaseObserver.prototype = {
           Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
           Ci.nsIContentPolicy.TYPE_OTHER
         );
         channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;
 
         let self = this;
 
         let listener = {
-          onStreamComplete: function(aLoader, aContext, aStatus, aResultLength, aResult) {
+          onStreamComplete(aLoader, aContext, aStatus, aResultLength, aResult) {
             let parser = Cc["@mozilla.org/calendar/ics-parser;1"].createInstance(Ci.calIIcsParser);
             let encoding = channel.contentCharset || "utf-8";
             let result = aResultLength
               ? new TextDecoder(encoding).decode(Uint8Array.from(aResult))
               : "";
             parser.parseString(result);
             self.onDropItems(parser.getItems().concat(parser.getParentlessItems()));
           },
@@ -314,24 +314,24 @@ calDNDBaseObserver.prototype = {
         break;
       }
       default:
         cal.ASSERT(false, "unknown data flavour:" + bestFlavor.value + "\n");
         break;
     }
   },
 
-  onDragStart: function(aEvent, aTransferData, aDragAction) {},
-  onDragOver: function(aEvent, aFlavor, aDragSession) {},
-  onDragExit: function(aEvent, aDragSession) {},
+  onDragStart(aEvent, aTransferData, aDragAction) {},
+  onDragOver(aEvent, aFlavor, aDragSession) {},
+  onDragExit(aEvent, aDragSession) {},
 
-  onDropItems: function(aItems) {},
-  onDropMessage: function(aMessage) {},
+  onDropItems(aItems) {},
+  onDropMessage(aMessage) {},
 
-  retrieveURLFromData: function(aData, aFlavor) {
+  retrieveURLFromData(aData, aFlavor) {
     switch (aFlavor) {
       case "text/unicode": {
         let data = aData.toString();
         let separator = data.indexOf("\n");
         if (separator != -1) {
           data = data.substr(0, separator);
         }
         return data;
@@ -360,17 +360,17 @@ calViewDNDObserver.prototype = {
 
   /**
    * calViewDNDObserver::onDropItems
    *
    * Gets called in case we're dropping an array of items
    * on one of the calendar views. In this case we just
    * try to add these items to the currently selected calendar.
    */
-  onDropItems: function(aItems) {
+  onDropItems(aItems) {
     let destCal = getSelectedCalendar();
     startBatchTransaction();
     // we fall back explicitly to the popup to ask whether to send a
     // notification to participants if required
     let extResp = { responseMode: Ci.calIItipItem.USER };
     try {
       for (let item of aItems) {
         doTransaction("add", item, destCal, null, null, extResp);
@@ -398,17 +398,17 @@ calMailButtonDNDObserver.prototype = {
   /**
    * calMailButtonDNDObserver::onDropItems
    *
    * Gets called in case we're dropping an array of items
    * on the 'mail mode'-button.
    *
    * @param aItems        An array of items to handle.
    */
-  onDropItems: function(aItems) {
+  onDropItems(aItems) {
     if (aItems && aItems.length > 0) {
       let item = aItems[0];
       let identity = item.calendar.getProperty("imip.identity");
       let parties = item.getAttendees();
       if (item.organizer) {
         parties.push(item.organizer);
       }
       if (identity) {
@@ -428,17 +428,17 @@ calMailButtonDNDObserver.prototype = {
   /**
    * calMailButtonDNDObserver::onDropMessage
    *
    * Gets called in case we're dropping a message
    * on the 'mail mode'-button.
    *
    * @param aMessage     The message to handle.
    */
-  onDropMessage: function(aMessage) {},
+  onDropMessage(aMessage) {},
 };
 
 /**
  * calCalendarButtonDNDObserver::calCalendarButtonDNDObserver
  *
  * Drag'n'drop handler for the 'calendar mode'-button. This handler is
  * derived from the base handler and just implements specific actions.
  */
@@ -453,17 +453,17 @@ calCalendarButtonDNDObserver.prototype =
   /**
    * calCalendarButtonDNDObserver::onDropItems
    *
    * Gets called in case we're dropping an array of items
    * on the 'calendar mode'-button.
    *
    * @param aItems        An array of items to handle.
    */
-  onDropItems: function(aItems) {
+  onDropItems(aItems) {
     for (let item of aItems) {
       let newItem = item;
       if (cal.item.isToDo(item)) {
         newItem = itemConversion.eventFromTask(item);
       }
       createEventWithDialog(null, null, null, null, newItem);
     }
   },
@@ -473,17 +473,17 @@ calCalendarButtonDNDObserver.prototype =
    *
    * Gets called in case we're dropping a message on the
    * 'calendar mode'-button. In this case we create a new
    * event from the mail. We open the default event dialog
    * and just use the subject of the message as the event title.
    *
    * @param aMessage     The message to handle.
    */
-  onDropMessage: function(aMessage) {
+  onDropMessage(aMessage) {
     let newItem = cal.createEvent();
     itemConversion.calendarItemFromMessage(newItem, aMessage);
     createEventWithDialog(null, null, null, null, newItem);
   },
 };
 
 /**
  * calTaskButtonDNDObserver::calTaskButtonDNDObserver
@@ -502,17 +502,17 @@ calTaskButtonDNDObserver.prototype = {
   /**
    * calTaskButtonDNDObserver::onDropItems
    *
    * Gets called in case we're dropping an array of items
    * on the 'task mode'-button.
    *
    * @param aItems        An array of items to handle.
    */
-  onDropItems: function(aItems) {
+  onDropItems(aItems) {
     for (let item of aItems) {
       let newItem = item;
       if (cal.item.isEvent(item)) {
         newItem = itemConversion.taskFromEvent(item);
       }
       createTodoWithDialog(null, null, null, newItem);
     }
   },
@@ -520,17 +520,17 @@ calTaskButtonDNDObserver.prototype = {
   /**
    * calTaskButtonDNDObserver::onDropMessage
    *
    * Gets called in case we're dropping a message
    * on the 'task mode'-button.
    *
    * @param aMessage     The message to handle.
    */
-  onDropMessage: function(aMessage) {
+  onDropMessage(aMessage) {
     let todo = cal.createTodo();
     itemConversion.calendarItemFromMessage(todo, aMessage);
     createTodoWithDialog(null, null, null, todo);
   },
 };
 
 /**
  * Invoke a drag session for the passed item. The passed box will be used as a
@@ -543,17 +543,17 @@ function invokeEventDragSession(aItem, a
   let transfer = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
   transfer.init(null);
   transfer.addDataFlavor("text/calendar");
 
   let flavourProvider = {
     QueryInterface: ChromeUtils.generateQI([Ci.nsIFlavorDataProvider]),
 
     item: aItem,
-    getFlavorData: function(aInTransferable, aInFlavor, aOutData) {
+    getFlavorData(aInTransferable, aInFlavor, aOutData) {
       if (
         aInFlavor == "application/vnd.x-moz-cal-event" ||
         aInFlavor == "application/vnd.x-moz-cal-task"
       ) {
         aOutData.value = aItem;
       } else {
         cal.ASSERT(false, "error:" + aInFlavor);
       }
--- a/calendar/base/content/calendar-event-column.js
+++ b/calendar/base/content/calendar-event-column.js
@@ -425,18 +425,18 @@
       // if the event starts one or more days before the date of this column.
       let realStart = (durstart.days * 24 + durstart.hours) * 60 + durstart.minutes;
       realStart = durstart.isNegative ? -1 * realStart : realStart;
       let realEnd = (durend.days * 24 + durend.hours) * 60 + durend.minutes;
 
       return {
         start: startHour * 60 + startMinute,
         end: endHour * 60 + endMinute,
-        realStart: realStart,
-        realEnd: realEnd,
+        realStart,
+        realEnd,
       };
     }
 
     createChunk(occurrence) {
       let mins = this.getStartEndMinutesForOccurrence(occurrence);
 
       let chunk = {
         startMinute: mins.start,
@@ -1101,19 +1101,19 @@
         startMin = this.mEndMin - (reminder ? reminder : this.mEndMin);
       } else {
         startMin = start;
       }
       shadows += Math.floor(end / this.mEndMin);
 
       // Return values needed to build the shadows while dragging.
       return {
-        shadows: shadows, // Number of shadows.
-        offset: offset, // Offset first<->selected shadows.
-        startMin: startMin, // First shadow start minute.
+        shadows, // Number of shadows.
+        offset, // Offset first<->selected shadows.
+        startMin, // First shadow start minute.
         endMin: end % this.mEndMin, // Last shadow end minute.
       };
     }
 
     firstLastShadowColumns(offset, shadows) {
       let firstCol = this; // eslint-disable-line consistent-this
       let lastCol = this; // eslint-disable-line consistent-this
       let firstIndex = offset == null ? this.mDragState.offset : offset;
@@ -1127,20 +1127,20 @@
         lastCol = lastCol.nextElementSibling;
         lastIndex++;
       }
 
       // Returns first and last column with shadows that are visible in the
       // week and the positions of these (visible) columns in the set of
       // columns shadows of the occurrence.
       return {
-        firstCol: firstCol,
-        firstIndex: firstIndex,
-        lastCol: lastCol,
-        lastIndex: lastIndex,
+        firstCol,
+        firstIndex,
+        lastCol,
+        lastIndex,
       };
     }
 
     updateShadowsBoxes(aStart, aEnd, aCurrentOffset, aCurrentShadows, aSizeattr) {
       let lateralColumns = this.firstLastShadowColumns(aCurrentOffset, aCurrentShadows);
       let firstCol = lateralColumns.firstCol;
       let firstIndex = lateralColumns.firstIndex;
       let lastCol = lateralColumns.lastCol;
--- a/calendar/base/content/calendar-extract.js
+++ b/calendar/base/content/calendar-extract.js
@@ -5,17 +5,17 @@
 /* import-globals-from ../../../mail/base/content/msgMail3PaneWindow.js */
 /* import-globals-from calendar-item-editing.js */
 
 var { Extractor } = ChromeUtils.import("resource:///modules/calendar/calExtract.jsm");
 var { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var calendarExtract = {
-  onShowLocaleMenu: function(target) {
+  onShowLocaleMenu(target) {
     let localeList = document.getElementById(target.id);
     let langs = [];
     let chrome = Cc["@mozilla.org/chrome/chrome-registry;1"]
       .getService(Ci.nsIXULChromeRegistry)
       .QueryInterface(Ci.nsIToolkitChromeRegistry);
     let langRegex = /^(([^-]+)-*(.*))$/;
 
     for (let locale of chrome.getLocalesForPackage("calendar")) {
@@ -45,34 +45,33 @@ var calendarExtract = {
       let idx_b = lastUsedLangs.indexOf(b[1]);
 
       if (idx_a == -1 && idx_b == -1) {
         return a[0].localeCompare(b[0]);
       } else if (idx_a != -1 && idx_b != -1) {
         return idx_a - idx_b;
       } else if (idx_a == -1) {
         return 1;
-      } else {
-        return -1;
       }
+      return -1;
     });
     removeChildren(localeList);
 
     for (let lang of langs) {
       addMenuItem(localeList, lang[0], lang[1], null);
     }
   },
 
-  extractWithLocale: function(event, isEvent) {
+  extractWithLocale(event, isEvent) {
     event.stopPropagation();
     let locale = event.target.value;
     this.extractFromEmail(isEvent, true, locale);
   },
 
-  extractFromEmail: function(isEvent, fixedLang, fixedLocale) {
+  extractFromEmail(isEvent, fixedLang, fixedLocale) {
     // TODO would be nice to handle multiple selected messages,
     // though old conversion functionality didn't
     let message = gFolderDisplay.selectedMessage;
     let messenger = Cc["@mozilla.org/messenger;1"].createInstance(Ci.nsIMessenger);
     let listener = Cc["@mozilla.org/network/sync-stream-listener;1"].createInstance(
       Ci.nsISyncStreamListener
     );
     let uri = message.folder.getUriForMsg(message);
@@ -212,34 +211,34 @@ var calendarExtract = {
     let timeSpent = new Date().getTime() - time;
     cal.LOG(
       "[calExtract] Total time spent for conversion (including loading of dictionaries): " +
         timeSpent +
         "ms"
     );
   },
 
-  addListeners: function() {
+  addListeners() {
     if (window.top.document.location == "chrome://messenger/content/messenger.xhtml") {
       // covers initial load and folder change
       let folderTree = document.getElementById("folderTree");
       folderTree.addEventListener("select", this.setState);
 
       // covers selection change in a folder
       let msgTree = window.top.GetThreadTree();
       msgTree.addEventListener("select", this.setState);
 
       window.addEventListener("unload", () => {
         folderTree.removeEventListener("select", this.setState);
         msgTree.removeEventListener("select", this.setState);
       });
     }
   },
 
-  setState: function() {
+  setState() {
     let eventButton = document.getElementById("extractEventButton");
     let taskButton = document.getElementById("extractTaskButton");
     let contextMenu = document.getElementById("mailContext-calendar-convert-menu");
     let contextMenuEvent = document.getElementById("mailContext-calendar-convert-event-menuitem");
     let contextMenuTask = document.getElementById("mailContext-calendar-convert-task-menuitem");
     let eventDisabled = gFolderDisplay.selectedCount == 0;
     let taskDisabled = gFolderDisplay.selectedCount == 0;
     let contextEventDisabled = false;
--- a/calendar/base/content/calendar-invitations-manager.js
+++ b/calendar/base/content/calendar-invitations-manager.js
@@ -14,26 +14,26 @@ var gInvitationsRequestManager = {
   mRequestStatusList: {},
 
   /**
    * Add a request to the request manager.
    *
    * @param calendar    The calendar to add for.
    * @param op          The operation to add
    */
-  addRequestStatus: function(calendar, operation) {
+  addRequestStatus(calendar, operation) {
     if (operation) {
       this.mRequestStatusList[calendar.id] = operation;
     }
   },
 
   /**
    * Cancel all pending requests
    */
-  cancelPendingRequests: function() {
+  cancelPendingRequests() {
     for (let id in this.mRequestStatusList) {
       let request = this.mRequestStatusList[id];
       if (request && request.isPending) {
         request.cancel(null);
       }
     }
     this.mRequestStatusList = {};
   },
@@ -79,45 +79,45 @@ InvitationsManager.prototype = {
   mTimer: null,
 
   /**
    * Schedule an update for the invitations manager asynchronously.
    *
    * @param firstDelay          The timeout before the operation should start.
    * @param operationListener   The calIGenericOperationListener to notify.
    */
-  scheduleInvitationsUpdate: function(firstDelay, operationListener) {
+  scheduleInvitationsUpdate(firstDelay, operationListener) {
     this.cancelInvitationsUpdate();
 
     this.mTimer = setTimeout(() => {
       if (Services.prefs.getBoolPref("calendar.invitations.autorefresh.enabled", true)) {
         this.mTimer = setInterval(() => {
           this.getInvitations(operationListener);
         }, Services.prefs.getIntPref("calendar.invitations.autorefresh.timeout", 3) * 60000);
       }
       this.getInvitations(operationListener);
     }, firstDelay);
   },
 
   /**
    * Cancel pending any pending invitations update.
    */
-  cancelInvitationsUpdate: function() {
+  cancelInvitationsUpdate() {
     clearTimeout(this.mTimer);
   },
 
   /**
    * Retrieve invitations from all calendars. Notify all passed
    * operation listeners.
    *
    * @param operationListener1    The first operation listener to notify.
    * @param operationListener2    (optional) The second operation listener to
    *                                notify.
    */
-  getInvitations: function(operationListener1, operationListener2) {
+  getInvitations(operationListener1, operationListener2) {
     let listeners = [];
     if (operationListener1) {
       listeners.push(operationListener1);
     }
     if (operationListener2) {
       listeners.push(operationListener2);
     }
 
@@ -130,17 +130,17 @@ InvitationsManager.prototype = {
     let opListener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
       mCount: cals.length,
       mRequestManager: gInvitationsRequestManager,
       mInvitationsManager: this,
       mHandledItems: {},
 
       // calIOperationListener
-      onOperationComplete: function(aCalendar, aStatus, aOperationType, aId, aDetail) {
+      onOperationComplete(aCalendar, aStatus, aOperationType, aId, aDetail) {
         if (--this.mCount == 0) {
           this.mInvitationsManager.mItemList.sort((a, b) => {
             return a.startDate.compare(b.startDate);
           });
           for (let listener of listeners) {
             try {
               if (this.mInvitationsManager.mItemList.length) {
                 // Only call if there are actually items
@@ -161,17 +161,17 @@ InvitationsManager.prototype = {
               );
             } catch (exc) {
               cal.ERROR(exc);
             }
           }
         }
       },
 
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
+      onGetResult(aCalendar, aStatus, aItemType, aDetail, aItems) {
         if (Components.isSuccessCode(aStatus)) {
           for (let item of aItems) {
             // we need to retrieve by occurrence to properly filter exceptions,
             // should be fixed with bug 416975
             item = item.parentItem;
             let hid = item.hashId;
             if (!this.mHandledItems[hid]) {
               this.mHandledItems[hid] = true;
@@ -225,17 +225,17 @@ InvitationsManager.prototype = {
    * sounds fishy to me. Maybe there is a more encapsulated solution.
    *
    * @param onLoadOpListener          The operation listener to notify when
    *                                    getting invitations. Should be passed
    *                                    to this.getInvitations().
    * @param finishedCallBack          A callback function to call when the
    *                                    dialog has completed.
    */
-  openInvitationsDialog: function(onLoadOpListener, finishedCallBack) {
+  openInvitationsDialog(onLoadOpListener, finishedCallBack) {
     let args = {};
     args.onLoadOperationListener = onLoadOpListener;
     args.queue = [];
     args.finishedCallBack = finishedCallBack;
     args.requestManager = gInvitationsRequestManager;
     args.invitationsManager = this;
     // the dialog will reset this to auto when it is done loading
     window.setCursor("wait");
@@ -252,41 +252,41 @@ InvitationsManager.prototype = {
    * Process the passed job queue. A job is an object that consists of an
    * action, a newItem and and oldItem. This processor only takes "modify"
    * operations into account.
    *
    * @param queue                         The array of objects to process.
    * @param jobQueueFinishedCallBack      A callback function called when
    *                                        job has finished.
    */
-  processJobQueue: function(queue, jobQueueFinishedCallBack) {
+  processJobQueue(queue, jobQueueFinishedCallBack) {
     // TODO: undo/redo
     function operationListener(mgr, queueCallback, oldItem_) {
       this.mInvitationsManager = mgr;
       this.mJobQueueFinishedCallBack = queueCallback;
       this.mOldItem = oldItem_;
     }
     operationListener.prototype = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-      onOperationComplete: function(aCalendar, aStatus, aOperationType, aId, aDetail) {
+      onOperationComplete(aCalendar, aStatus, aOperationType, aId, aDetail) {
         if (
           Components.isSuccessCode(aStatus) &&
           aOperationType == Ci.calIOperationListener.MODIFY
         ) {
           cal.itip.checkAndSend(aOperationType, aDetail, this.mOldItem);
           this.mInvitationsManager.deleteItem(aDetail);
           this.mInvitationsManager.addItem(aDetail);
         }
         this.mInvitationsManager.mJobsPending--;
         if (this.mInvitationsManager.mJobsPending == 0 && this.mJobQueueFinishedCallBack) {
           this.mJobQueueFinishedCallBack();
         }
       },
 
-      onGetResult: function(calendar, status, itemType, detail, items) {},
+      onGetResult(calendar, status, itemType, detail, items) {},
     };
 
     this.mJobsPending = 0;
     for (let i = 0; i < queue.length; i++) {
       let job = queue[i];
       let oldItem = job.oldItem;
       let newItem = job.newItem;
       switch (job.action) {
@@ -309,28 +309,28 @@ InvitationsManager.prototype = {
 
   /**
    * Checks if the internal item list contains the given item
    * XXXdbo       Please document these correctly.
    *
    * @param item      The item to look for.
    * @return          A boolean value indicating if the item was found.
    */
-  hasItem: function(item) {
+  hasItem(item) {
     let hid = item.hashId;
     return this.mItemList.some(item_ => hid == item_.hashId);
   },
 
   /**
    * Adds an item to the internal item list.
    * XXXdbo       Please document these correctly.
    *
    * @param item      The item to add.
    */
-  addItem: function(item) {
+  addItem(item) {
     let recInfo = item.recurrenceInfo;
     if (recInfo && !cal.itip.isOpenInvitation(item)) {
       // scan exceptions:
       let ids = recInfo.getExceptionIds();
       for (let id of ids) {
         let ex = recInfo.getExceptionFor(id);
         if (ex && this.validateItem(ex) && !this.hasItem(ex)) {
           this.mItemList.push(ex);
@@ -342,49 +342,49 @@ InvitationsManager.prototype = {
   },
 
   /**
    * Removes an item from the internal item list
    * XXXdbo       Please document these correctly.
    *
    * @param item      The item to remove.
    */
-  deleteItem: function(item) {
+  deleteItem(item) {
     let id = item.id;
     this.mItemList.filter(item_ => id != item_.id);
   },
 
   /**
    * Remove all items from the internal item list
    * XXXdbo       Please document these correctly.
    */
-  deleteAllItems: function() {
+  deleteAllItems() {
     this.mItemList = [];
   },
 
   /**
    * Helper function to create a start date to search from. This date is the
    * current time with hour/minute/second set to zero.
    *
    * @return      Potential start date.
    */
-  getStartDate: function() {
+  getStartDate() {
     let date = cal.dtz.now();
     date.second = 0;
     date.minute = 0;
     date.hour = 0;
     return date;
   },
 
   /**
    * Updates the start date for the invitations manager to the date returned
    * from this.getStartDate(), unless the previously existing start date is
    * the same or after what getStartDate() returned.
    */
-  updateStartDate: function() {
+  updateStartDate() {
     if (this.mStartDate) {
       let startDate = this.getStartDate();
       if (startDate.compare(this.mStartDate) > 0) {
         this.mStartDate = startDate;
       }
     } else {
       this.mStartDate = this.getStartDate();
     }
@@ -393,16 +393,16 @@ InvitationsManager.prototype = {
   /**
    * Checks if the item is valid for the invitation manager. Checks if the
    * item is in the range of the invitation manager and if the item is a valid
    * invitation.
    *
    * @param item      The item to check
    * @return          A boolean indicating if the item is a valid invitation.
    */
-  validateItem: function(item) {
+  validateItem(item) {
     if (item.calendar instanceof Ci.calISchedulingSupport && !item.calendar.isInvitation(item)) {
       return false; // exclude if organizer has invited himself
     }
     let start = item[cal.dtz.startDateProp(item)] || item[cal.dtz.endDateProp(item)];
     return cal.itip.isOpenInvitation(item) && start.compare(this.mStartDate) >= 0;
   },
 };
--- a/calendar/base/content/calendar-item-editing.js
+++ b/calendar/base/content/calendar-item-editing.js
@@ -465,25 +465,24 @@ function openEventDialog(
       !cal.acl.userCanAddItemsToCalendar(calendar) ||
       !isItemSupported(calendar))
   ) {
     if (calendars.length < 1) {
       // There are no writable calendars or no calendar supports the given
       // item. Don't show the dialog.
       disposeJob(job);
       return;
-    } else {
-      // Pick the first calendar that supports the item and is writable
-      calendar = calendars[0];
-      if (calendarItem) {
-        // XXX The dialog currently uses the items calendar as a first
-        // choice. Since we are shortly before a release to keep
-        // regression risk low, explicitly set the item's calendar here.
-        calendarItem.calendar = calendars[0];
-      }
+    }
+    // Pick the first calendar that supports the item and is writable
+    calendar = calendars[0];
+    if (calendarItem) {
+      // XXX The dialog currently uses the items calendar as a first
+      // choice. Since we are shortly before a release to keep
+      // regression risk low, explicitly set the item's calendar here.
+      calendarItem.calendar = calendars[0];
     }
   }
 
   // Setup the window arguments
   let args = {};
   args.calendarEvent = calendarItem;
   args.calendar = calendar;
   args.mode = mode;
@@ -604,17 +603,17 @@ function promptOccurrenceModification(aI
   let items = Array.isArray(aItem) ? aItem : [aItem];
 
   // Check if this actually is an instance of a recurring event
   if (items.every(item => item == item.parentItem)) {
     type = MODIFY_PARENT;
   } else if (aItem && items.length) {
     // Prompt the user. Setting modal blocks the dialog until it is closed. We
     // use rv to pass our return value.
-    let rv = { value: CANCEL, items: items, action: aAction };
+    let rv = { value: CANCEL, items, action: aAction };
     window.openDialog(
       "chrome://calendar/content/calendar-occurrence-prompt.xhtml",
       "PromptOccurrenceModification",
       "centerscreen,chrome,modal,titlebar",
       rv
     );
     type = rv.value;
   }
--- a/calendar/base/content/calendar-management.js
+++ b/calendar/base/content/calendar-management.js
@@ -607,43 +607,43 @@ function showOnlyCalendar(aCalendar) {
   }
   composite.addCalendar(aCalendar);
   composite.endBatch();
 }
 
 var compositeObserver = {
   QueryInterface: cal.generateQI([Ci.calIObserver, Ci.calICompositeObserver]),
 
-  onStartBatch: function() {},
-  onEndBatch: function() {},
-  onAddItem: function() {},
-  onModifyItem: function() {},
-  onDeleteItem: function() {},
-  onError: function() {},
-  onPropertyChanged: function() {},
-  onPropertyDeleting: function() {},
+  onStartBatch() {},
+  onEndBatch() {},
+  onAddItem() {},
+  onModifyItem() {},
+  onDeleteItem() {},
+  onError() {},
+  onPropertyChanged() {},
+  onPropertyDeleting() {},
 
-  onLoad: function() {
+  onLoad() {
     calendarUpdateNewItemsCommand();
     document.commandDispatcher.updateCommands("calendar_commands");
   },
 
-  onCalendarAdded: function(aCalendar) {
+  onCalendarAdded(aCalendar) {
     // Update the calendar commands for number of remote calendars and for
     // more than one calendar
     document.commandDispatcher.updateCommands("calendar_commands");
   },
 
-  onCalendarRemoved: function(aCalendar) {
+  onCalendarRemoved(aCalendar) {
     // Update commands to disallow deleting the last calendar and only
     // allowing reload remote calendars when there are remote calendars.
     document.commandDispatcher.updateCommands("calendar_commands");
   },
 
-  onDefaultCalendarChanged: function(aNewCalendar) {
+  onDefaultCalendarChanged(aNewCalendar) {
     // A new default calendar may mean that the new calendar has different
     // ACLs. Make sure the commands are updated.
     calendarUpdateNewItemsCommand();
     document.commandDispatcher.updateCommands("calendar_commands");
   },
 };
 
 /**
@@ -662,44 +662,44 @@ function openCalendarSubscriptionsDialog
 }
 
 /**
  * Calendar Offline Manager
  */
 var calendarOfflineManager = {
   QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
-  init: function() {
+  init() {
     if (this.initialized) {
       throw Cr.NS_ERROR_ALREADY_INITIALIZED;
     }
     Services.obs.addObserver(this, "network:offline-status-changed");
 
     this.updateOfflineUI(!this.isOnline());
     this.initialized = true;
   },
 
-  uninit: function() {
+  uninit() {
     if (!this.initialized) {
       throw Cr.NS_ERROR_NOT_INITIALIZED;
     }
     Services.obs.removeObserver(this, "network:offline-status-changed");
     this.initialized = false;
   },
 
-  isOnline: function() {
+  isOnline() {
     return !Services.io.offline;
   },
 
-  updateOfflineUI: function(aIsOffline) {
+  updateOfflineUI(aIsOffline) {
     // Refresh the current view
     currentView().goToDay(currentView().selectedDay);
 
     // Set up disabled locks for offline
     document.commandDispatcher.updateCommands("calendar_commands");
   },
 
-  observe: function(aSubject, aTopic, aState) {
+  observe(aSubject, aTopic, aState) {
     if (aTopic == "network:offline-status-changed") {
       this.updateOfflineUI(aState == "offline");
     }
   },
 };
--- a/calendar/base/content/calendar-migration.js
+++ b/calendar/base/content/calendar-migration.js
@@ -42,17 +42,17 @@ var gDataMigrator = {
 
   /**
    * Call to do a general data migration (for a clean profile)  Will run
    * through all of the known migrator-checkers.  These checkers will return
    * an array of valid dataMigrator objects, for each kind of data they find.
    * If there is at least one valid migrator, we'll pop open the migration
    * wizard, otherwise, we'll return silently.
    */
-  checkAndMigrate: function() {
+  checkAndMigrate() {
     if (Services.appinfo.ID == FIREFOX_UID) {
       this.mIsInFirefox = true;
       // We can't handle Firefox Lightning yet
       console.debug("Holy cow, you're Firefox-Lightning! sorry, can't help.");
       return;
     }
 
     this.mPlatform = Services.appinfo.OS.toLowerCase();
@@ -92,17 +92,17 @@ var gDataMigrator = {
       );
     }
   },
 
   /**
    * Checks to see if Apple's iCal is installed and offers to migrate any data
    * the user has created in it.
    */
-  checkIcal: function() {
+  checkIcal() {
     function icalMigrate(aDataDir, aCallback) {
       aDataDir.append("Sources");
       let calManager = cal.getCalendarManager();
 
       let i = 1;
       for (let dataDir of aDataDir.directoryEntries) {
         let dataStore = dataDir.clone();
         dataStore.append("corestorage.ics");
@@ -181,17 +181,17 @@ var gDataMigrator = {
 
     return [];
   },
 
   /**
    * Checks to see if Evolution is installed and offers to migrate any data
    * stored there.
    */
-  checkEvolution: function() {
+  checkEvolution() {
     function evoMigrate(aDataDir, aCallback) {
       let i = 1;
       let evoDataMigrate = function(dataStore) {
         console.debug("Migrating evolution data file in " + dataStore.path);
         if (dataStore.exists()) {
           let calendar = gDataMigrator.importICSToStorage(dataStore);
           calendar.name = "Evolution " + i++;
           calManager.registerCalendar(calendar);
@@ -212,17 +212,17 @@ var gDataMigrator = {
 
     let evoDir = this.dirService.get("Home", Ci.nsIFile);
     evoDir.append(".evolution");
     evoDir.append("calendar");
     evoDir.append("local");
     return evoDir.exists() ? [new dataMigrator("Evolution", evoMigrate, [evoDir])] : [];
   },
 
-  checkWindowsMail: function() {
+  checkWindowsMail() {
     function doMigrate(aCalendarNodes, aMailDir, aCallback) {
       let calManager = cal.getCalendarManager();
 
       for (let node of aCalendarNodes) {
         let name = node.getElementsByTagName("Name")[0].textContent;
         let color = node.getElementsByTagName("Color")[0].textContent;
         let enabled = node.getElementsByTagName("Enabled")[0].textContent == "True";
 
@@ -289,17 +289,17 @@ var gDataMigrator = {
     return migrators;
   },
 
   /**
    * Creates and registers a storage calendar and imports the given ics file into it.
    *
    * @param icsFile     The nsI(Local)File to import.
    */
-  importICSToStorage: function(icsFile) {
+  importICSToStorage(icsFile) {
     const uri = "moz-storage-calendar://";
     let calendar = cal.getCalendarManager().createCalendar("storage", Services.io.newURI(uri));
     let icsImporter = Cc["@mozilla.org/calendar/import;1?type=ics"].getService(Ci.calIImporter);
 
     let inputStream = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(
       Ci.nsIFileInputStream
     );
     let items = [];
--- a/calendar/base/content/calendar-multiday-base-view.js
+++ b/calendar/base/content/calendar-multiday-base-view.js
@@ -391,29 +391,27 @@
       return this.mDateList != null;
     }
 
     get startDate() {
       if (this.mStartDate) {
         return this.mStartDate;
       } else if (this.mDateList && this.mDateList.length > 0) {
         return this.mDateList[0];
-      } else {
-        return null;
       }
+      return null;
     }
 
     get endDate() {
       if (this.mEndDate) {
         return this.mEndDate;
       } else if (this.mDateList && this.mDateList.length > 0) {
         return this.mDateList[this.mDateList.length - 1];
-      } else {
-        return null;
       }
+      return null;
     }
 
     set selectedDay(day) {
       // Ignore if just 1 visible, it's always selected, but we don't indicate it.
       if (this.numVisibleDates == 1) {
         this.fireEvent("dayselect", day);
         return day;
       }
--- a/calendar/base/content/calendar-statusbar.js
+++ b/calendar/base/content/calendar-statusbar.js
@@ -20,36 +20,36 @@ var gCalendarStatusFeedback = {
   mThrobber: null,
   mProgressMode: Ci.calIStatusObserver.NO_PROGRESS,
   mCurIndex: 0,
   mInitialized: false,
   mCalendars: {},
 
   QueryInterface: ChromeUtils.generateQI([Ci.calIStatusObserver]),
 
-  initialize: function(aWindow) {
+  initialize(aWindow) {
     if (!this.mInitialized) {
       this.mWindow = aWindow;
       this.mStatusText = this.mWindow.document.getElementById("statusText");
       this.mStatusBar = this.mWindow.document.getElementById("statusbar-icon");
       this.mStatusProgressPanel = this.mWindow.document.getElementById("statusbar-progresspanel");
       this.mThrobber = this.mWindow.document.getElementById("navigator-throbber");
       this.mInitialized = true;
     }
   },
 
-  showStatusString: function(status) {
+  showStatusString(status) {
     this.mStatusText.setAttribute("label", status);
   },
 
   get spinning() {
     return this.mProgressMode;
   },
 
-  startMeteors: function(aProgressMode, aCalendarCount) {
+  startMeteors(aProgressMode, aCalendarCount) {
     if (aProgressMode != Ci.calIStatusObserver.NO_PROGRESS) {
       if (!this.mInitialized) {
         Cu.reportError("StatusObserver has not been initialized!");
         return;
       }
       this.mCalendars = {};
       this.mCurIndex = 0;
       if (aCalendarCount) {
@@ -64,33 +64,33 @@ var gCalendarStatusFeedback = {
         this.showStatusString(commonStatus);
       }
       if (this.mThrobber) {
         this.mThrobber.setAttribute("busy", true);
       }
     }
   },
 
-  stopMeteors: function() {
+  stopMeteors() {
     if (!this.mInitialized) {
       return;
     }
     if (this.spinning != Ci.calIStatusObserver.NO_PROGRESS) {
       this.mProgressMode = Ci.calIStatusObserver.NO_PROGRESS;
       this.mStatusProgressPanel.collapsed = true;
       this.mStatusBar.value = 0;
       this.mCalendarCount = 0;
       this.showStatusString("");
       if (this.mThrobber) {
         this.mThrobber.setAttribute("busy", false);
       }
     }
   },
 
-  calendarCompleted: function(aCalendar) {
+  calendarCompleted(aCalendar) {
     if (!this.mInitialized) {
       return;
     }
     if (this.spinning != Ci.calIStatusObserver.NO_PROGRESS) {
       if (this.spinning == Ci.calIStatusObserver.DETERMINED_PROGRESS) {
         if (!this.mCalendars[aCalendar.id] || this.mCalendars[aCalendar.id] === undefined) {
           this.mCalendars[aCalendar.id] = true;
           this.mStatusBar.value = parseInt(this.mStatusBar.value, 10) + this.mCalendarStep;
--- a/calendar/base/content/calendar-task-editing.js
+++ b/calendar/base/content/calendar-task-editing.js
@@ -45,28 +45,28 @@ var taskEdit = {
   /**
    * Helper function to set readonly and aria-disabled states and the value
    * for a given target.
    *
    * @param aTarget   The ID or XUL node to set the value
    * @param aDisable  A boolean if the target should be disabled.
    * @param aValue    The value that should be set on the target.
    */
-  setupTaskField: function(aTarget, aDisable, aValue) {
+  setupTaskField(aTarget, aDisable, aValue) {
     aTarget.value = aValue;
     setElementValue(aTarget, aDisable && "true", "readonly");
     setElementValue(aTarget, aDisable && "true", "aria-disabled");
   },
 
   /**
    * Handler function to call when the quick-add input gains focus.
    *
    * @param aEvent    The DOM focus event
    */
-  onFocus: function(aEvent) {
+  onFocus(aEvent) {
     let edit = aEvent.target;
     let calendar = getSelectedCalendar();
     edit.showsInstructions = true;
 
     if (calendar.getProperty("capabilities.tasks.supported") === false) {
       taskEdit.setupTaskField(edit, true, cal.l10n.getCalString("taskEditInstructionsCapability"));
     } else if (cal.acl.isCalendarWritable(calendar)) {
       edit.showsInstructions = false;
@@ -76,17 +76,17 @@ var taskEdit = {
     }
   },
 
   /**
    * Handler function to call when the quick-add input loses focus.
    *
    * @param aEvent    The DOM blur event
    */
-  onBlur: function(aEvent) {
+  onBlur(aEvent) {
     let edit = aEvent.target;
     let calendar = getSelectedCalendar();
     if (!calendar) {
       // this must be a first run, we don't have a calendar yet
       return;
     }
 
     if (calendar.getProperty("capabilities.tasks.supported") === false) {
@@ -102,17 +102,17 @@ var taskEdit = {
     edit.showsInstructions = true;
   },
 
   /**
    * Handler function to call on keypress for the quick-add input.
    *
    * @param aEvent    The DOM keypress event
    */
-  onKeyPress: function(aEvent) {
+  onKeyPress(aEvent) {
     if (aEvent.key == "Enter") {
       let edit = aEvent.target;
       if (edit.value && edit.value.length > 0) {
         let item = cal.createTodo();
         setDefaultItemValues(item);
         item.title = edit.value;
 
         edit.value = "";
@@ -120,53 +120,53 @@ var taskEdit = {
       }
     }
   },
 
   /**
    * Window load function to set up all quick-add inputs. The input must
    * have the class "task-edit-field".
    */
-  onLoad: function(aEvent) {
+  onLoad(aEvent) {
     let taskEditFields = document.getElementsByClassName("task-edit-field");
     for (let i = 0; i < taskEditFields.length; i++) {
       taskEdit.onBlur({ target: taskEditFields[i] });
     }
 
     cal.view.getCompositeCalendar(window).addObserver(taskEdit.compositeObserver);
     taskEdit.observedCalendar = getSelectedCalendar();
   },
 
   /**
    * Window load function to clean up all quick-add fields.
    */
-  onUnload: function() {
+  onUnload() {
     cal.view.getCompositeCalendar(window).removeObserver(taskEdit.compositeObserver);
     taskEdit.observedCalendar = null;
   },
 
   /**
    * Observer to watch for readonly, disabled and capability changes of the
    * observed calendar.
    *
    * @see calIObserver
    */
   calendarObserver: {
     QueryInterface: ChromeUtils.generateQI([Ci.calIObserver]),
 
     // calIObserver:
-    onStartBatch: function() {},
-    onEndBatch: function() {},
-    onLoad: function(aCalendar) {},
-    onAddItem: function(aItem) {},
-    onModifyItem: function(aNewItem, aOldItem) {},
-    onDeleteItem: function(aDeletedItem) {},
-    onError: function(aCalendar, aErrNo, aMessage) {},
+    onStartBatch() {},
+    onEndBatch() {},
+    onLoad(aCalendar) {},
+    onAddItem(aItem) {},
+    onModifyItem(aNewItem, aOldItem) {},
+    onDeleteItem(aDeletedItem) {},
+    onError(aCalendar, aErrNo, aMessage) {},
 
-    onPropertyChanged: function(aCalendar, aName, aValue, aOldValue) {
+    onPropertyChanged(aCalendar, aName, aValue, aOldValue) {
       if (aCalendar.id != getSelectedCalendar().id) {
         // Optimization: if the given calendar isn't the default calendar,
         // then we don't need to change any readonly/disabled states.
         return;
       }
       switch (aName) {
         case "readOnly":
         case "disabled": {
@@ -174,17 +174,17 @@ var taskEdit = {
           for (let i = 0; i < taskEditFields.length; i++) {
             taskEdit.onBlur({ target: taskEditFields[i] });
           }
           break;
         }
       }
     },
 
-    onPropertyDeleting: function(aCalendar, aName) {
+    onPropertyDeleting(aCalendar, aName) {
       // Since the old value is not used directly in onPropertyChanged,
       // but should not be the same as the value, set it to a different
       // value.
       this.onPropertyChanged(aCalendar, aName, null, null);
     },
   },
 
   /**
@@ -193,30 +193,30 @@ var taskEdit = {
    * XXX I think we don't need to implement calIObserver here.
    *
    * @see calICompositeObserver
    */
   compositeObserver: {
     QueryInterface: cal.generateQI([Ci.calIObserver, Ci.calICompositeObserver]),
 
     // calIObserver:
-    onStartBatch: function() {},
-    onEndBatch: function() {},
-    onLoad: function(aCalendar) {},
-    onAddItem: function(aItem) {},
-    onModifyItem: function(aNewItem, aOldItem) {},
-    onDeleteItem: function(aDeletedItem) {},
-    onError: function(aCalendar, aErrNo, aMessage) {},
-    onPropertyChanged: function(aCalendar, aName, aValue, aOldValue) {},
-    onPropertyDeleting: function(aCalendar, aName) {},
+    onStartBatch() {},
+    onEndBatch() {},
+    onLoad(aCalendar) {},
+    onAddItem(aItem) {},
+    onModifyItem(aNewItem, aOldItem) {},
+    onDeleteItem(aDeletedItem) {},
+    onError(aCalendar, aErrNo, aMessage) {},
+    onPropertyChanged(aCalendar, aName, aValue, aOldValue) {},
+    onPropertyDeleting(aCalendar, aName) {},
 
     // calICompositeObserver:
-    onCalendarAdded: function(aCalendar) {},
-    onCalendarRemoved: function(aCalendar) {},
-    onDefaultCalendarChanged: function(aNewDefault) {
+    onCalendarAdded(aCalendar) {},
+    onCalendarRemoved(aCalendar) {},
+    onDefaultCalendarChanged(aNewDefault) {
       let taskEditFields = document.getElementsByClassName("task-edit-field");
       for (let i = 0; i < taskEditFields.length; i++) {
         taskEdit.onBlur({ target: taskEditFields[i] });
       }
       taskEdit.observedCalendar = aNewDefault;
     },
   },
 };
--- a/calendar/base/content/calendar-task-tree.js
+++ b/calendar/base/content/calendar-task-tree.js
@@ -419,20 +419,19 @@
           prefix + PluralForm.get(days, cal.l10n.getCalString("dueInDays")).replace("#1", days)
         );
       } else if (absMinutes >= 60) {
         // 1 hour or more.
         return (
           prefix +
           PluralForm.get(dur.hours, cal.l10n.getCalString("dueInHours")).replace("#1", dur.hours)
         );
-      } else {
-        // Less than one hour.
-        return cal.l10n.getCalString("dueInLessThanOneHour");
       }
+      // Less than one hour.
+      return cal.l10n.getCalString("dueInLessThanOneHour");
     }
 
     /**
      * Return the task object at a given row.
      *
      * @param {number} row        The index number identifying the row.
      * @return {Object | null}    A task object or null if none found.
      */
--- a/calendar/base/content/calendar-task-view.js
+++ b/calendar/base/content/calendar-task-view.js
@@ -17,17 +17,17 @@ var { AppConstants } = ChromeUtils.impor
 
 var taskDetailsView = {
   /**
    * Task Details Events
    *
    * XXXberend Please document this function, possibly also consolidate since
    * its the only function in taskDetailsView.
    */
-  onSelect: function(event) {
+  onSelect(event) {
     function displayElement(id, flag) {
       setBooleanAttribute(id, "hidden", !flag);
       return flag;
     }
 
     let dateFormatter = Cc["@mozilla.org/calendar/datetime-formatter;1"].getService(
       Ci.calIDateTimeFormatter
     );
@@ -187,17 +187,17 @@ var taskDetailsView = {
           urlLabel.setAttribute("onclick", "if (event.button != 2) launchBrowser(this.value);");
           urlLabel.setAttribute("context", "taskview-link-context-menu");
           attachmentRows.appendChild(urlLabel);
         }
       }
     }
   },
 
-  loadCategories: function() {
+  loadCategories() {
     let categoryPopup = document.getElementById("task-actions-category-popup");
     let item = document.getElementById("calendar-task-tree").currentTask;
 
     let itemCategories = item.getCategories();
     let categoryList = cal.category.fromPrefs();
     for (let cat of itemCategories) {
       if (!categoryList.includes(cat)) {
         categoryList.push(cat);
@@ -228,17 +228,17 @@ var taskDetailsView = {
       menuitem.setAttribute("type", maxCount === null || maxCount > 1 ? "checkbox" : "radio");
       if (itemCategories.includes(cat)) {
         menuitem.setAttribute("checked", "true");
       }
       categoryPopup.appendChild(menuitem);
     }
   },
 
-  saveCategories: function(event) {
+  saveCategories(event) {
     let categoryPopup = document.getElementById("task-actions-category-popup");
     let item = document.getElementById("calendar-task-tree").currentTask;
 
     let oldCategories = item.getCategories();
     let categories = Array.from(
       categoryPopup.querySelectorAll("menuitem.calendar-category[checked]"),
       menuitem => menuitem.value
     );
@@ -252,17 +252,17 @@ var taskDetailsView = {
       newItem.setCategories(categories);
       doTransaction("modify", newItem, newItem.calendar, item, null);
       return false;
     }
 
     return true;
   },
 
-  categoryTextboxKeypress: function(event) {
+  categoryTextboxKeypress(event) {
     let category = event.target.value;
     let categoryPopup = document.getElementById("task-actions-category-popup");
 
     switch (event.key) {
       case " ": {
         // The menu popup seems to eat this keypress.
         let start = event.target.selectionStart;
         event.target.value =
--- a/calendar/base/content/calendar-unifinder.js
+++ b/calendar/base/content/calendar-unifinder.js
@@ -62,93 +62,93 @@ function getCurrentUnifinderFilter() {
  *
  * @see calIObserver
  * @see calICompositeObserver
  */
 var unifinderObserver = {
   QueryInterface: cal.generateQI([Ci.calICompositeObserver, Ci.nsIObserver, Ci.calIObserver]),
 
   // calIObserver:
-  onStartBatch: function() {
+  onStartBatch() {
     gUnifinderNeedsRefresh = true;
   },
 
-  onEndBatch: function() {},
+  onEndBatch() {},
 
-  onLoad: function() {
+  onLoad() {
     if (isUnifinderHidden()) {
       // If the unifinder is hidden, all further item operations might
       // produce invalid entries in the unifinder. From now on, ignore
       // those operations and refresh as soon as the unifinder is shown
       // again.
       gUnifinderNeedsRefresh = true;
       unifinderTreeView.clearItems();
     } else {
       refreshEventTree();
     }
   },
 
-  onAddItem: function(aItem) {
+  onAddItem(aItem) {
     if (
       cal.item.isEvent(aItem) &&
       !gUnifinderNeedsRefresh &&
       unifinderTreeView.mFilter.isItemInFilters(aItem)
     ) {
       this.addItemToTree(aItem);
     }
   },
 
-  onModifyItem: function(aNewItem, aOldItem) {
+  onModifyItem(aNewItem, aOldItem) {
     this.onDeleteItem(aOldItem);
     this.onAddItem(aNewItem);
   },
 
-  onDeleteItem: function(aDeletedItem) {
+  onDeleteItem(aDeletedItem) {
     if (cal.item.isEvent(aDeletedItem) && !gUnifinderNeedsRefresh) {
       this.removeItemFromTree(aDeletedItem);
     }
   },
 
-  onError: function(aCalendar, aErrNo, aMessage) {},
+  onError(aCalendar, aErrNo, aMessage) {},
 
-  onPropertyChanged: function(aCalendar, aName, aValue, aOldValue) {
+  onPropertyChanged(aCalendar, aName, aValue, aOldValue) {
     switch (aName) {
       case "disabled":
         refreshEventTree();
         break;
     }
   },
 
-  onPropertyDeleting: function(aCalendar, aName) {
+  onPropertyDeleting(aCalendar, aName) {
     this.onPropertyChanged(aCalendar, aName, null, null);
   },
 
   // calICompositeObserver:
-  onCalendarAdded: function(aAddedCalendar) {
+  onCalendarAdded(aAddedCalendar) {
     if (!aAddedCalendar.getProperty("disabled")) {
       addItemsFromCalendar(aAddedCalendar, addItemsFromSingleCalendarInternal);
     }
   },
 
-  onCalendarRemoved: function(aDeletedCalendar) {
+  onCalendarRemoved(aDeletedCalendar) {
     if (!aDeletedCalendar.getProperty("disabled")) {
       deleteItemsFromCalendar(aDeletedCalendar);
     }
   },
 
-  onDefaultCalendarChanged: function(aNewDefaultCalendar) {},
+  onDefaultCalendarChanged(aNewDefaultCalendar) {},
 
   /**
    * Add an unifinder item to the tree. It is safe to call these for any
    * event. The functions will determine whether or not anything actually
    * needs to be done to the tree.
    *
    * @return aItem        The item to add to the tree.
    */
-  addItemToTree: function(aItem) {
+  addItemToTree(aItem) {
     let items;
     let filter = unifinderTreeView.mFilter;
 
     if (filter.startDate && filter.endDate) {
       items = aItem.getOccurrencesBetween(filter.startDate, filter.endDate);
     } else {
       items = [aItem];
     }
@@ -157,29 +157,29 @@ var unifinderObserver = {
 
   /**
    * Remove an item from the unifinder tree. It is safe to call these for any
    * event. The functions will determine whether or not anything actually
    * needs to be done to the tree.
    *
    * @return aItem        The item to remove from the tree.
    */
-  removeItemFromTree: function(aItem) {
+  removeItemFromTree(aItem) {
     let items;
     let filter = unifinderTreeView.mFilter;
     if (filter.startDate && filter.endDate && aItem.parentItem == aItem) {
       items = aItem.getOccurrencesBetween(filter.startDate, filter.endDate);
     } else {
       items = [aItem];
     }
     // XXX: do we really still need this, we are always checking it in the refreshInternal
     unifinderTreeView.removeItems(items.filter(filter.isItemInFilters, filter));
   },
 
-  observe: function() {
+  observe() {
     refreshEventTree();
   },
 };
 
 /**
  * Called when the window is loaded to prepare the unifinder. This function is
  * used to add observers, event listeners, etc.
  */
@@ -384,20 +384,20 @@ function unifinderKeyPress(aEvent) {
  * Tree controller for unifinder search results
  */
 var unifinderTreeView = {
   QueryInterface: ChromeUtils.generateQI([Ci.nsITreeView]),
 
   // Provide a default tree that holds all the functions used here to avoid
   // cludgy if (this.tree) { this.tree.rowCountChanged(...); } constructs.
   tree: {
-    rowCountChanged: function() {},
-    beginUpdateBatch: function() {},
-    endUpdateBatch: function() {},
-    invalidate: function() {},
+    rowCountChanged() {},
+    beginUpdateBatch() {},
+    endUpdateBatch() {},
+    invalidate() {},
   },
 
   ready: false,
   treeElement: null,
   doingSelection: false,
   mFilter: null,
   mSelectedColumn: null,
   sortDirection: null,
@@ -435,17 +435,17 @@ var unifinderTreeView = {
   eventArray: [],
   eventIndexMap: {},
 
   /**
    * Add an item to the unifinder tree.
    *
    * @param aItemArray        An array of items to add.
    */
-  addItems: function(aItemArray) {
+  addItems(aItemArray) {
     this.tree.beginUpdateBatch();
 
     let bulkSort = aItemArray.length > this.eventArray.length;
     if (bulkSort || !this.selectedColumn) {
       // If there's more items being added than already exist,
       // just append them and sort the whole list afterwards.
       // If there's no selected column, don't sort at all.
       let index = this.eventArray.length;
@@ -483,17 +483,17 @@ var unifinderTreeView = {
     this.calculateIndexMap(true);
   },
 
   /**
    * Remove items from the unifinder tree.
    *
    * @param aItemArray        An array of items to remove.
    */
-  removeItems: function(aItemArray) {
+  removeItems(aItemArray) {
     let indexesToRemove = [];
     // Removing items is a bit tricky. Our getItemRow function takes the
     // index from a cached map, so removing an item from the array will
     // remove the wrong indexes. We don't want to just invalidate the map,
     // since this will cause O(n^2) behavior. Instead, we keep a sorted
     // array of the indexes to remove:
     for (let item of aItemArray) {
       let row = this.getItemRow(item);
@@ -522,111 +522,111 @@ var unifinderTreeView = {
     // (given that Array.prototype.unshift doesn't loop but just prepends or
     // maps memory smartly) O(3n) behavior. Lets hope its worth it.
     this.calculateIndexMap(true);
   },
 
   /**
    * Clear all items from the unifinder.
    */
-  clearItems: function() {
+  clearItems() {
     let oldCount = this.eventArray.length;
     this.eventArray = [];
     this.tree.rowCountChanged(0, -oldCount);
     this.calculateIndexMap();
   },
 
   /**
    * Sets the items that should be in the unifinder. This removes all items
    * that were previously in the unifinder.
    */
-  setItems: function(aItemArray) {
+  setItems(aItemArray) {
     let oldCount = this.eventArray.length;
     this.eventArray = aItemArray.slice(0);
     this.tree.rowCountChanged(oldCount - 1, this.eventArray.length - oldCount);
     this.sortItems();
   },
 
   /**
    * Recalculate the index map that improves performance when accessing
    * unifinder items. This is usually done automatically when adding/removing
    * items.
    *
    * @param aDontInvalidate       (optional) Don't invalidate the tree, i.e if
    *                                you correctly issued rowCountChanged
    *                                notices.
    */
-  calculateIndexMap: function(aDontInvalidate) {
+  calculateIndexMap(aDontInvalidate) {
     this.eventIndexMap = {};
     for (let i = 0; i < this.eventArray.length; i++) {
       this.eventIndexMap[this.eventArray[i].hashId] = i;
     }
 
     if (!aDontInvalidate) {
       this.tree.invalidate();
     }
   },
 
   /**
    * Sort the items in the unifinder by the currently selected column.
    */
-  sortItems: function() {
+  sortItems() {
     if (this.selectedColumn) {
       let modifier = this.sortDirection == "descending" ? -1 : 1;
       let sortKey = unifinderTreeView.selectedColumn.getAttribute("itemproperty");
 
       cal.unifinder.sortItems(this.eventArray, sortKey, modifier);
     }
     this.calculateIndexMap();
   },
 
   /**
    * Get the index of the row associated with the passed item.
    *
    * @param item      The item to search for.
    * @return          The row index of the passed item.
    */
-  getItemRow: function(item) {
+  getItemRow(item) {
     if (this.eventIndexMap[item.hashId] === undefined) {
       return -1;
     }
     return this.eventIndexMap[item.hashId];
   },
 
   /**
    * Get the item at the given row index.
    *
    * @param item      The row index to get the item for.
    * @return          The item at the given row.
    */
-  getItemAt: function(aRow) {
+  getItemAt(aRow) {
     return this.eventArray[aRow];
   },
 
   /**
    * Get the calendar item from the given DOM event
    *
    * @param event     The DOM mouse event to get the item for.
    * @return          The item under the mouse position.
    */
-  getItemFromEvent: function(event) {
+  getItemFromEvent(event) {
     let row = this.tree.getRowAt(event.clientX, event.clientY);
 
     if (row > -1) {
       return this.getItemAt(row);
     }
     return null;
   },
 
   /**
    * Change the selection in the unifinder.
    *
    * @param aItemArray        An array of items to select.
    */
-  setSelectedItems: function(aItemArray) {
+  setSelectedItems(aItemArray) {
     if (
       this.doingSelection ||
       !this.tree ||
       !this.tree.view ||
       !("getSelectedItems" in currentView())
     ) {
       return;
     }
@@ -668,17 +668,17 @@ var unifinderTreeView = {
     // This needs to be in a setTimeout
     setTimeout(() => unifinderTreeView.resetAllowSelection(), 1);
   },
 
   /**
    * Due to a selection issue described in bug 168211 this method is needed to
    * re-add the selection listeners selection listeners.
    */
-  resetAllowSelection: function() {
+  resetAllowSelection() {
     if (!this.tree) {
       return;
     }
     /**
      * Do not change anything in the following lines, they are needed as
      * described in the selection observer above
      */
     this.doingSelection = false;
@@ -694,22 +694,22 @@ var unifinderTreeView = {
   get rowCount() {
     return this.eventArray.length;
   },
 
   // TODO this code is currently identical to the task tree. We should create
   // an itemTreeView that these tree views can inherit, that contains this
   // code, and possibly other code related to sorting and storing items. See
   // bug 432582 for more details.
-  getCellProperties: function(aRow, aCol) {
+  getCellProperties(aRow, aCol) {
     let rowProps = this.getRowProperties(aRow);
     let colProps = this.getColumnProperties(aCol);
     return rowProps + (rowProps && colProps ? " " : "") + colProps;
   },
-  getRowProperties: function(aRow) {
+  getRowProperties(aRow) {
     let properties = [];
     let item = this.eventArray[aRow];
     if (item.priority > 0 && item.priority < 5) {
       properties.push("highpriority");
     } else if (item.priority > 5 && item.priority < 10) {
       properties.push("lowpriority");
     }
 
@@ -726,63 +726,63 @@ var unifinderTreeView = {
       properties.push("alarm");
     }
 
     // Task categories
     properties = properties.concat(item.getCategories().map(cal.view.formatStringForCSSRule));
 
     return properties.join(" ");
   },
-  getColumnProperties: function(aCol) {
+  getColumnProperties(aCol) {
     return "";
   },
 
-  isContainer: function() {
+  isContainer() {
     return false;
   },
 
-  isContainerOpen: function(aRow) {
+  isContainerOpen(aRow) {
     return false;
   },
 
-  isContainerEmpty: function(aRow) {
+  isContainerEmpty(aRow) {
     return false;
   },
 
-  isSeparator: function(aRow) {
+  isSeparator(aRow) {
     return false;
   },
 
-  isSorted: function(aRow) {
+  isSorted(aRow) {
     return false;
   },
 
-  canDrop: function(aRow, aOrientation) {
+  canDrop(aRow, aOrientation) {
     return false;
   },
 
-  drop: function(aRow, aOrientation) {},
+  drop(aRow, aOrientation) {},
 
-  getParentIndex: function(aRow) {
+  getParentIndex(aRow) {
     return -1;
   },
 
-  hasNextSibling: function(aRow, aAfterIndex) {},
+  hasNextSibling(aRow, aAfterIndex) {},
 
-  getLevel: function(aRow) {
+  getLevel(aRow) {
     return 0;
   },
 
-  getImageSrc: function(aRow, aOrientation) {},
+  getImageSrc(aRow, aOrientation) {},
 
-  getCellValue: function(aRow, aCol) {
+  getCellValue(aRow, aCol) {
     return null;
   },
 
-  getCellText: function(row, column) {
+  getCellText(row, column) {
     let calendarEvent = this.eventArray[row];
 
     switch (column.element.getAttribute("itemproperty")) {
       case "title": {
         return calendarEvent.title ? calendarEvent.title.replace(/\n/g, " ") : "";
       }
       case "startDate": {
         return formatUnifinderEventDateTime(calendarEvent.startDate);
@@ -810,40 +810,40 @@ var unifinderTreeView = {
         return calendarEvent.calendar.name;
       }
       default: {
         return false;
       }
     }
   },
 
-  setTree: function(tree) {
+  setTree(tree) {
     this.tree = tree;
   },
 
-  toggleOpenState: function(aRow) {},
+  toggleOpenState(aRow) {},
 
-  cycleHeader: function(col) {
+  cycleHeader(col) {
     if (!this.selectedColumn) {
       this.sortDirection = "ascending";
     } else if (!this.sortDirection || this.sortDirection == "descending") {
       this.sortDirection = "ascending";
     } else {
       this.sortDirection = "descending";
     }
     this.selectedColumn = col.element;
     this.sortItems();
   },
 
-  isEditable: function(aRow, aCol) {
+  isEditable(aRow, aCol) {
     return false;
   },
 
-  setCellValue: function(aRow, aCol, aValue) {},
-  setCellText: function(aRow, aCol, aValue) {},
+  setCellValue(aRow, aCol, aValue) {},
+  setCellText(aRow, aCol, aValue) {},
 
   outParameter: {}, // used to obtain dates during sort
 };
 
 /**
  * Refresh the unifinder tree by getting items from the composite calendar and
  * applying the current filter.
  */
@@ -905,24 +905,24 @@ function addItemsFromCalendar(aCalendar,
     // If the unifinder is hidden, don't refresh the events to reduce needed
     // getItems calls.
     return;
   }
   let refreshListener = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
     mEventArray: [],
 
-    onOperationComplete: function(aOpCalendar, aStatus, aOperationType, aId, aDateTime) {
+    onOperationComplete(aOpCalendar, aStatus, aOperationType, aId, aDateTime) {
       let refreshTreeInternalFunc = function() {
         aAddItemsInternalFunc(refreshListener.mEventArray);
       };
       setTimeout(refreshTreeInternalFunc, 0);
     },
 
-    onGetResult: function(aOpCalendar, aStatus, aItemType, aDetail, aItems) {
+    onGetResult(aOpCalendar, aStatus, aItemType, aDetail, aItems) {
       refreshListener.mEventArray = refreshListener.mEventArray.concat(aItems);
     },
   };
 
   let filter = 0;
 
   filter |= aCalendar.ITEM_FILTER_TYPE_EVENT;
 
--- a/calendar/base/content/calendar-views-utils.js
+++ b/calendar/base/content/calendar-views-utils.js
@@ -25,33 +25,33 @@ var { Services } = ChromeUtils.import("r
  */
 var calendarViewController = {
   QueryInterface: ChromeUtils.generateQI([Ci.calICalendarViewController]),
 
   /**
    * Creates a new event
    * @see calICalendarViewController
    */
-  createNewEvent: function(calendar, startTime, endTime, forceAllday) {
+  createNewEvent(calendar, startTime, endTime, forceAllday) {
     // if we're given both times, skip the dialog
     if (startTime && endTime && !startTime.isDate && !endTime.isDate) {
       let item = cal.createEvent();
       setDefaultItemValues(item, calendar, startTime, endTime);
       item.title = cal.l10n.getCalString("newEvent");
       doTransaction("add", item, item.calendar, null, null);
     } else {
       createEventWithDialog(calendar, startTime, null, null, null, forceAllday);
     }
   },
 
   /**
    * Modifies the given occurrence
    * @see calICalendarViewController
    */
-  modifyOccurrence: function(occurrence, newStartTime, newEndTime, newTitle) {
+  modifyOccurrence(occurrence, newStartTime, newEndTime, newTitle) {
     // if modifying this item directly (e.g. just dragged to new time),
     // then do so; otherwise pop up the dialog
     if (newStartTime || newEndTime || newTitle) {
       let instance = occurrence.clone();
 
       if (newTitle) {
         instance.title = newTitle;
       }
@@ -86,17 +86,17 @@ var calendarViewController = {
       modifyEventWithDialog(occurrence, null, true);
     }
   },
 
   /**
    * Deletes the given occurrences
    * @see calICalendarViewController
    */
-  deleteOccurrences: function(occurrencesArg, useParentItems, doNotConfirm, extResponseArg = null) {
+  deleteOccurrences(occurrencesArg, useParentItems, doNotConfirm, extResponseArg = null) {
     startBatchTransaction();
     let recurringItems = {};
     let extResponse = extResponseArg || { responseMode: Ci.calIItipItem.USER };
 
     let getSavedItem = function(itemToDelete) {
       // Get the parent item, saving it in our recurringItems object for
       // later use.
       let hashVal = itemToDelete.parentItem.hashId;
@@ -323,17 +323,17 @@ function scheduleMidnightUpdate(refreshC
   let jsNow = new Date();
   let tomorrow = new Date(jsNow.getFullYear(), jsNow.getMonth(), jsNow.getDate() + 1);
   let msUntilTomorrow = tomorrow.getTime() - jsNow.getTime();
 
   // Is an nsITimer/callback extreme overkill here? Yes, but it's necessary to
   // workaround bug 291386.  If we don't, we stand a decent chance of getting
   // stuck in an infinite loop.
   let udCallback = {
-    notify: function(timer) {
+    notify(timer) {
       refreshCallback();
     },
   };
 
   if (gMidnightTimer) {
     gMidnightTimer.cancel();
   } else {
     // Observer for wake after sleep/hibernate/standby to create new timers and refresh UI
@@ -557,20 +557,20 @@ function editSelectedEvents() {
 
 /**
  * Select all events from all calendars. Use with care.
  */
 function selectAllEvents() {
   let items = [];
   let listener = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-    onOperationComplete: function(calendar, status, operationType, id, detail) {
+    onOperationComplete(calendar, status, operationType, id, detail) {
       currentView().setSelectedItems(items, false);
     },
-    onGetResult: function(calendar, status, itemType, detail, itemsArg) {
+    onGetResult(calendar, status, itemType, detail, itemsArg) {
       for (let item of itemsArg) {
         items.push(item);
       }
     },
   };
 
   let composite = cal.view.getCompositeCalendar(window);
   let filter = composite.ITEM_FILTER_CLASS_OCCURRENCES;
@@ -589,17 +589,17 @@ function selectAllEvents() {
   // Need to move one day out to get all events
   let end = currentView().endDay.clone();
   end.day += 1;
 
   composite.getItems(filter, 0, currentView().startDay, end, listener);
 }
 
 var calendarNavigationBar = {
-  setDateRange: function(startDate, endDate) {
+  setDateRange(startDate, endDate) {
     let docTitle = "";
     if (startDate) {
       let intervalLabel = document.getElementById("intervalDescription");
       let firstWeekNo = cal.getWeekInfoService().getWeekTitle(startDate);
       let secondWeekNo = firstWeekNo;
       let weekLabel = document.getElementById("calendarWeek");
       if (startDate.nativeTime == endDate.nativeTime) {
         intervalLabel.value = cal.getDateFormatter().formatDate(startDate);
@@ -632,33 +632,33 @@ var calendarNavigationBar = {
   },
 };
 
 /*
  * Timer for the time indicator in day and week view.
  */
 var timeIndicator = {
   timer: null,
-  start: function(interval, thisArg) {
+  start(interval, thisArg) {
     timeIndicator.timer = setInterval(
       () => thisArg.updateTimeIndicatorPosition(false),
       interval * 1000
     );
   },
-  cancel: function() {
+  cancel() {
     if (timeIndicator.timer) {
       clearTimeout(timeIndicator.timer);
       timeIndicator.timer = null;
     }
   },
   lastView: null,
 };
 
 var timezoneObserver = {
-  observe: function() {
+  observe() {
     let minimonth = getMinimonth();
     minimonth.update(minimonth.value);
   },
 };
 Services.obs.addObserver(timezoneObserver, "defaultTimezoneChanged");
 window.addEventListener("unload", () => {
   Services.obs.removeObserver(timezoneObserver, "defaultTimezoneChanged");
 });
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.js
@@ -94,17 +94,17 @@ function onLoad() {
   onResize();
   // Set the scroll bar at where the event is
   scrollToCurrentTime();
   updateButtons();
 
   // attach an observer to get notified of changes
   // that are relevant to this dialog.
   let prefObserver = {
-    observe: function(aSubject, aTopic, aPrefName) {
+    observe(aSubject, aTopic, aPrefName) {
       switch (aPrefName) {
         case "calendar.view.daystarthour":
         case "calendar.view.dayendhour":
           initTimeRange();
           propagateDateTime();
           break;
       }
     },
@@ -955,17 +955,17 @@ function onTimeChange(event) {
  * calendar-event-freebusy-grid custom element.
  */
 function calFreeBusyListener(aFbElement, aBinding) {
   this.mFbElement = aFbElement;
   this.mBinding = aBinding;
 }
 
 calFreeBusyListener.prototype = {
-  onResult: function(aRequest, aEntries) {
+  onResult(aRequest, aEntries) {
     if (aRequest && !aRequest.isPending) {
       // Find request in list of pending requests and remove from queue:
       this.mBinding.mPendingRequests = this.mBinding.mPendingRequests.filter(
         aOp => aRequest.id != aOp.id
       );
     }
     if (aEntries) {
       this.mFbElement.onFreeBusy(aEntries);
--- a/calendar/base/content/dialogs/calendar-event-dialog-reminder.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-reminder.js
@@ -378,19 +378,18 @@ function updateReminder(event) {
  * appends the item type, i.e |aPrefix + "Event"|.
  *
  * @param aPrefix       The prefix to prepend to the item type
  * @return              The full string name.
  */
 function getItemBundleStringName(aPrefix) {
   if (cal.item.isEvent(window.arguments[0].item)) {
     return aPrefix + "Event";
-  } else {
-    return aPrefix + "Task";
   }
+  return aPrefix + "Task";
 }
 
 /**
  * Handler function to be called when the "new" button is pressed, to create a
  * new reminder item.
  */
 function onNewReminder() {
   let itemType = cal.item.isEvent(window.arguments[0].item) ? "event" : "todo";
--- a/calendar/base/content/dialogs/calendar-invitations-dialog.js
+++ b/calendar/base/content/dialogs/calendar-invitations-dialog.js
@@ -205,28 +205,28 @@ var { cal } = ChromeUtils.import("resour
 
 /**
  * Sets up the invitations dialog from the window arguments, retrieves the
  * invitations from the invitations manager.
  */
 function onLoad() {
   let operationListener = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-    onOperationComplete: function(aCalendar, aStatus, aOperationType, aId, aDetail) {
+    onOperationComplete(aCalendar, aStatus, aOperationType, aId, aDetail) {
       let updatingBox = document.getElementById("updating-box");
       updatingBox.setAttribute("hidden", "true");
       let richListBox = document.getElementById("invitations-listbox");
       if (richListBox.getRowCount() > 0) {
         richListBox.selectedIndex = 0;
       } else {
         let noInvitationsBox = document.getElementById("noinvitations-box");
         noInvitationsBox.removeAttribute("hidden");
       }
     },
-    onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
+    onGetResult(aCalendar, aStatus, aItemType, aDetail, aItems) {
       if (!Components.isSuccessCode(aStatus)) {
         return;
       }
       document.title = invitationsText + " (" + aItems.length + ")";
       let updatingBox = document.getElementById("updating-box");
       updatingBox.setAttribute("hidden", "true");
       let richListBox = document.getElementById("invitations-listbox");
       for (let item of aItems) {
--- a/calendar/base/content/dialogs/calendar-migration-dialog.js
+++ b/calendar/base/content/dialogs/calendar-migration-dialog.js
@@ -5,17 +5,17 @@
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gMigrateWizard = {
   /**
    * Called from onload of the migrator window.  Takes all of the migrators
    * that were passed in via window.arguments and adds them to checklist. The
    * user can then check these off to migrate the data from those sources.
    */
-  loadMigrators: function() {
+  loadMigrators() {
     let wizardPage2 = document.getElementById("wizardPage2");
     wizardPage2.addEventListener("pageshow", gMigrateWizard.migrateChecked);
 
     let listbox = document.getElementById("datasource-list");
 
     // XXX Once we have branding for lightning, this hack can go away
     let props = Services.strings.createBundle("chrome://calendar/locale/migration.properties");
 
@@ -35,17 +35,17 @@ var gMigrateWizard = {
     }
   },
 
   /**
    * Called from the second page of the wizard.  Finds all of the migrators
    * that were checked and begins migrating their data.  Also controls the
    * progress dialog so the user can see what is happening. (somewhat)
    */
-  migrateChecked: function() {
+  migrateChecked() {
     let migrators = [];
 
     // Get all the checked migrators into an array
     let listbox = document.getElementById("datasource-list");
     for (let i = listbox.children.length - 1; i >= 0; i--) {
       if (listbox.children[i].getAttribute("checked")) {
         migrators.push(listbox.children[i].migrator);
       }
@@ -100,12 +100,12 @@ var gMigrateWizard = {
 
     // And get the first migrator
     getNextMigrator();
   },
 
   /**
    * Makes sure the wizard "back" button can not be pressed.
    */
-  setCanRewindFalse: function() {
+  setCanRewindFalse() {
     document.querySelector("wizard").canRewind = false;
   },
 };
--- a/calendar/base/content/dialogs/calendar-print-dialog.js
+++ b/calendar/base/content/dialogs/calendar-print-dialog.js
@@ -144,20 +144,20 @@ function getPrintSettings(receiverFunc) 
     }
   }
 
   // Some filters above might have filled the events list themselves. If not,
   // then fetch the items here.
   if (requiresFetch) {
     let listener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-      onOperationComplete: function(aCalendar, aStatus, aOperationType, aId, aDateTime) {
+      onOperationComplete(aCalendar, aStatus, aOperationType, aId, aDateTime) {
         receiverFunc(settings);
       },
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
+      onGetResult(aCalendar, aStatus, aItemType, aDetail, aItems) {
         settings.eventList = settings.eventList.concat(aItems);
         if (!settings.printTasksWithNoDueDate) {
           let eventWithDueDate = [];
           for (let item of settings.eventList) {
             if (item.dueDate || item.endDate) {
               eventWithDueDate.push(item);
             }
           }
--- a/calendar/base/content/dialogs/calendar-subscriptions-dialog.js
+++ b/calendar/base/content/dialogs/calendar-subscriptions-dialog.js
@@ -95,17 +95,17 @@ function onSearch() {
   }
 
   let registeredCals = {};
   for (let calendar of cal.getCalendarManager().getCalendars()) {
     registeredCals[calendar.id] = true;
   }
 
   let opListener = {
-    onResult: function(operation, result) {
+    onResult(operation, result) {
       if (result) {
         for (let calendar of result) {
           let newNode = document.createXULElement("richlistitem", {
             is: "calendar-subscriptions-richlistitem",
           });
           newNode.calendar = calendar;
           newNode.subscribed = registeredCals[calendar.id];
           richListBox.appendChild(newNode);
--- a/calendar/base/content/import-export.js
+++ b/calendar/base/content/import-export.js
@@ -300,20 +300,20 @@ function saveEventsToFile(calendarEventA
  * the user will be prompted with a list of calendars to choose which one to export.
  *
  * @param aCalendar     (optional) A specific calendar to export
  */
 function exportEntireCalendar(aCalendar) {
   let itemArray = [];
   let getListener = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-    onOperationComplete: function(aOpCalendar, aStatus, aOperationType, aId, aDetail) {
+    onOperationComplete(aOpCalendar, aStatus, aOperationType, aId, aDetail) {
       saveEventsToFile(itemArray, aOpCalendar.name);
     },
-    onGetResult: function(aOpCalendar, aStatus, aItemType, aDetail, aItems) {
+    onGetResult(aOpCalendar, aStatus, aItemType, aDetail, aItems) {
       for (let item of aItems) {
         itemArray.push(item);
       }
     },
   };
 
   let getItemsFromCal = function(aCal) {
     aCal.getItems(Ci.calICalendar.ITEM_FILTER_ALL_ITEMS, 0, null, null, getListener);
--- a/calendar/base/content/preferences/alarms.js
+++ b/calendar/base/content/preferences/alarms.js
@@ -26,17 +26,17 @@ Preferences.addAll([
 /**
  * Global Object to hold methods for the alarms pref pane
  */
 var gAlarmsPane = {
   /**
    * Initialize the alarms pref pane. Sets up dialog controls to match the
    * values set in prefs.
    */
-  init: function() {
+  init() {
     // Enable/disable the alarm sound URL box and buttons
     this.alarmsPlaySoundPrefChanged();
 
     // Set the correct singular/plural for the time units
     updateMenuLabelsPlural("eventdefalarmlen", "eventdefalarmunit");
     updateMenuLabelsPlural("tododefalarmlen", "tododefalarmunit");
     updateUnitLabelPlural("defaultsnoozelength", "defaultsnoozelengthunit", "minutes");
 
@@ -46,56 +46,55 @@ var gAlarmsPane = {
   },
 
   /**
    * Converts the given file url to a nsIFile
    *
    * @param aFileURL    A string with a file:// url.
    * @return            The corresponding nsIFile.
    */
-  convertURLToLocalFile: function(aFileURL) {
+  convertURLToLocalFile(aFileURL) {
     // Convert the file url into a nsIFile
     if (aFileURL) {
       let fph = Services.io.getProtocolHandler("file").QueryInterface(Ci.nsIFileProtocolHandler);
       return fph.getFileFromURLSpec(aFileURL);
-    } else {
-      return null;
     }
+    return null;
   },
 
   /**
    * Handler function to be called when the calendar.alarms.soundURL pref has
    * changed. Updates the label in the dialog.
    */
-  readSoundLocation: function() {
+  readSoundLocation() {
     let soundUrl = document.getElementById("alarmSoundFileField");
     soundUrl.value = Preferences.get("calendar.alarms.soundURL").value;
     if (soundUrl.value.startsWith("file://")) {
       soundUrl.label = gAlarmsPane.convertURLToLocalFile(soundUrl.value).leafName;
     } else {
       soundUrl.label = soundUrl.value;
     }
     soundUrl.style.backgroundImage = "url(moz-icon://" + soundUrl.label + "?size=16)";
     return undefined;
   },
 
   /**
    * Causes the default sound to be selected in the dialog controls
    */
-  useDefaultSound: function() {
+  useDefaultSound() {
     let defaultSoundUrl = "chrome://calendar/content/sound.wav";
     Preferences.get("calendar.alarms.soundURL").value = defaultSoundUrl;
     document.getElementById("alarmSoundCheckbox").checked = true;
     this.readSoundLocation();
   },
 
   /**
    * Opens a filepicker to open a local sound for the alarm.
    */
-  browseAlarm: function() {
+  browseAlarm() {
     let picker = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
 
     // If we already have a sound file, then use the path for that sound file
     // as the initial path in the dialog.
     let currentValue = Preferences.get("calendar.alarms.soundURL").value;
     if (currentValue && currentValue.startsWith("file://")) {
       let localFile = Services.io.newURI(currentValue).QueryInterface(Ci.nsIFileURL).file;
       picker.displayDirectory = localFile.parent;
@@ -115,17 +114,17 @@ var gAlarmsPane = {
       document.getElementById("alarmSoundCheckbox").checked = true;
       this.readSoundLocation();
     });
   },
 
   /**
    * Plays the alarm sound currently selected.
    */
-  previewAlarm: function() {
+  previewAlarm() {
     let soundUrl;
     if (Preferences.get("calendar.alarms.soundType").value == 0) {
       soundUrl = "chrome://calendar/content/sound.wav";
     } else {
       soundUrl = Preferences.get("calendar.alarms.soundURL").value;
     }
     let soundIfc = Cc["@mozilla.org/sound;1"].createInstance(Ci.nsISound);
     let url;
@@ -142,17 +141,17 @@ var gAlarmsPane = {
     }
   },
 
   /**
    * Handler function to call when the calendar.alarms.playsound preference
    * has been changed. Updates the disabled state of fields that depend on
    * playing a sound.
    */
-  alarmsPlaySoundPrefChanged: function() {
+  alarmsPlaySoundPrefChanged() {
     let alarmsPlaySoundPref = Preferences.get("calendar.alarms.playsound");
     let alarmsSoundType = Preferences.get("calendar.alarms.soundType");
 
     for (let item of ["alarmSoundType", "calendar.prefs.alarm.sound.play"]) {
       document.getElementById(item).disabled = !alarmsPlaySoundPref.value;
     }
 
     for (let item of ["alarmSoundFileField", "calendar.prefs.alarm.sound.browse"]) {
--- a/calendar/base/content/preferences/categories.js
+++ b/calendar/base/content/preferences/categories.js
@@ -23,17 +23,17 @@ var categoryPrefBranch = Services.prefs.
 var gCategoriesPane = {
   mCategoryDialog: null,
   mWinProp: null,
 
   /**
    * Initialize the categories pref pane. Sets up dialog controls to show the
    * categories saved in preferences.
    */
-  init: function() {
+  init() {
     // On non-instant-apply platforms, once this pane has been loaded,
     // attach our "revert all changes" function to the parent prefwindow's
     // "ondialogcancel" event.
     let parentPrefWindow = document.documentElement;
     if (!parentPrefWindow.instantApply) {
       let existingOnDialogCancel = parentPrefWindow.getAttribute("ondialogcancel");
       parentPrefWindow.setAttribute(
         "ondialogcancel",
@@ -61,22 +61,22 @@ var gCategoriesPane = {
     }
   },
 
   /**
    * Updates the listbox containing the categories from the categories saved
    * in preferences.
    */
 
-  updatePrefs: function() {
+  updatePrefs() {
     cal.l10n.sortArrayByLocaleCollator(gCategoryList);
     Preferences.get("calendar.categories.names").value = cal.category.arrayToString(gCategoryList);
   },
 
-  updateCategoryList: function() {
+  updateCategoryList() {
     this.updatePrefs();
     let listbox = document.getElementById("categorieslist");
 
     listbox.clearSelection();
     this.updateButtons();
 
     while (listbox.lastElementChild) {
       listbox.lastChild.remove();
@@ -102,32 +102,32 @@ var gCategoriesPane = {
       listbox.appendChild(newListItem);
     }
   },
 
   /**
    * Adds a category, opening the edit category dialog to prompt the user to
    * set up the category.
    */
-  addCategory: function() {
+  addCategory() {
     let listbox = document.getElementById("categorieslist");
     listbox.clearSelection();
     this.updateButtons();
     let params = {
       title: newTitle,
       category: "",
       color: null,
     };
     gSubDialog.open(this.mCategoryDialog, "resizable=no", params);
   },
 
   /**
    * Edits the currently selected category using the edit category dialog.
    */
-  editCategory: function() {
+  editCategory() {
     let list = document.getElementById("categorieslist");
     let categoryNameFix = cal.view.formatStringForCSSRule(gCategoryList[list.selectedIndex]);
     let currentColor = categoryPrefBranch.getCharPref(categoryNameFix, "");
 
     let params = {
       title: editTitle,
       category: gCategoryList[list.selectedIndex],
       color: currentColor,
@@ -135,17 +135,17 @@ var gCategoriesPane = {
     if (list.selectedItem) {
       gSubDialog.open(this.mCategoryDialog, "resizable=no", params);
     }
   },
 
   /**
    * Removes the selected category.
    */
-  deleteCategory: function() {
+  deleteCategory() {
     let list = document.getElementById("categorieslist");
     if (list.selectedCount < 1) {
       return;
     }
 
     let categoryNameFix = cal.view.formatStringForCSSRule(gCategoryList[list.selectedIndex]);
     this.backupData(categoryNameFix);
     try {
@@ -174,17 +174,17 @@ var gCategoriesPane = {
   },
 
   /**
    * Saves the given category to the preferences.
    *
    * @param categoryName      The name of the category.
    * @param categoryColor     The color of the category
    */
-  saveCategory: function(categoryName, categoryColor) {
+  saveCategory(categoryName, categoryColor) {
     let list = document.getElementById("categorieslist");
     // Check to make sure another category doesn't have the same name
     let toBeDeleted = -1;
     for (let i = 0; i < gCategoryList.length; i++) {
       if (i == list.selectedIndex) {
         continue;
       }
 
@@ -230,29 +230,29 @@ var gCategoriesPane = {
     let updatedCategory = gCategoryList.indexOf(categoryName);
     list.ensureIndexIsVisible(updatedCategory);
     list.selectedIndex = updatedCategory;
   },
 
   /**
    * Enable the edit and delete category buttons.
    */
-  updateButtons: function() {
+  updateButtons() {
     let categoriesList = document.getElementById("categorieslist");
     document.getElementById("deleteCButton").disabled = categoriesList.selectedCount <= 0;
     document.getElementById("editCButton").disabled = categoriesList.selectedCount != 1;
   },
 
   /**
    * Backs up the category name in case the dialog is canceled.
    *
    * @see formatStringForCSSRule
    * @param categoryNameFix     The formatted category name.
    */
-  backupData: function(categoryNameFix) {
+  backupData(categoryNameFix) {
     let currentColor = categoryPrefBranch.getCharPref(categoryNameFix, "##NEW");
 
     for (let i = 0; i < parent.backupPrefList.length; i++) {
       if (categoryNameFix == parent.backupPrefList[i].name) {
         return;
       }
     }
     parent.backupPrefList[parent.backupPrefList.length] = {
@@ -261,26 +261,26 @@ var gCategoriesPane = {
     };
   },
 
   /**
    * Event Handler function to be called on doubleclick of the categories
    * list. If the edit function is enabled and the user doubleclicked on a
    * list item, then edit the selected category.
    */
-  listOnDblClick: function(event) {
+  listOnDblClick(event) {
     if (event.target.localName == "listitem" && !document.getElementById("editCButton").disabled) {
       this.editCategory();
     }
   },
 
   /**
    * Reverts category preferences in case the cancel button is pressed.
    */
-  panelOnCancel: function() {
+  panelOnCancel() {
     for (let i = 0; i < parent.backupPrefList.length; i++) {
       if (parent.backupPrefList[i].color == "##NEW") {
         try {
           categoryPrefBranch.clearUserPref(parent.backupPrefList[i].name);
         } catch (ex) {
           dump("Exception caught in 'panelOnCancel': " + ex + "\n");
         }
       } else {
--- a/calendar/base/content/preferences/general.js
+++ b/calendar/base/content/preferences/general.js
@@ -27,17 +27,17 @@ Preferences.addAll([
 /**
  * Global Object to hold methods for the general pref pane
  */
 var gCalendarGeneralPane = {
   /**
    * Initialize the general pref pane. Sets up dialog controls to match the
    * values set in prefs.
    */
-  init: function() {
+  init() {
     let formatter = Cc["@mozilla.org/calendar/datetime-formatter;1"].getService(
       Ci.calIDateTimeFormatter
     );
 
     let dateFormattedLong = formatter.formatDateLong(cal.dtz.now());
     let dateFormattedShort = formatter.formatDateShort(cal.dtz.now());
 
     // menu items include examples of current date formats.
@@ -78,17 +78,17 @@ var gCalendarGeneralPane = {
       prefValue = cal.dtz.defaultTimezone.tzid;
     }
     tzMenuList.value = prefValue;
 
     // Set the soondays menulist preference
     this.initializeTodaypaneMenu();
   },
 
-  updateDefaultTodoDates: function() {
+  updateDefaultTodoDates() {
     let defaultDue = document.getElementById("default_task_due").value;
     let defaultStart = document.getElementById("default_task_start").value;
     let offsetValues = ["offsetcurrent", "offsetnexthour"];
 
     document.getElementById("default_task_due_offset").style.visibility = offsetValues.includes(
       defaultDue
     )
       ? ""
@@ -98,17 +98,17 @@ var gCalendarGeneralPane = {
     )
       ? ""
       : "hidden";
 
     updateMenuLabelsPlural("default_task_start_offset_text", "default_task_start_offset_units");
     updateMenuLabelsPlural("default_task_due_offset_text", "default_task_due_offset_units");
   },
 
-  initializeTodaypaneMenu: function() {
+  initializeTodaypaneMenu() {
     // Assign the labels for the menuitem
     let soondaysMenu = document.getElementById("soondays-menulist");
     let items = soondaysMenu.getElementsByTagName("menuitem");
     for (let menuItem of items) {
       let menuitemValue = Number(menuItem.value);
       if (menuitemValue > 7) {
         menuItem.label = unitPluralForm(menuitemValue / 7, "weeks");
       } else {
--- a/calendar/base/content/preferences/views.js
+++ b/calendar/base/content/preferences/views.js
@@ -27,28 +27,28 @@ Preferences.addAll([
 /**
  * Global Object to hold methods for the views pref pane
  */
 var gViewsPane = {
   /**
    * Initialize the views pref pane. Sets up dialog controls to match the
    * values set in prefs.
    */
-  init: function() {
+  init() {
     this.updateViewEndMenu(Preferences.get("calendar.view.daystarthour").value);
     this.updateViewStartMenu(Preferences.get("calendar.view.dayendhour").value);
     this.updateViewWorkDayCheckboxes(Preferences.get("calendar.week.start").value);
     this.initializeViewStartEndMenus();
   },
 
   /**
    * Initialize the strings for the  "day starts at" and "day ends at"
    * menulists. This is needed to respect locales that use AM/PM.
    */
-  initializeViewStartEndMenus: function() {
+  initializeViewStartEndMenus() {
     const { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
 
     let calTime = cal.createDateTime();
     calTime.minute = 0;
 
     let timeFormatter = cal.getDateFormatter();
 
     // 1 to 23 instead of 0 to 24 to keep midnight & noon as the localized strings
@@ -67,50 +67,50 @@ var gViewsPane = {
   },
 
   /**
    * Updates the view end menu to only display hours after the selected view
    * start.
    *
    * @param aStartValue       The value selected for view start.
    */
-  updateViewEndMenu: function(aStartValue) {
+  updateViewEndMenu(aStartValue) {
     let endMenuKids = document.getElementById("dayendhourpopup").children;
     for (let i = 0; i < endMenuKids.length; i++) {
       if (Number(endMenuKids[i].value) <= Number(aStartValue)) {
         endMenuKids[i].setAttribute("hidden", true);
       } else {
         endMenuKids[i].removeAttribute("hidden");
       }
     }
   },
 
   /**
    * Updates the view start menu to only display hours before the selected view
    * end.
    *
    * @param aEndValue         The value selected for view end.
    */
-  updateViewStartMenu: function(aEndValue) {
+  updateViewStartMenu(aEndValue) {
     let startMenuKids = document.getElementById("daystarthourpopup").children;
     for (let i = 0; i < startMenuKids.length; i++) {
       if (Number(startMenuKids[i].value) >= Number(aEndValue)) {
         startMenuKids[i].setAttribute("hidden", true);
       } else {
         startMenuKids[i].removeAttribute("hidden");
       }
     }
   },
 
   /**
    * Update the workday checkboxes based on the start of the week.
    *
    * @Param weekStart         The (0-based) index of the weekday the week
    *                            should start at.
    */
-  updateViewWorkDayCheckboxes: function(weekStart) {
+  updateViewWorkDayCheckboxes(weekStart) {
     weekStart = Number(weekStart);
     for (let i = weekStart; i < weekStart + 7; i++) {
       let checkbox = document.getElementById("dayoff" + (i % 7));
       checkbox.parentNode.appendChild(checkbox);
     }
   },
 };
--- a/calendar/base/content/today-pane.js
+++ b/calendar/base/content/today-pane.js
@@ -24,17 +24,17 @@ var TodayPane = {
     startY: 0,
     distance: 0,
     session: false,
   },
 
   /**
    * Load Handler, sets up the today pane controls.
    */
-  onLoad: async function() {
+  async onLoad() {
     await agendaListbox.init();
 
     TodayPane.paneViews = [
       cal.l10n.getCalString("eventsandtasks"),
       cal.l10n.getCalString("tasksonly"),
       cal.l10n.getCalString("eventsonly"),
     ];
 
@@ -49,34 +49,34 @@ var TodayPane = {
     });
 
     Services.obs.addObserver(TodayPane, "defaultTimezoneChanged");
   },
 
   /**
    * Unload handler, cleans up the today pane on window unload.
    */
-  onUnload: function() {
+  onUnload() {
     Services.obs.removeObserver(TodayPane, "defaultTimezoneChanged");
   },
 
   /**
    * React if the default timezone changes.
    */
-  observe: function() {
+  observe() {
     if (this.start !== null) {
       this.setDay(this.start.getInTimezone(cal.dtz.defaultTimezone));
     }
   },
 
   /**
    * Sets up the label for the switcher that allows switching between today pane
    * views. (event+task, task only, event only)
    */
-  updateDisplay: function() {
+  updateDisplay() {
     let agendaIsVisible = document.getElementById("agenda-panel").isVisible(gCurrentMode);
     let todoIsVisible = document.getElementById("todo-tab-panel").isVisible(gCurrentMode);
     let index = 2;
     if (agendaIsVisible && todoIsVisible) {
       index = 0;
     } else if (!agendaIsVisible && todoIsVisible) {
       index = 1;
     } else if (agendaIsVisible && !todoIsVisible) {
@@ -131,17 +131,17 @@ var TodayPane = {
     document.dispatchEvent(new CustomEvent("viewresize", { bubbles: true }));
   },
 
   /**
    * Updates the applied filter and show completed view of the unifinder todo.
    *
    * @param {String} [filter] - The filter name to set.
    */
-  updateCalendarToDoUnifinder: function(filter) {
+  updateCalendarToDoUnifinder(filter) {
     let tree = document.getElementById("unifinder-todo-tree");
 
     // Set up hiding completed tasks for the unifinder-todo tree
     filter = filter || tree.getAttribute("filterValue") || "throughcurrent";
     tree.setAttribute("filterValue", filter);
 
     document
       .querySelectorAll('menuitem[command="calendar_task_filter_todaypane_command"][type="radio"]')
@@ -167,40 +167,40 @@ var TodayPane = {
     // update the filter
     tree.showCompleted = showCompleted;
     tree.updateFilter(filter);
   },
 
   /**
    * Go to month/week/day views when double-clicking a label inside miniday
    */
-  onDoubleClick: function(aEvent) {
+  onDoubleClick(aEvent) {
     if (aEvent.button == 0) {
       if (aEvent.target.id == "datevalue-label") {
         switchCalendarView("day", true);
       } else if (aEvent.target.parentNode.id == "weekdayNameContainer") {
         switchCalendarView("day", true);
       } else if (aEvent.target.id == "currentWeek-label") {
         switchCalendarView("week", true);
       } else if (aEvent.target.parentNode.id == "monthNameContainer") {
         switchCalendarView("month", true);
       } else {
         return;
       }
       let title = document.getElementById("calendar-tab-button").getAttribute("tooltiptext");
-      document.getElementById("tabmail").openTab("calendar", { title: title });
+      document.getElementById("tabmail").openTab("calendar", { title });
       currentView().goToDay(agendaListbox.today.start);
     }
   },
 
   /**
    * Set conditions about start dragging on day-label or start switching
    * with time on navigation buttons.
    */
-  onMousedown: function(aEvent, aDir) {
+  onMousedown(aEvent, aDir) {
     if (aEvent.button != 0) {
       return;
     }
     let element = aEvent.target;
     if (element.id == "previous-day-button" || element.id == "next-day-button") {
       // Start switching days by pressing, without release, the navigation buttons
       element.addEventListener("mouseout", TodayPane.stopSwitching);
       element.addEventListener("mouseup", TodayPane.stopSwitching);
@@ -218,17 +218,17 @@ var TodayPane = {
   },
 
   /**
    * Figure out the mouse distance from the center of the day's label
    * to the current position.
    *
    * NOTE: This function is usually called without the correct this pointer.
    */
-  onMousemove: function(aEvent) {
+  onMousemove(aEvent) {
     const MIN_DRAG_DISTANCE_SQ = 49;
     let x = aEvent.clientX - TodayPane.minidayDrag.startX;
     let y = aEvent.clientY - TodayPane.minidayDrag.startY;
     if (TodayPane.minidayDrag.session) {
       if (x * x + y * y >= MIN_DRAG_DISTANCE_SQ) {
         let distance = Math.floor(Math.sqrt(x * x + y * y) - Math.sqrt(MIN_DRAG_DISTANCE_SQ));
         // Dragging on the left/right side, the day date decrease/increase
         TodayPane.minidayDrag.distance = x > 0 ? distance : -distance;
@@ -250,17 +250,17 @@ var TodayPane = {
       TodayPane.updateAdvanceTimer();
     }
   },
 
   /**
    * Figure out the days switching speed according to the position (when
    * dragging) or time elapsed (when pressing buttons).
    */
-  updateAdvanceTimer: function(aEvent, aDir) {
+  updateAdvanceTimer(aEvent, aDir) {
     const INITIAL_TIME = 400;
     const REL_DISTANCE = 8;
     const MINIMUM_TIME = 100;
     const ACCELERATE_COUNT_LIMIT = 7;
     const SECOND_STEP_TIME = 200;
     if (TodayPane.minidayDrag.session) {
       // Dragging the day label: days switch with cursor distance and time.
       let dir = (TodayPane.minidayDrag.distance > 0) - (TodayPane.minidayDrag.distance < 0);
@@ -291,17 +291,17 @@ var TodayPane = {
   },
 
   /**
    * Stop automatic days switching when releasing the mouse button or the
    * position is outside the window.
    *
    * NOTE: This function is usually called without the correct this pointer.
    */
-  stopSwitching: function(aEvent) {
+  stopSwitching(aEvent) {
     let element = aEvent.target;
     if (
       TodayPane.minidayDrag.session &&
       aEvent.type == "mouseout" &&
       element.id != "messengerWindow"
     ) {
       return;
     }
@@ -329,17 +329,17 @@ var TodayPane = {
   },
 
   /**
    * Cycle the view shown in the today pane (event+task, event, task).
    *
    * @param aCycleForward     If true, the views are cycled in the forward
    *                            direction, otherwise in the opposite direction
    */
-  cyclePaneView: function(aCycleForward) {
+  cyclePaneView(aCycleForward) {
     if (this.paneViews == null) {
       return;
     }
     let index = parseInt(document.getElementById("today-pane-header").getAttribute("index"), 10);
     index = index + aCycleForward;
     let nViewLen = this.paneViews.length;
     if (index >= nViewLen) {
       index = 0;
@@ -353,44 +353,44 @@ var TodayPane = {
     todoPanel.setVisible(isTodoPanelVisible);
     agendaPanel.setVisible(isAgendaPanelVisible);
     this.updateDisplay();
   },
 
   /**
    * Shows short weekday names in the weekdayNameContainer
    */
-  setShortWeekdays: function() {
+  setShortWeekdays() {
     let weekdisplaydeck = document.getElementById("weekdayNameContainer");
     let children = weekdisplaydeck.children;
 
     for (let i = 0; i < children.length; i++) {
       children[i].setAttribute("value", cal.l10n.getDateFmtString(`day.${i + 1}.Mmm`));
     }
   },
 
   /**
    * Sets the shown date from a JSDate.
    *
    * @param aNewDate      The date to show.
    */
-  setDaywithjsDate: function(aNewDate) {
+  setDaywithjsDate(aNewDate) {
     let newdatetime = cal.dtz.jsDateToDateTime(aNewDate, cal.dtz.floating);
     newdatetime = newdatetime.getInTimezone(cal.dtz.defaultTimezone);
     this.setDay(newdatetime, true);
   },
 
   /**
    * Sets the first day shown in the today pane.
    *
    * @param aNewDate                  The calIDateTime to set.
    * @param aDontUpdateMinimonth      If true, the minimonth will not be
    *                                    updated to show the same date.
    */
-  setDay: function(aNewDate, aDontUpdateMinimonth) {
+  setDay(aNewDate, aDontUpdateMinimonth) {
     if (this.setDay.alreadySettingDay) {
       // If we update the mini-month, this function gets called again.
       return;
     }
     if (!document.getElementById("agenda-panel").isVisible()) {
       // If the agenda panel isn't visible, there's no need to set the day.
       return;
     }
@@ -431,61 +431,61 @@ var TodayPane = {
   },
 
   /**
    * Advance by a given number of days in the today pane.
    *
    * @param aDir      The number of days to advance. Negative numbers advance
    *                    backwards in time.
    */
-  advance: function(aDir) {
+  advance(aDir) {
     if (aDir != 0) {
       this.start.day += aDir;
       this.setDay(this.start);
     }
   },
 
   /**
    * Checks if the today pane is showing today's date.
    */
-  showsToday: function() {
+  showsToday() {
     return cal.dtz.sameDay(cal.dtz.now(), this.start);
   },
 
   /**
    * Update the period headers in the agenda listbox using the today pane's
    * start date.
    */
-  updatePeriod: function() {
+  updatePeriod() {
     agendaListbox.refreshPeriodDates(this.start.clone());
     if (document.getElementById("todo-tab-panel").isVisible()) {
       this.updateCalendarToDoUnifinder();
     }
   },
 
   /**
    * Display a certain section in the minday/minimonth part of the todaypane.
    *
    * @param aSection      The section to display
    */
-  displayMiniSection: function(aSection) {
+  displayMiniSection(aSection) {
     document.getElementById("today-minimonth-box").setVisible(aSection == "minimonth");
     document.getElementById("mini-day-box").setVisible(aSection == "miniday");
     document.getElementById("today-none-box").setVisible(aSection == "none");
     setBooleanAttribute(
       document.getElementById("today-minimonth"),
       "freebusy",
       aSection == "minimonth"
     );
   },
 
   /**
    * Handler function to update the today-pane when the current mode changes.
    */
-  onModeModified: function() {
+  onModeModified() {
     let todayPanePanel = document.getElementById("today-pane-panel");
     // Store the previous mode panel's width.
     todayPanePanel.setModeAttribute("modewidths", todayPanePanel.width, TodayPane.previousMode);
 
     TodayPane.updateDisplay();
     TodayPane.updateSplitterState();
     todayPanePanel.width = todayPanePanel.getModeAttribute("modewidths");
     TodayPane.previousMode = gCurrentMode;
@@ -495,55 +495,55 @@ var TodayPane = {
     return document.getElementById("today-pane-panel").isVisible();
   },
 
   /**
    * Toggle the today-pane and update its visual appearance.
    *
    * @param aEvent        The DOM event occurring on activated command.
    */
-  toggleVisibility: function(aEvent) {
+  toggleVisibility(aEvent) {
     document.getElementById("today-pane-panel").togglePane(aEvent);
     TodayPane.updateDisplay();
     TodayPane.updateSplitterState();
   },
 
   /**
    * Update the today-splitter state.
    */
-  updateSplitterState: function() {
+  updateSplitterState() {
     let splitter = document.getElementById("today-splitter");
     if (this.isVisible) {
       splitter.removeAttribute("hidden");
       splitter.setAttribute("state", "open");
     } else {
       splitter.setAttribute("hidden", "true");
     }
   },
 
   /**
    * Generates the todaypane toggle command when the today-splitter
    * is being collapsed or uncollapsed.
    */
-  onCommandTodaySplitter: function() {
+  onCommandTodaySplitter() {
     let todaypane = document.getElementById("today-pane-panel");
     let splitter = document.getElementById("today-splitter");
     let splitterCollapsed = splitter.getAttribute("state") == "collapsed";
 
     todaypane.setModeAttribute("modewidths", todaypane.getAttribute("width"));
 
     if (splitterCollapsed == todaypane.isVisible()) {
       document.getElementById("calendar_toggle_todaypane_command").doCommand();
     }
   },
 
   /**
    * Checks if the todayPaneStatusLabel should be hidden.
    */
-  showTodayPaneStatusLabel: function() {
+  showTodayPaneStatusLabel() {
     let attributeValue =
       Services.prefs.getBoolPref("calendar.view.showTodayPaneStatusLabel", true) && "false";
     setElementValue(
       document.getElementById("calendar-status-todaypane-button"),
       !attributeValue,
       "hideLabel"
     );
   },
--- a/calendar/base/modules/calExtract.jsm
+++ b/calendar/base/modules/calExtract.jsm
@@ -50,17 +50,17 @@ function Extractor(fallbackLocale, daySt
   }
 }
 
 Extractor.prototype = {
   /**
    * Removes confusing data like urls, timezones and phone numbers from email
    * Also removes standard signatures and quoted content from previous emails
    */
-  cleanup: function() {
+  cleanup() {
     // XXX remove earlier correspondence
     // ideally this should be considered with lower certainty to fill in
     // missing information
 
     // remove last line preceding quoted message and first line of the quote
     this.email = this.email.replace(/\r?\n[^>].*\r?\n>+.*$/m, "");
     // remove the rest of quoted content
     this.email = this.email.replace(/^>+.*$/gm, "");
@@ -75,46 +75,46 @@ Extractor.prototype = {
 
     // remove standard signature
     this.email = this.email.replace(/\r?\n-- \r?\n[\S\s]+$/, "");
 
     // XXX remove timezone info, for now
     this.email = this.email.replace(/gmt[+-]\d{2}:\d{2}/gi, "");
   },
 
-  checkBundle: function(locale) {
+  checkBundle(locale) {
     let path = this.bundleUrl.replace(/LOCALE/g, locale);
     let bundle = Services.strings.createBundle(path);
 
     try {
       bundle.GetStringFromName("from.today");
       return true;
     } catch (ex) {
       return false;
     }
   },
 
-  avgNonAsciiCharCode: function() {
+  avgNonAsciiCharCode() {
     let sum = 0;
     let cnt = 0;
 
     for (let i = 0; i < this.email.length; i++) {
       let char = this.email.charCodeAt(i);
       if (char > 128) {
         sum += char;
         cnt++;
       }
     }
 
     let nonAscii = sum / cnt || 0;
     cal.LOG("[calExtract] Average non-ascii charcode: " + nonAscii);
     return nonAscii;
   },
 
-  setLanguage: function() {
+  setLanguage() {
     let path;
 
     if (this.fixedLang) {
       if (this.checkBundle(this.fallbackLocale)) {
         cal.LOG(
           "[calExtract] Fixed locale was used to choose " + this.fallbackLocale + " patterns."
         );
       } else {
@@ -246,17 +246,17 @@ Extractor.prototype = {
    * @param body  email body
    * @param now   reference time against which relative times are interpreted,
    *                  when null current time is used
    * @param sel   selection object of email content, when defined times
    *                  outside selection are disgarded
    * @param title email title
    * @return      sorted list of extracted datetime objects
    */
-  extract: function(title, body, now, sel) {
+  extract(title, body, now, sel) {
     let initial = {};
     this.collected = [];
     this.email = title + "\r\n" + body;
     if (now != null) {
       this.now = now;
     }
 
     initial.year = now.getFullYear();
@@ -349,17 +349,17 @@ Extractor.prototype = {
       this.markSelected(sel, title);
     }
     this.markContained();
     this.collected = this.collected.sort(this.sort);
 
     return this.collected;
   },
 
-  extractDayMonthYear: function(pattern, relation) {
+  extractDayMonthYear(pattern, relation) {
     let alts = this.getRepPatterns(pattern, ["(\\d{1,2})", "(\\d{1,2})", "(\\d{2,4})"]);
 
     let res;
     for (let alt in alts) {
       let positions = alts[alt].positions;
       let re = new RegExp(alts[alt].pattern, "ig");
 
       while ((res = re.exec(this.email)) != null) {
@@ -383,17 +383,17 @@ Extractor.prototype = {
               pattern
             );
           }
         }
       }
     }
   },
 
-  extractDayMonthNameYear: function(pattern, relation) {
+  extractDayMonthNameYear(pattern, relation) {
     let alts = this.getRepPatterns(pattern, [
       "(\\d{1,2})",
       "(" + this.allMonths + ")",
       "(\\d{2,4})",
     ]);
 
     let res;
     for (let alt in alts) {
@@ -427,17 +427,17 @@ Extractor.prototype = {
               }
             }
           }
         }
       }
     }
   },
 
-  extractRelativeDay: function(pattern, relation, offset) {
+  extractRelativeDay(pattern, relation, offset) {
     let re = new RegExp(this.getPatterns(pattern), "ig");
     let res;
     if ((res = re.exec(this.email)) != null) {
       if (!this.limitChars(res, this.email)) {
         let item = new Date(this.now.getTime() + 60 * 60 * 24 * 1000 * offset);
         let rev = this.prefixSuffixStartEnd(res, relation, this.email);
         this.guess(
           item.getFullYear(),
@@ -450,17 +450,17 @@ Extractor.prototype = {
           rev.pattern,
           rev.relation,
           pattern
         );
       }
     }
   },
 
-  extractDayMonthName: function(pattern, relation) {
+  extractDayMonthName(pattern, relation) {
     let alts = this.getRepPatterns(pattern, [
       "(\\d{1,2}" + this.marker + this.dailyNumbers + ")",
       "(" + this.allMonths + ")",
     ]);
     let res;
     for (let alt in alts) {
       let exp = alts[alt].pattern.split(this.marker).join("|");
       let positions = alts[alt].positions;
@@ -470,17 +470,17 @@ Extractor.prototype = {
         if (!this.limitNums(res, this.email) && !this.limitChars(res, this.email)) {
           let day = this.parseNumber(res[positions[1]], this.numbers);
           let month = res[positions[2]];
 
           if (this.isValidDay(day)) {
             for (let i = 0; i < 12; i++) {
               let months = this.unescape(this.months[i]).split("|");
               if (months.includes(month.toLowerCase())) {
-                let date = { year: this.now.getFullYear(), month: i + 1, day: day };
+                let date = { year: this.now.getFullYear(), month: i + 1, day };
                 if (this.isPastDate(date, this.now)) {
                   // find next such date
                   let item = new Date(this.now.getTime());
                   while (true) {
                     item.setDate(item.getDate() + 1);
                     if (item.getMonth() == date.month - 1 && item.getDate() == date.day) {
                       date.year = item.getFullYear();
                       break;
@@ -505,30 +505,30 @@ Extractor.prototype = {
               }
             }
           }
         }
       }
     }
   },
 
-  extractDayMonth: function(pattern, relation) {
+  extractDayMonth(pattern, relation) {
     let alts = this.getRepPatterns(pattern, ["(\\d{1,2})", "(\\d{1,2})"]);
     let res;
     for (let alt in alts) {
       let re = new RegExp(alts[alt].pattern, "ig");
       let positions = alts[alt].positions;
 
       while ((res = re.exec(this.email)) != null) {
         if (!this.limitNums(res, this.email) && !this.limitChars(res, this.email)) {
           let day = parseInt(res[positions[1]], 10);
           let month = parseInt(res[positions[2]], 10);
 
           if (this.isValidMonth(month) && this.isValidDay(day)) {
-            let date = { year: this.now.getFullYear(), month: month, day: day };
+            let date = { year: this.now.getFullYear(), month, day };
 
             if (this.isPastDate(date, this.now)) {
               // find next such date
               let item = new Date(this.now.getTime());
               while (true) {
                 item.setDate(item.getDate() + 1);
                 if (item.getMonth() == date.month - 1 && item.getDate() == date.day) {
                   date.year = item.getFullYear();
@@ -551,17 +551,17 @@ Extractor.prototype = {
               pattern
             );
           }
         }
       }
     }
   },
 
-  extractDate: function(pattern, relation) {
+  extractDate(pattern, relation) {
     let alts = this.getRepPatterns(pattern, ["(\\d{1,2}" + this.marker + this.dailyNumbers + ")"]);
     let res;
     for (let alt in alts) {
       let exp = alts[alt].pattern.split(this.marker).join("|");
       let re = new RegExp(exp, "ig");
 
       while ((res = re.exec(this.email)) != null) {
         if (!this.limitNums(res, this.email) && !this.limitChars(res, this.email)) {
@@ -593,17 +593,17 @@ Extractor.prototype = {
               true
             );
           }
         }
       }
     }
   },
 
-  extractWeekDay: function(pattern, relation) {
+  extractWeekDay(pattern, relation) {
     let days = [];
     for (let i = 0; i < 7; i++) {
       days[i] = this.getPatterns(pattern + i);
       let re = new RegExp(days[i], "ig");
       let res = re.exec(this.email);
       if (res) {
         if (!this.limitChars(res, this.email)) {
           let date = new Date();
@@ -628,17 +628,17 @@ Extractor.prototype = {
             pattern + i,
             true
           );
         }
       }
     }
   },
 
-  extractHour: function(pattern, relation, meridiem) {
+  extractHour(pattern, relation, meridiem) {
     let alts = this.getRepPatterns(pattern, ["(\\d{1,2}" + this.marker + this.hourlyNumbers + ")"]);
     let res;
     for (let alt in alts) {
       let exp = alts[alt].pattern.split(this.marker).join("|");
       let re = new RegExp(exp, "ig");
 
       while ((res = re.exec(this.email)) != null) {
         if (!this.limitNums(res, this.email) && !this.limitChars(res, this.email)) {
@@ -668,17 +668,17 @@ Extractor.prototype = {
               true
             );
           }
         }
       }
     }
   },
 
-  extractHalfHour: function(pattern, relation, direction) {
+  extractHalfHour(pattern, relation, direction) {
     let alts = this.getRepPatterns(pattern, ["(\\d{1,2}" + this.marker + this.hourlyNumbers + ")"]);
     let res;
     for (let alt in alts) {
       let exp = alts[alt].pattern.split(this.marker).join("|");
       let re = new RegExp(exp, "ig");
 
       while ((res = re.exec(this.email)) != null) {
         if (!this.limitNums(res, this.email) && !this.limitChars(res, this.email)) {
@@ -709,17 +709,17 @@ Extractor.prototype = {
               true
             );
           }
         }
       }
     }
   },
 
-  extractHourMinutes: function(pattern, relation, meridiem) {
+  extractHourMinutes(pattern, relation, meridiem) {
     let alts = this.getRepPatterns(pattern, ["(\\d{1,2})", "(\\d{2})"]);
     let res;
     for (let alt in alts) {
       let positions = alts[alt].positions;
       let re = new RegExp(alts[alt].pattern, "ig");
 
       while ((res = re.exec(this.email)) != null) {
         if (!this.limitNums(res, this.email) && !this.limitChars(res, this.email)) {
@@ -749,17 +749,17 @@ Extractor.prototype = {
               pattern
             );
           }
         }
       }
     }
   },
 
-  extractTime: function(pattern, relation, hour, minute) {
+  extractTime(pattern, relation, hour, minute) {
     let re = new RegExp(this.getPatterns(pattern), "ig");
     let res;
     if ((res = re.exec(this.email)) != null) {
       if (!this.limitChars(res, this.email)) {
         let rev = this.prefixSuffixStartEnd(res, relation, this.email);
         this.guess(
           null,
           null,
@@ -771,17 +771,17 @@ Extractor.prototype = {
           rev.pattern,
           rev.relation,
           pattern
         );
       }
     }
   },
 
-  extractDuration: function(pattern, unit) {
+  extractDuration(pattern, unit) {
     let alts = this.getRepPatterns(pattern, ["(\\d{1,2}" + this.marker + this.dailyNumbers + ")"]);
     let res;
     for (let alt in alts) {
       let exp = alts[alt].pattern.split(this.marker).join("|");
       let re = new RegExp(exp, "ig");
 
       while ((res = re.exec(this.email)) != null) {
         if (!this.limitNums(res, this.email) && !this.limitChars(res, this.email)) {
@@ -795,17 +795,17 @@ Extractor.prototype = {
           guess.relation = rev.relation;
           guess.pattern = pattern;
           this.collected.push(guess);
         }
       }
     }
   },
 
-  markContained: function() {
+  markContained() {
     for (let outer = 0; outer < this.collected.length; outer++) {
       for (let inner = 0; inner < this.collected.length; inner++) {
         // included but not exactly the same
         if (
           outer != inner &&
           this.collected[outer].start &&
           this.collected[outer].end &&
           this.collected[inner].start &&
@@ -824,17 +824,17 @@ Extractor.prototype = {
               this.collected[inner].str
           );
           this.collected[inner].relation = "notadatetime";
         }
       }
     }
   },
 
-  markSelected: function(sel, title) {
+  markSelected(sel, title) {
     if (sel.rangeCount > 0) {
       // mark the ones to not use
       for (let i = 0; i < sel.rangeCount; i++) {
         cal.LOG("[calExtract] Selection " + i + " is " + sel);
         for (let j = 0; j < this.collected.length; j++) {
           let selection = sel.getRangeAt(i).toString();
 
           if (
@@ -848,17 +848,17 @@ Extractor.prototype = {
             );
             this.collected[j].relation = "notadatetime";
           }
         }
       }
     }
   },
 
-  sort: function(one, two) {
+  sort(one, two) {
     let rc;
     // sort the guess from email date as the last one
     if (one.start == null && two.start != null) {
       return 1;
     } else if (one.start != null && two.start == null) {
       return -1;
     } else if (one.start == null && two.start == null) {
       return 0;
@@ -871,32 +871,31 @@ Extractor.prototype = {
       rc = (one.year > two.year) - (one.year < two.year);
       if (rc == 0) {
         rc = (one.month > two.month) - (one.month < two.month);
         if (rc == 0) {
           rc = (one.day > two.day) - (one.day < two.day);
         }
       }
       return rc;
-    } else {
-      rc = (one.hour > two.hour) - (one.hour < two.hour);
-      if (rc == 0) {
-        rc = (one.minute > two.minute) - (one.minute < two.minute);
-      }
-      return rc;
     }
+    rc = (one.hour > two.hour) - (one.hour < two.hour);
+    if (rc == 0) {
+      rc = (one.minute > two.minute) - (one.minute < two.minute);
+    }
+    return rc;
   },
 
   /**
    * Guesses start time from list of guessed datetimes
    *
    * @param isTask    whether start time should be guessed for task or event
    * @return          datetime object for start time
    */
-  guessStart: function(isTask) {
+  guessStart(isTask) {
     let startTimes = this.collected.filter(val => val.relation == "start");
     if (startTimes.length == 0) {
       return {};
     }
 
     for (let val in startTimes) {
       cal.LOG("[calExtract] Start: " + JSON.stringify(startTimes[val]));
     }
@@ -962,153 +961,152 @@ Extractor.prototype = {
 
   /**
    * Guesses end time from list of guessed datetimes relative to start time
    *
    * @param start         start time to consider when guessing
    * @param doGuessStart  whether start time should be guessed for task or event
    * @return              datetime object for end time
    */
-  guessEnd: function(start, doGuessStart) {
+  guessEnd(start, doGuessStart) {
     let guess = {};
     let endTimes = this.collected.filter(val => val.relation == "end");
     let durations = this.collected.filter(val => val.relation == "duration");
     if (endTimes.length == 0 && durations.length == 0) {
       return {};
-    } else {
-      for (let val in endTimes) {
-        cal.LOG("[calExtract] End: " + JSON.stringify(endTimes[val]));
-      }
+    }
+    for (let val in endTimes) {
+      cal.LOG("[calExtract] End: " + JSON.stringify(endTimes[val]));
+    }
 
-      let wDay = endTimes.filter(val => val.day != null);
-      let wDayNA = wDay.filter(val => val.ambiguous === undefined);
-      let wMinute = endTimes.filter(val => val.minute != null);
-      let wMinuteNA = wMinute.filter(val => val.ambiguous === undefined);
+    let wDay = endTimes.filter(val => val.day != null);
+    let wDayNA = wDay.filter(val => val.ambiguous === undefined);
+    let wMinute = endTimes.filter(val => val.minute != null);
+    let wMinuteNA = wMinute.filter(val => val.ambiguous === undefined);
 
-      // first set non-ambiguous dates
-      let pos = doGuessStart ? 0 : wDayNA.length - 1;
-      if (wDayNA.length != 0) {
-        guess.year = wDayNA[pos].year;
-        guess.month = wDayNA[pos].month;
-        guess.day = wDayNA[pos].day;
-        // then ambiguous dates
-      } else if (wDay.length != 0) {
-        pos = doGuessStart ? 0 : wDay.length - 1;
-        guess.year = wDay[pos].year;
-        guess.month = wDay[pos].month;
-        guess.day = wDay[pos].day;
-      }
+    // first set non-ambiguous dates
+    let pos = doGuessStart ? 0 : wDayNA.length - 1;
+    if (wDayNA.length != 0) {
+      guess.year = wDayNA[pos].year;
+      guess.month = wDayNA[pos].month;
+      guess.day = wDayNA[pos].day;
+      // then ambiguous dates
+    } else if (wDay.length != 0) {
+      pos = doGuessStart ? 0 : wDay.length - 1;
+      guess.year = wDay[pos].year;
+      guess.month = wDay[pos].month;
+      guess.day = wDay[pos].day;
+    }
 
-      // then non-ambiguous times
-      if (wMinuteNA.length != 0) {
-        pos = doGuessStart ? 0 : wMinuteNA.length - 1;
-        guess.hour = wMinuteNA[pos].hour;
-        guess.minute = wMinuteNA[pos].minute;
-        if (guess.day == null || guess.day == start.day) {
-          if (
-            wMinuteNA[pos].hour < start.hour ||
-            (wMinuteNA[pos].hour == start.hour && wMinuteNA[pos].minute < start.minute)
-          ) {
-            let nextDay = new Date(start.year, start.month - 1, start.day);
-            nextDay.setTime(nextDay.getTime() + 60 * 60 * 24 * 1000);
-            guess.year = nextDay.getFullYear();
-            guess.month = nextDay.getMonth() + 1;
-            guess.day = nextDay.getDate();
-          }
+    // then non-ambiguous times
+    if (wMinuteNA.length != 0) {
+      pos = doGuessStart ? 0 : wMinuteNA.length - 1;
+      guess.hour = wMinuteNA[pos].hour;
+      guess.minute = wMinuteNA[pos].minute;
+      if (guess.day == null || guess.day == start.day) {
+        if (
+          wMinuteNA[pos].hour < start.hour ||
+          (wMinuteNA[pos].hour == start.hour && wMinuteNA[pos].minute < start.minute)
+        ) {
+          let nextDay = new Date(start.year, start.month - 1, start.day);
+          nextDay.setTime(nextDay.getTime() + 60 * 60 * 24 * 1000);
+          guess.year = nextDay.getFullYear();
+          guess.month = nextDay.getMonth() + 1;
+          guess.day = nextDay.getDate();
         }
-        // and ambiguous times
-      } else if (wMinute.length != 0) {
-        pos = doGuessStart ? 0 : wMinute.length - 1;
-        guess.hour = wMinute[pos].hour;
-        guess.minute = wMinute[pos].minute;
-        if (guess.day == null || guess.day == start.day) {
-          if (
-            wMinute[pos].hour < start.hour ||
-            (wMinute[pos].hour == start.hour && wMinute[pos].minute < start.minute)
-          ) {
-            let nextDay = new Date(start.year, start.month - 1, start.day);
-            nextDay.setTime(nextDay.getTime() + 60 * 60 * 24 * 1000);
-            guess.year = nextDay.getFullYear();
-            guess.month = nextDay.getMonth() + 1;
-            guess.day = nextDay.getDate();
-          }
+      }
+      // and ambiguous times
+    } else if (wMinute.length != 0) {
+      pos = doGuessStart ? 0 : wMinute.length - 1;
+      guess.hour = wMinute[pos].hour;
+      guess.minute = wMinute[pos].minute;
+      if (guess.day == null || guess.day == start.day) {
+        if (
+          wMinute[pos].hour < start.hour ||
+          (wMinute[pos].hour == start.hour && wMinute[pos].minute < start.minute)
+        ) {
+          let nextDay = new Date(start.year, start.month - 1, start.day);
+          nextDay.setTime(nextDay.getTime() + 60 * 60 * 24 * 1000);
+          guess.year = nextDay.getFullYear();
+          guess.month = nextDay.getMonth() + 1;
+          guess.day = nextDay.getDate();
         }
       }
+    }
+
+    // fill in date when time was guessed
+    if (guess.minute != null && guess.day == null) {
+      guess.year = start.year;
+      guess.month = start.month;
+      guess.day = start.day;
+    }
+
+    // fill in end from total duration
+    if (guess.day == null && guess.hour == null) {
+      let duration = 0;
+
+      for (let val in durations) {
+        duration += durations[val].duration;
+        cal.LOG("[calExtract] Dur: " + JSON.stringify(durations[val]));
+      }
 
-      // fill in date when time was guessed
-      if (guess.minute != null && guess.day == null) {
-        guess.year = start.year;
-        guess.month = start.month;
-        guess.day = start.day;
-      }
-
-      // fill in end from total duration
-      if (guess.day == null && guess.hour == null) {
-        let duration = 0;
-
-        for (let val in durations) {
-          duration += durations[val].duration;
-          cal.LOG("[calExtract] Dur: " + JSON.stringify(durations[val]));
+      if (duration != 0) {
+        let startDate = new Date(start.year, start.month - 1, start.day);
+        if ("hour" in start) {
+          startDate.setHours(start.hour);
+          startDate.setMinutes(start.minute);
+        } else {
+          startDate.setHours(0);
+          startDate.setMinutes(0);
         }
 
-        if (duration != 0) {
-          let startDate = new Date(start.year, start.month - 1, start.day);
-          if ("hour" in start) {
-            startDate.setHours(start.hour);
-            startDate.setMinutes(start.minute);
-          } else {
-            startDate.setHours(0);
-            startDate.setMinutes(0);
-          }
-
-          let endTime = new Date(startDate.getTime() + duration * 60 * 1000);
-          guess.year = endTime.getFullYear();
-          guess.month = endTime.getMonth() + 1;
-          guess.day = endTime.getDate();
-          if (!(endTime.getHours() == 0 && endTime.getMinutes() == 0)) {
-            guess.hour = endTime.getHours();
-            guess.minute = endTime.getMinutes();
-          }
+        let endTime = new Date(startDate.getTime() + duration * 60 * 1000);
+        guess.year = endTime.getFullYear();
+        guess.month = endTime.getMonth() + 1;
+        guess.day = endTime.getDate();
+        if (!(endTime.getHours() == 0 && endTime.getMinutes() == 0)) {
+          guess.hour = endTime.getHours();
+          guess.minute = endTime.getMinutes();
         }
       }
+    }
 
-      // no zero or negative length events/tasks
-      let startTime = new Date(
-        start.year || 0,
-        start.month - 1 || 0,
-        start.day || 0,
-        start.hour || 0,
-        start.minute || 0
-      ).getTime();
-      let guessTime = new Date(
-        guess.year || 0,
-        guess.month - 1 || 0,
-        guess.day || 0,
-        guess.hour || 0,
-        guess.minute || 0
-      ).getTime();
-      if (guessTime <= startTime) {
-        guess.year = null;
-        guess.month = null;
-        guess.day = null;
-        guess.hour = null;
-        guess.minute = null;
-      }
+    // no zero or negative length events/tasks
+    let startTime = new Date(
+      start.year || 0,
+      start.month - 1 || 0,
+      start.day || 0,
+      start.hour || 0,
+      start.minute || 0
+    ).getTime();
+    let guessTime = new Date(
+      guess.year || 0,
+      guess.month - 1 || 0,
+      guess.day || 0,
+      guess.hour || 0,
+      guess.minute || 0
+    ).getTime();
+    if (guessTime <= startTime) {
+      guess.year = null;
+      guess.month = null;
+      guess.day = null;
+      guess.hour = null;
+      guess.minute = null;
+    }
 
-      if (guess.year != null && guess.minute == null && doGuessStart) {
-        guess.hour = 0;
-        guess.minute = 0;
-      }
+    if (guess.year != null && guess.minute == null && doGuessStart) {
+      guess.hour = 0;
+      guess.minute = 0;
+    }
 
-      cal.LOG("[calExtract] End picked: " + JSON.stringify(guess));
-      return guess;
-    }
+    cal.LOG("[calExtract] End picked: " + JSON.stringify(guess));
+    return guess;
   },
 
-  getPatterns: function(name) {
+  getPatterns(name) {
     let value;
     try {
       value = this.bundle.GetStringFromName(name);
       if (value.trim() == "") {
         cal.LOG("[calExtract] Pattern not found: " + name);
         return this.defPattern;
       }
 
@@ -1146,17 +1144,17 @@ Extractor.prototype = {
     } catch (ex) {
       cal.LOG("[calExtract] Pattern not found: " + name);
 
       // fake a value to avoid empty regexes creating endless loops
       return this.defPattern;
     }
   },
 
-  getRepPatterns: function(name, replaceables) {
+  getRepPatterns(name, replaceables) {
     let alts = [];
     let patterns = [];
 
     try {
       let value = this.bundle.GetStringFromName(name);
       if (value.trim() == "") {
         cal.LOG("[calExtract] Pattern empty: " + name);
         return alts;
@@ -1202,25 +1200,25 @@ Extractor.prototype = {
 
       for (let val in vals) {
         let positions = [];
         if (replaceables.length == 1) {
           positions[1] = 1;
         } else {
           positions = this.getPositionsFor(vals[val], name, replaceables.length);
         }
-        alts[val] = { pattern: patterns[val], positions: positions };
+        alts[val] = { pattern: patterns[val], positions };
       }
     } catch (ex) {
       cal.LOG("[calExtract] Pattern not found: " + name);
     }
     return alts;
   },
 
-  getPositionsFor: function(str, name, count) {
+  getPositionsFor(str, name, count) {
     let positions = [];
     let re = /#(\d)/g;
     let match;
     let i = 0;
     while ((match = re.exec(str))) {
       i++;
       positions[parseInt(match[1], 10)] = i;
     }
@@ -1231,79 +1229,79 @@ Extractor.prototype = {
         Cu.reportError(
           "[calExtract] Faulty extraction pattern " + name + ", missing parameter #" + i
         );
       }
     }
     return positions;
   },
 
-  cleanPatterns: function(pattern) {
+  cleanPatterns(pattern) {
     // remove whitespace around | if present
     let value = pattern.replace(/\s*\|\s*/g, "|");
     // allow matching for patterns with missing or excessive whitespace
     return this.sanitize(value).replace(/\s+/g, "\\s*");
   },
 
-  isValidYear: function(year) {
+  isValidYear(year) {
     return year >= 2000 && year <= 2050;
   },
 
-  isValidMonth: function(month) {
+  isValidMonth(month) {
     return month >= 1 && month <= 12;
   },
 
-  isValidDay: function(day) {
+  isValidDay(day) {
     return day >= 1 && day <= 31;
   },
 
-  isValidHour: function(hour) {
+  isValidHour(hour) {
     return hour >= 0 && hour <= 23;
   },
 
-  isValidMinute: function(minute) {
+  isValidMinute(minute) {
     return minute >= 0 && minute <= 59;
   },
 
-  isPastDate: function(date, referenceDate) {
+  isPastDate(date, referenceDate) {
     // avoid changing original refDate
     let refDate = new Date(referenceDate.getTime());
     refDate.setHours(0);
     refDate.setMinutes(0);
     refDate.setSeconds(0);
     refDate.setMilliseconds(0);
     let jsDate;
     if (date.day != null) {
       jsDate = new Date(date.year, date.month - 1, date.day);
     }
     return jsDate < refDate;
   },
 
-  normalizeHour: function(hour) {
+  normalizeHour(hour) {
     if (hour < this.dayStart && hour <= 11) {
       return hour + 12;
     }
     return hour;
   },
 
-  normalizeYear: function(year) {
+  normalizeYear(year) {
     return year.length == 2 ? "20" + year : year;
   },
 
-  limitNums: function(res, email) {
+  limitNums(res, email) {
     let pattern = email.substring(res.index, res.index + res[0].length);
     let before = email.charAt(res.index - 1);
     let after = email.charAt(res.index + res[0].length);
     let result =
       (/\d/.exec(before) && /\d/.exec(pattern.charAt(0))) ||
       (/\d/.exec(pattern.charAt(pattern.length - 1)) && /\d/.exec(after));
     return result != null;
   },
 
-  limitChars: function(res, email) {
+  limitChars(res, email) {
     let alphabet = this.getPatterns("alphabet");
     // for languages without regular alphabet surrounding characters are ignored
     if (alphabet == this.defPattern) {
       return false;
     }
 
     let pattern = email.substring(res.index, res.index + res[0].length);
     let before = email.charAt(res.index - 1);
@@ -1311,25 +1309,25 @@ Extractor.prototype = {
 
     let re = new RegExp("[" + alphabet + "]");
     let result =
       (re.exec(before) && re.exec(pattern.charAt(0))) ||
       (re.exec(pattern.charAt(pattern.length - 1)) && re.exec(after));
     return result != null;
   },
 
-  prefixSuffixStartEnd: function(res, relation, email) {
+  prefixSuffixStartEnd(res, relation, email) {
     let pattern = email.substring(res.index, res.index + res[0].length);
     let prev = email.substring(0, res.index);
     let next = email.substring(res.index + res[0].length);
     let prefixSuffix = {
       start: res.index,
       end: res.index + res[0].length,
-      pattern: pattern,
-      relation: relation,
+      pattern,
+      relation,
     };
     let char = "\\s*";
     let psres;
 
     let re = new RegExp("(" + this.getPatterns("end.prefix") + ")" + char + "$", "ig");
     if ((psres = re.exec(prev)) != null) {
       prefixSuffix.relation = "end";
       prefixSuffix.start = psres.index;
@@ -1366,56 +1364,55 @@ Extractor.prototype = {
     re = new RegExp("^" + char + "(" + this.getPatterns("no.datetime.suffix") + ")", "ig");
     if ((psres = re.exec(next)) != null) {
       prefixSuffix.relation = "notadatetime";
     }
 
     return prefixSuffix;
   },
 
-  parseNumber: function(numberString, numbers) {
+  parseNumber(numberString, numbers) {
     let number = parseInt(numberString, 10);
     // number comes in as plain text, numbers are already adjusted for usage
     // in regular expression
     let cleanNumberString = this.cleanPatterns(numberString);
     if (isNaN(number)) {
       for (let i = 0; i <= 31; i++) {
         let numberparts = numbers[i].split("|");
         if (numberparts.includes(cleanNumberString.toLowerCase())) {
           return i;
         }
       }
       return -1;
-    } else {
-      return number;
     }
+    return number;
   },
 
-  guess: function(year, month, day, hour, minute, start, end, str, relation, pattern, ambiguous) {
+  guess(year, month, day, hour, minute, start, end, str, relation, pattern, ambiguous) {
     let dateGuess = {
-      year: year,
-      month: month,
-      day: day,
-      hour: hour,
-      minute: minute,
-      start: start,
-      end: end,
-      str: str,
-      relation: relation,
-      pattern: pattern,
-      ambiguous: ambiguous,
+      year,
+      month,
+      day,
+      hour,
+      minute,
+      start,
+      end,
+      str,
+      relation,
+      pattern,
+      ambiguous,
     };
 
     // past dates are kept for containment checks
     if (this.isPastDate(dateGuess, this.now)) {
       dateGuess.relation = "notadatetime";
     }
     this.collected.push(dateGuess);
   },
 
-  sanitize: function(str) {
+  sanitize(str) {
     return str.replace(/[-[\]{}()*+?.,\\^$]/g, "\\$&");
   },
 
-  unescape: function(str) {
+  unescape(str) {
     return str.replace(/\\([.])/g, "$1");
   },
 };
--- a/calendar/base/modules/calHashedArray.jsm
+++ b/calendar/base/modules/calHashedArray.jsm
@@ -37,137 +37,136 @@ cal.HashedArray.prototype = {
   /**
    * The function to retrieve the hashId given the item. This function can be
    * overridden by implementations, in case the added items are not instances
    * of calIItemBase.
    *
    * @param item      The item to get the hashId for
    * @return          The hashId of the item
    */
-  hashAccessor: function(item) {
+  hashAccessor(item) {
     return item.hashId;
   },
 
   /**
    * Returns the item, given its index in the array
    *
    * @param index         The index of the item to retrieve.
    * @return              The retrieved item.
    */
-  itemByIndex: function(index) {
+  itemByIndex(index) {
     return this.mArray[index];
   },
 
   /**
    * Returns the item, given its hashId
    *
    * @param id            The hashId of the item to retrieve.
    * @return              The retrieved item.
    */
-  itemById: function(id) {
+  itemById(id) {
     if (this.mBatch > 0) {
       throw new Error("Accessing Array by ID not supported in batch mode");
     }
     return id in this.mHash ? this.mArray[this.mHash[id]] : null;
   },
 
   /**
    * Returns the index of the given item. This function is cheap performance
    * wise, since it uses the hash
    *
    * @param item          The item to search for.
    * @return              The index of the item.
    */
-  indexOf: function(item) {
+  indexOf(item) {
     if (this.mBatch > 0) {
       throw new Error("Accessing Array Indexes not supported in batch mode");
     }
     let hashId = this.hashAccessor(item);
     return hashId in this.mHash ? this.mHash[hashId] : -1;
   },
 
   /**
    * Remove the item with the given hashId.
    *
    * @param id            The id of the item to be removed
    */
-  removeById: function(id) {
+  removeById(id) {
     if (this.mBatch > 0) {
       throw new Error("Remvoing by ID in batch mode is not supported"); /* TODO */
     }
     let index = this.mHash[id];
     delete this.mHash[id];
     this.mArray.splice(index, 1);
     this.reindex(index);
   },
 
   /**
    * Remove the item at the given index.
    *
    * @param index         The index of the item to remove.
    */
-  removeByIndex: function(index) {
+  removeByIndex(index) {
     delete this.mHash[this.hashAccessor(this.mArray[index])];
     this.mArray.splice(index, 1);
     this.reindex(index);
   },
 
   /**
    * Clear the whole array, removing all items. This also resets batch mode.
    */
-  clear: function() {
+  clear() {
     this.mHash = {};
     this.mArray = [];
     this.mFirstDirty = -1;
     this.mBatch = 0;
   },
 
   /**
    * Add the item to the array
    *
    * @param item          The item to add.
    * @return              The index of the added item.
    */
-  addItem: function(item) {
+  addItem(item) {
     let index = this.mArray.length;
     this.mArray.push(item);
     this.reindex(index);
     return index;
   },
 
   /**
    * Modifies the item in the array. If the item is already in the array, then
    * it is replaced by the passed item. Otherwise, the item is added to the
    * array.
    *
    * @param item          The item to modify.
    * @return              The (new) index.
    */
-  modifyItem: function(item) {
+  modifyItem(item) {
     let hashId = this.hashAccessor(item);
     if (hashId in this.mHash) {
       let index = this.mHash[this.hashAccessor(item)];
       this.mArray[index] = item;
       return index;
-    } else {
-      return this.addItem(item);
     }
+    return this.addItem(item);
   },
 
   /**
    * Reindexes the items in the array. This function is mostly used
    * internally. All parameters are inclusive. The ranges are automatically
    * swapped if from > to.
    *
    * @param from      (optional) The index to start indexing from. If left
    *                    out, defaults to 0.
    * @param to        (optional) The index to end indexing on. If left out,
    *                    defaults to the array length.
    */
-  reindex: function(from, to) {
+  reindex(from, to) {
     if (this.mArray.length == 0) {
       return;
     }
 
     from = from === undefined ? 0 : from;
     to = to === undefined ? this.mArray.length - 1 : to;
 
     from = Math.min(this.mArray.length - 1, Math.max(0, from));
@@ -185,33 +184,33 @@ cal.HashedArray.prototype = {
       return;
     }
 
     for (let idx = from; idx <= to; idx++) {
       this.mHash[this.hashAccessor(this.mArray[idx])] = idx;
     }
   },
 
-  startBatch: function() {
+  startBatch() {
     this.mBatch++;
   },
 
-  endBatch: function() {
+  endBatch() {
     this.mBatch = Math.max(0, this.mBatch - 1);
 
     if (this.mBatch == 0 && this.mFirstDirty > -1) {
       this.reindex(this.mFirstDirty);
       this.mFirstDirty = -1;
     }
   },
 
   /**
    * Iterator to allow iterating the hashed array object.
    */
-  [Symbol.iterator]: function*() {
+  *[Symbol.iterator]() {
     yield* this.mArray;
   },
 };
 
 /**
  * Sorted hashed array. The array always stays sorted.
  *
  * Performance Considerations:
@@ -227,35 +226,33 @@ cal.SortedHashedArray = function(compara
   this.mCompFunc = comparator;
 };
 
 cal.SortedHashedArray.prototype = {
   __proto__: cal.HashedArray.prototype,
 
   mCompFunc: null,
 
-  addItem: function(item) {
+  addItem(item) {
     let newIndex = cal.data.binaryInsert(this.mArray, item, this.mCompFunc, false);
     this.reindex(newIndex);
     return newIndex;
   },
 
-  modifyItem: function(item) {
+  modifyItem(item) {
     let hashId = this.hashAccessor(item);
     if (hashId in this.mHash) {
       let cmp = this.mCompFunc(item, this.mArray[this.mHash[hashId]]);
       if (cmp == 0) {
         // The item will be at the same index, we just need to replace it
         this.mArray[this.mHash[hashId]] = item;
         return this.mHash[hashId];
-      } else {
-        let oldIndex = this.mHash[hashId];
+      }
+      let oldIndex = this.mHash[hashId];
 
-        let newIndex = cal.data.binaryInsert(this.mArray, item, this.mCompFunc, false);
-        this.mArray.splice(oldIndex, 1);
-        this.reindex(oldIndex, newIndex);
-        return newIndex;
-      }
-    } else {
-      return this.addItem(item);
+      let newIndex = cal.data.binaryInsert(this.mArray, item, this.mCompFunc, false);
+      this.mArray.splice(oldIndex, 1);
+      this.reindex(oldIndex, newIndex);
+      return newIndex;
     }
+    return this.addItem(item);
   },
 };
--- a/calendar/base/modules/calUtils.jsm
+++ b/calendar/base/modules/calUtils.jsm
@@ -91,28 +91,28 @@ var cal = {
 
   /**
    * Uses the prompt service to display an error message. Use this sparingly,
    * as it interrupts the user.
    *
    * @param aMsg The message to be shown
    * @param aWindow The window to show the message in, or null for any window.
    */
-  showError: function(aMsg, aWindow = null) {
+  showError(aMsg, aWindow = null) {
     Services.prompt.alert(aWindow, cal.l10n.getCalString("genericErrorTitle"), aMsg);
   },
 
   /**
    * Returns a string describing the current js-stack with filename and line
    * numbers.
    *
    * @param aDepth (optional) The number of frames to include. Defaults to 5.
    * @param aSkip  (optional) Number of frames to skip
    */
-  STACK: function(aDepth = 10, aSkip = 0) {
+  STACK(aDepth = 10, aSkip = 0) {
     let stack = "";
     let frame = Components.stack.caller;
     for (let i = 1; i <= aDepth + aSkip && frame; i++) {
       if (i > aSkip) {
         stack += `${i}: [${frame.filename}:${frame.lineNumber}] ${frame.name}\n`;
       }
       frame = frame.caller;
     }
@@ -123,17 +123,17 @@ var cal = {
    * Logs a message and the current js-stack, if aCondition fails
    *
    * @param aCondition  the condition to test for
    * @param aMessage    the message to report in the case the assert fails
    * @param aCritical   if true, throw an error to stop current code execution
    *                    if false, code flow will continue
    *                    may be a result code
    */
-  ASSERT: function(aCondition, aMessage, aCritical = false) {
+  ASSERT(aCondition, aMessage, aCritical = false) {
     if (aCondition) {
       return;
     }
 
     let string = `Assert failed: ${aMessage}\n ${cal.STACK(0, 1)}`;
     if (aCritical) {
       let rescode = aCritical === true ? Cr.NS_ERROR_UNEXPECTED : aCritical;
       throw new Components.Exception(string, rescode);
@@ -154,94 +154,93 @@ var cal = {
    * The function is cached, once this is called QueryInterface is replaced with
    * cal.generateQI()'s result.
    *
    * @param {Object} aGlobal          The object to define the method on
    * @param {nsIIDRef} aIID           The IID to query for
    * @param {nsIIDRef[]} aInterfaces  The interfaces that this object implements
    * @return {nsQIResult}             The object queried for aIID
    */
-  generateClassQI: function(aGlobal, aIID, aInterfaces) {
+  generateClassQI(aGlobal, aIID, aInterfaces) {
     const generatedQI =
       aInterfaces.length > 1 ? cal.generateQI(aInterfaces) : ChromeUtils.generateQI(aInterfaces);
     Object.defineProperty(aGlobal, "QueryInterface", { value: generatedQI });
     return aGlobal.QueryInterface(aIID);
   },
 
   /**
    * Generates the QueryInterface function. This is a replacement for XPCOMUtils.generateQI, which
    * is being replaced. Unfortunately Lightning's code depends on some of its classes providing
    * nsIClassInfo, which causes xpconnect/xpcom to make all methods available, e.g. for an event
    * both calIItemBase and calIEvent.
    *
    * @param {Array<String|nsIIDRef>} aInterfaces      The interfaces to generate QI for.
    * @return {Function}                               The QueryInterface function
    */
-  generateQI: function(aInterfaces) {
+  generateQI(aInterfaces) {
     if (aInterfaces.length == 1) {
       cal.WARN(
         "When generating QI for one interface, please use ChromeUtils.generateQI",
         cal.STACK(10)
       );
       return ChromeUtils.generateQI(aInterfaces);
-    } else {
-      /* Note that Ci[Ci.x] == Ci.x for all x */
-      let names = [];
-      if (aInterfaces) {
-        for (let i = 0; i < aInterfaces.length; i++) {
-          let iface = aInterfaces[i];
-          let name = (iface && iface.name) || String(iface);
-          if (name in Ci) {
-            names.push(name);
-          }
+    }
+    /* Note that Ci[Ci.x] == Ci.x for all x */
+    let names = [];
+    if (aInterfaces) {
+      for (let i = 0; i < aInterfaces.length; i++) {
+        let iface = aInterfaces[i];
+        let name = (iface && iface.name) || String(iface);
+        if (name in Ci) {
+          names.push(name);
         }
       }
-      return makeQI(names);
     }
+    return makeQI(names);
   },
 
   /**
    * Generate a ClassInfo implementation for a component. The returned object
    * must be assigned to the 'classInfo' property of a JS object. The first and
    * only argument should be an object that contains a number of optional
    * properties: "interfaces", "contractID", "classDescription", "classID" and
    * "flags". The values of the properties will be returned as the values of the
    * various properties of the nsIClassInfo implementation.
    */
-  generateCI: function(classInfo) {
+  generateCI(classInfo) {
     if ("QueryInterface" in classInfo) {
       throw Error("In generateCI, don't use a component for generating classInfo");
     }
     /* Note that Ci[Ci.x] == Ci.x for all x */
     let _interfaces = [];
     for (let i = 0; i < classInfo.interfaces.length; i++) {
       let iface = classInfo.interfaces[i];
       if (Ci[iface]) {
         _interfaces.push(Ci[iface]);
       }
     }
     return {
       get interfaces() {
         return [Ci.nsIClassInfo, Ci.nsISupports].concat(_interfaces);
       },
-      getScriptableHelper: function() {
+      getScriptableHelper() {
         return null;
       },
       contractID: classInfo.contractID,
       classDescription: classInfo.classDescription,
       classID: classInfo.classID,
       flags: classInfo.flags,
       QueryInterface: ChromeUtils.generateQI([Ci.nsIClassInfo]),
     };
   },
 
   /**
    * Schedules execution of the passed function to the current thread's queue.
    */
-  postPone: function(func) {
+  postPone(func) {
     if (this.threadingEnabled) {
       Services.tm.currentThread.dispatch({ run: func }, Ci.nsIEventTarget.DISPATCH_NORMAL);
     } else {
       func();
     }
   },
 
   /**
@@ -255,17 +254,17 @@ var cal = {
    *                    clean adapter.
    *
    * Currently supported interfaces are:
    *  - calIObserver
    *  - calICalendarManagerObserver
    *  - calIOperationListener
    *  - calICompositeObserver
    */
-  createAdapter: function(iface, template) {
+  createAdapter(iface, template) {
     let methods;
     let adapter = template || {};
     switch (iface.name || iface) {
       case "calIObserver":
         methods = [
           "onStartBatch",
           "onEndBatch",
           "onLoad",
@@ -301,37 +300,37 @@ var cal = {
     return adapter;
   },
 
   /**
    * Make a UUID, without enclosing brackets, e.g. 0d3950fd-22e5-4508-91ba-0489bdac513f
    *
    * @return {String}         The generated UUID
    */
-  getUUID: function() {
+  getUUID() {
     let uuidGen = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
     // generate uuids without braces to avoid problems with
     // CalDAV servers that don't support filenames with {}
     return uuidGen
       .generateUUID()
       .toString()
       .replace(/[{}]/g, "");
   },
 
   /**
    * Adds an observer listening for the topic.
    *
    * @param func function to execute on topic
    * @param topic topic to listen for
    * @param oneTime whether to listen only once
    */
-  addObserver: function(func, topic, oneTime) {
+  addObserver(func, topic, oneTime) {
     let observer = {
       // nsIObserver:
-      observe: function(subject, topic_, data) {
+      observe(subject, topic_, data) {
         if (topic == topic_) {
           if (oneTime) {
             Services.obs.removeObserver(this, topic);
           }
           func(subject, topic, data);
         }
       },
     };
@@ -353,17 +352,17 @@ var cal = {
    * }
    * // GOOD USAGE:
    * foo = cal.wrapInstance(foo, Ci.nsIBar);
    * if (foo) {
    *   foo.barMethod();
    * }
    *
    */
-  wrapInstance: function(aObj, aInterface) {
+  wrapInstance(aObj, aInterface) {
     if (!aObj) {
       return null;
     }
 
     try {
       return aObj.QueryInterface(aInterface);
     } catch (e) {
       return null;
@@ -372,26 +371,26 @@ var cal = {
 
   /**
    * Tries to get rid of wrappers, if this is not possible then return the
    * passed object.
    *
    * @param aObj  The object under consideration
    * @return      The possibly unwrapped object.
    */
-  unwrapInstance: function(aObj) {
+  unwrapInstance(aObj) {
     return aObj && aObj.wrappedJSObject ? aObj.wrappedJSObject : aObj;
   },
 
   /**
    * Adds an xpcom shutdown observer.
    *
    * @param func function to execute
    */
-  addShutdownObserver: function(func) {
+  addShutdownObserver(func) {
     cal.addObserver(func, "xpcom-shutdown", true /* one time */);
   },
 
   /**
    * Due to wrapped js objects, some objects may have cyclic references.
    * You can register properties of objects to be cleaned up on xpcom-shutdown.
    *
    * @param obj    object
--- a/calendar/base/modules/utils/calACLUtils.jsm
+++ b/calendar/base/modules/utils/calACLUtils.jsm
@@ -17,63 +17,63 @@ var calacl = {
   /**
    * Check if the specified calendar is writable. This is the case when it is
    * not marked readOnly, we are not offline, or we are offline and the
    * calendar is local.
    *
    * @param aCalendar     The calendar to check
    * @return              True if the calendar is writable
    */
-  isCalendarWritable: function(aCalendar) {
+  isCalendarWritable(aCalendar) {
     return (
       !aCalendar.getProperty("disabled") &&
       !aCalendar.readOnly &&
       (!Services.io.offline ||
         aCalendar.getProperty("cache.enabled") ||
         aCalendar.getProperty("cache.always") ||
         aCalendar.getProperty("requiresNetwork") === false)
     );
   },
 
   /**
    * Check if the specified calendar is writable from an ACL point of view.
    *
    * @param aCalendar     The calendar to check
    * @return              True if the calendar is writable
    */
-  userCanAddItemsToCalendar: function(aCalendar) {
+  userCanAddItemsToCalendar(aCalendar) {
     let aclEntry = aCalendar.aclEntry;
     return (
       !aclEntry || !aclEntry.hasAccessControl || aclEntry.userIsOwner || aclEntry.userCanAddItems
     );
   },
 
   /**
    * Check if the user can delete items from the specified calendar, from an
    * ACL point of view.
    *
    * @param aCalendar     The calendar to check
    * @return              True if the calendar is writable
    */
-  userCanDeleteItemsFromCalendar: function(aCalendar) {
+  userCanDeleteItemsFromCalendar(aCalendar) {
     let aclEntry = aCalendar.aclEntry;
     return (
       !aclEntry || !aclEntry.hasAccessControl || aclEntry.userIsOwner || aclEntry.userCanDeleteItems
     );
   },
 
   /**
    * Check if the user can fully modify the specified item, from an ACL point
    * of view.  Note to be confused with the right to respond to an
    * invitation, which is handled instead by userCanRespondToInvitation.
    *
    * @param aItem         The calendar item to check
    * @return              True if the item is modifiable
    */
-  userCanModifyItem: function(aItem) {
+  userCanModifyItem(aItem) {
     let aclEntry = aItem.aclEntry;
     return (
       !aclEntry ||
       !aclEntry.calendarEntry.hasAccessControl ||
       aclEntry.calendarEntry.userIsOwner ||
       aclEntry.userCanModify
     );
   },
@@ -81,14 +81,14 @@ var calacl = {
   /**
    * Checks if the user can modify the item and has the right to respond to
    * invitations for the item.
    *
    * @param aItem         The calendar item to check
    * @return              True if the invitation w.r.t. the item can be
    *                        responded to.
    */
-  userCanRespondToInvitation: function(aItem) {
+  userCanRespondToInvitation(aItem) {
     let aclEntry = aItem.aclEntry;
     // TODO check if || is really wanted here
     return calacl.userCanModifyItem(aItem) || aclEntry.userCanRespond;
   },
 };
--- a/calendar/base/modules/utils/calAlarmUtils.jsm
+++ b/calendar/base/modules/utils/calAlarmUtils.jsm
@@ -18,17 +18,17 @@ this.EXPORTED_SYMBOLS = ["calalarms"]; /
 var calalarms = {
   /**
    * Read default alarm settings from user preferences and apply them to the
    * event/todo passed in. The item's calendar should be set to ensure the
    * correct alarm type is set.
    *
    * @param aItem     The item to apply the default alarm values to.
    */
-  setDefaultValues: function(aItem) {
+  setDefaultValues(aItem) {
     let type = cal.item.isEvent(aItem) ? "event" : "todo";
     if (Services.prefs.getIntPref("calendar.alarms.onfor" + type + "s", 0) == 1) {
       let alarmOffset = cal.createDuration();
       let alarm = cal.createAlarm();
       let units = Services.prefs.getStringPref("calendar.alarms." + type + "alarmunit", "minutes");
 
       // Make sure the alarm pref is valid, default to minutes otherwise
       if (!["weeks", "days", "hours", "minutes", "seconds"].includes(units)) {
@@ -57,63 +57,63 @@ var calalarms = {
 
   /**
    * Calculate the alarm date for a calIAlarm.
    *
    * @param aItem     The item used to calculate the alarm date.
    * @param aAlarm    The alarm to calculate the date for.
    * @return          The alarm date.
    */
-  calculateAlarmDate: function(aItem, aAlarm) {
+  calculateAlarmDate(aItem, aAlarm) {
     if (aAlarm.related == aAlarm.ALARM_RELATED_ABSOLUTE) {
       return aAlarm.alarmDate;
-    } else {
-      let returnDate;
-      if (aAlarm.related == aAlarm.ALARM_RELATED_START) {
-        returnDate = aItem[cal.dtz.startDateProp(aItem)];
-      } else if (aAlarm.related == aAlarm.ALARM_RELATED_END) {
-        returnDate = aItem[cal.dtz.endDateProp(aItem)];
+    }
+    let returnDate;
+    if (aAlarm.related == aAlarm.ALARM_RELATED_START) {
+      returnDate = aItem[cal.dtz.startDateProp(aItem)];
+    } else if (aAlarm.related == aAlarm.ALARM_RELATED_END) {
+      returnDate = aItem[cal.dtz.endDateProp(aItem)];
+    }
+
+    if (returnDate && aAlarm.offset) {
+      // Handle all day events.  This is kinda weird, because they don't
+      // have a well defined startTime.  We just consider the start/end
+      // to be midnight in the user's timezone.
+      if (returnDate.isDate) {
+        let timezone = cal.dtz.defaultTimezone;
+        // This returns a copy, so no extra cloning needed.
+        returnDate = returnDate.getInTimezone(timezone);
+        returnDate.isDate = false;
+      } else if (returnDate.timezone.tzid == "floating") {
+        let timezone = cal.dtz.defaultTimezone;
+        returnDate = returnDate.getInTimezone(timezone);
+      } else {
+        // Clone the date to correctly add the duration.
+        returnDate = returnDate.clone();
       }
 
-      if (returnDate && aAlarm.offset) {
-        // Handle all day events.  This is kinda weird, because they don't
-        // have a well defined startTime.  We just consider the start/end
-        // to be midnight in the user's timezone.
-        if (returnDate.isDate) {
-          let timezone = cal.dtz.defaultTimezone;
-          // This returns a copy, so no extra cloning needed.
-          returnDate = returnDate.getInTimezone(timezone);
-          returnDate.isDate = false;
-        } else if (returnDate.timezone.tzid == "floating") {
-          let timezone = cal.dtz.defaultTimezone;
-          returnDate = returnDate.getInTimezone(timezone);
-        } else {
-          // Clone the date to correctly add the duration.
-          returnDate = returnDate.clone();
-        }
+      returnDate.addDuration(aAlarm.offset);
+      return returnDate;
+    }
 
-        returnDate.addDuration(aAlarm.offset);
-        return returnDate;
-      }
-    }
     return null;
   },
 
   /**
    * Calculate the alarm offset for a calIAlarm. The resulting offset is
    * related to either start or end of the event, depending on the aRelated
    * parameter.
    *
    * @param aItem     The item to calculate the offset for.
    * @param aAlarm    The alarm to calculate the offset for.
    * @param aRelated  (optional) A relation constant from calIAlarm. If not
    *                    passed, ALARM_RELATED_START will be assumed.
    * @return          The alarm offset.
    */
-  calculateAlarmOffset: function(aItem, aAlarm, aRelated) {
+  calculateAlarmOffset(aItem, aAlarm, aRelated) {
     let offset = aAlarm.offset;
     if (aAlarm.related == aAlarm.ALARM_RELATED_ABSOLUTE) {
       let returnDate;
       if (aRelated === undefined || aRelated == aAlarm.ALARM_RELATED_START) {
         returnDate = aItem[cal.dtz.startDateProp(aItem)];
       } else if (aRelated == aAlarm.ALARM_RELATED_END) {
         returnDate = aItem[cal.dtz.endDateProp(aItem)];
       }
@@ -127,17 +127,17 @@ var calalarms = {
 
   /**
    * Adds reminder images to a given node, making sure only one icon per alarm
    * action is added.
    *
    * @param aElement    The element to add the images to.
    * @param aReminders  The set of reminders to add images for.
    */
-  addReminderImages: function(aElement, aReminders) {
+  addReminderImages(aElement, aReminders) {
     function setupActionImage(node, reminder) {
       let image = node || aElement.ownerDocument.createXULElement("image");
       image.setAttribute("class", "reminder-icon");
       image.setAttribute("value", reminder.action);
       return image;
     }
 
     // Fill up the icon box with the alarm icons, show max one icon per
--- a/calendar/base/modules/utils/calAsyncUtils.jsm
+++ b/calendar/base/modules/utils/calAsyncUtils.jsm
@@ -12,24 +12,24 @@ var { PromiseUtils } = ChromeUtils.impor
 // including calUtils.jsm under the cal.async namespace.
 
 this.EXPORTED_SYMBOLS = ["calasync"]; /* exported calasync */
 
 var cIOL = Ci.calIOperationListener;
 var cIC = Ci.calICalendar;
 
 var promisifyProxyHandler = {
-  promiseOperation: function(target, name, args) {
+  promiseOperation(target, name, args) {
     let deferred = PromiseUtils.defer();
     let listener = calasync.promiseOperationListener(deferred);
     args.push(listener);
     target[name](...args);
     return deferred.promise;
   },
-  get: function(target, name) {
+  get(target, name) {
     switch (name) {
       // calICalendar methods
       case "adoptItem":
       case "addItem":
       case "modifyItem":
       case "deleteItem":
       case "getItem":
       case "getItems":
@@ -77,17 +77,17 @@ var calasync = {
    *
    * Bonus methods in addition:
    *   pcal.getAllItems()  // alias for getItems without any filters
    *
    * IMPORTANT: Don't pass this around thinking its like an xpcom calICalendar,
    * otherwise code might indefinitely wait for the listener to return or there
    * will be complaints that an argument is missing.
    */
-  promisifyCalendar: function(aCalendar) {
+  promisifyCalendar(aCalendar) {
     return new Proxy(aCalendar, promisifyProxyHandler);
   },
   /**
    * Create an operation listener (calIOperationListener) that resolves when
    * the operation succeeds. Note this listener will collect the items, so it
    * might not be a good idea in a situation where a lot of items will be
    * retrieved.
    *
@@ -100,31 +100,31 @@ var calasync = {
    *   }
    *
    * See also promisifyCalendar, where the above can be replaced with:
    *   function promiseAddItem(aItem) {
    *     let calendar = cal.async.promisifyCalendar(aItem.calendar);
    *     return calendar.addItem(aItem);
    *   }
    */
-  promiseOperationListener: function(deferred) {
+  promiseOperationListener(deferred) {
     return {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
       items: [],
       itemStatus: Cr.NS_OK,
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
+      onGetResult(aCalendar, aStatus, aItemType, aDetail, aItems) {
         this.itemStatus = aStatus;
         if (Components.isSuccessCode(aStatus)) {
           this.items = this.items.concat(aItems);
         } else {
           this.itemSuccess = aStatus;
         }
       },
 
-      onOperationComplete: function(aCalendar, aStatus, aOpType, aId, aDetail) {
+      onOperationComplete(aCalendar, aStatus, aOpType, aId, aDetail) {
         if (!Components.isSuccessCode(aStatus)) {
           // This function has failed, reject with the status
           deferred.reject(aStatus);
         } else if (!Components.isSuccessCode(this.itemStatus)) {
           // onGetResult has failed, reject with its status
           deferred.reject(this.itemStatus);
         } else if (aOpType == cIOL.GET) {
           // Success of a GET operation: resolve with array of
--- a/calendar/base/modules/utils/calAuthUtils.jsm
+++ b/calendar/base/modules/utils/calAuthUtils.jsm
@@ -95,36 +95,34 @@ class ContainerMap extends Map {
    * @param {String} username        The username for which the userContextId
    *                                 is to be looked up.
    * @return {Number}                The userContextId which is assigned to
    *                                 the provided username.
    */
   getUserContextIdForUsername(username) {
     if (this.has(username)) {
       return this.get(username);
-    } else {
-      return this._add(username);
     }
+    return this._add(username);
   }
 
   /**
    * Look up the username for the given userContextId. Return empty string
    * if not found.
    *
    * @param {Number} userContextId        The userContextId for which the
    *                                      username is to be to looked up.
    * @return {String}                     The username mapped to the given
    *                                      userContextId.
    */
   getUsernameForUserContextId(userContextId) {
     if (this.inverted.hasOwnProperty(userContextId)) {
       return this.inverted[userContextId];
-    } else {
-      return "";
     }
+    return "";
   }
 }
 
 var calauth = {
   /**
    * Calendar Auth prompt implementation. This instance of the auth prompt should
    * be used by providers and other components that handle authentication using
    * nsIAuthPrompt2 and friends.
@@ -188,22 +186,21 @@ var calauth = {
               ", host=" +
               aPasswordRealm.prePath +
               ", realm=" +
               aPasswordRealm.realm
           );
 
           delete this.mReturnedLogins[keyStr];
           calauth.passwordManagerRemove(username, aPasswordRealm.prePath, aPasswordRealm.realm);
-          return { found: false, username: username };
-        } else {
-          this.mReturnedLogins[keyStr] = now;
+          return { found: false, username };
         }
+        this.mReturnedLogins[keyStr] = now;
       }
-      return { found: found, username: username, password: password };
+      return { found, username, password };
     }
 
     // boolean promptAuth(in nsIChannel aChannel,
     //                    in uint32_t level,
     //                    in nsIAuthInformation authInfo)
     promptAuth(aChannel, aLevel, aAuthInfo) {
       let hostRealm = {};
       hostRealm.prePath = aChannel.URI.prePath;
@@ -220,80 +217,75 @@ var calauth = {
       let requestedUser = cal.auth.containerMap.getUsernameForUserContextId(
         aChannel.loadInfo.originAttributes.userContextId
       );
       let pwInfo = this.getPasswordInfo(hostRealm, requestedUser);
       aAuthInfo.username = pwInfo.username;
       if (pwInfo && pwInfo.found) {
         aAuthInfo.password = pwInfo.password;
         return true;
-      } else {
-        let savePasswordLabel = null;
-        if (Services.prefs.getBoolPref("signon.rememberSignons", true)) {
-          savePasswordLabel = cal.l10n.getAnyString(
-            "passwordmgr",
-            "passwordmgr",
-            "rememberPassword"
-          );
-        }
-        let savePassword = {};
-        let returnValue = Services.prompt.promptAuth(
-          null,
-          aChannel,
-          aLevel,
-          aAuthInfo,
-          savePasswordLabel,
-          savePassword
+      }
+      let savePasswordLabel = null;
+      if (Services.prefs.getBoolPref("signon.rememberSignons", true)) {
+        savePasswordLabel = cal.l10n.getAnyString("passwordmgr", "passwordmgr", "rememberPassword");
+      }
+      let savePassword = {};
+      let returnValue = Services.prompt.promptAuth(
+        null,
+        aChannel,
+        aLevel,
+        aAuthInfo,
+        savePasswordLabel,
+        savePassword
+      );
+      if (savePassword.value) {
+        calauth.passwordManagerSave(
+          aAuthInfo.username,
+          aAuthInfo.password,
+          hostRealm.prePath,
+          aAuthInfo.realm
         );
-        if (savePassword.value) {
-          calauth.passwordManagerSave(
-            aAuthInfo.username,
-            aAuthInfo.password,
-            hostRealm.prePath,
-            aAuthInfo.realm
-          );
-        }
-        return returnValue;
       }
+      return returnValue;
     }
 
     // nsICancelable asyncPromptAuth(in nsIChannel aChannel,
     //                               in nsIAuthPromptCallback aCallback,
     //                               in nsISupports aContext,
     //                               in uint32_t level,
     //                               in nsIAuthInformation authInfo);
     asyncPromptAuth(aChannel, aCallback, aContext, aLevel, aAuthInfo) {
       let self = this;
       let promptlistener = {
-        onPromptStartAsync: function(callback) {
+        onPromptStartAsync(callback) {
           callback.onAuthResult(this.onPromptStart());
         },
 
-        onPromptStart: function() {
+        onPromptStart() {
           let res = self.promptAuth(aChannel, aLevel, aAuthInfo);
           if (res) {
             gAuthCache.setAuthInfo(hostKey, aAuthInfo);
             this.onPromptAuthAvailable();
             return true;
           }
 
           this.onPromptCanceled();
           return false;
         },
 
-        onPromptAuthAvailable: function() {
+        onPromptAuthAvailable() {
           let authInfo = gAuthCache.retrieveAuthInfo(hostKey);
           if (authInfo) {
             aAuthInfo.username = authInfo.username;
             aAuthInfo.password = authInfo.password;
           }
           aCallback.onAuthAvailable(aContext, aAuthInfo);
         },
 
-        onPromptCanceled: function() {
+        onPromptCanceled() {
           gAuthCache.retrieveAuthInfo(hostKey);
           aCallback.onAuthCancelled(aContext, true);
         },
       };
 
       let requestedUser = cal.auth.containerMap.getUsernameForUserContextId(
         aChannel.loadInfo.originAttributes.userContextId
       );
@@ -325,24 +317,17 @@ var calauth = {
    * @param {String} aTitle                   The dialog title.
    * @param {String} aCalendarName            The calendar name or url to look up. Can be null.
    * @param {{value:String}} aUsername        The username that belongs to the calendar.
    * @param {{value:String}} aPassword        The password that belongs to the calendar.
    * @param {{value:String}} aSavePassword    Should the password be saved?
    * @param {Boolean} aFixedUsername          Whether the user name is fixed or editable
    * @return {Boolean}                        Could a password be retrieved?
    */
-  getCredentials: function(
-    aTitle,
-    aCalendarName,
-    aUsername,
-    aPassword,
-    aSavePassword,
-    aFixedUsername
-  ) {
+  getCredentials(aTitle, aCalendarName, aUsername, aPassword, aSavePassword, aFixedUsername) {
     if (
       typeof aUsername != "object" ||
       typeof aPassword != "object" ||
       typeof aSavePassword != "object"
     ) {
       throw new Components.Exception("", Cr.NS_ERROR_XPC_NEED_OUT_OBJECT);
     }
 
@@ -356,40 +341,39 @@ var calauth = {
 
     let aText;
     if (aFixedUsername) {
       aText = cal.l10n.getAnyString("global", "commonDialogs", "EnterPasswordFor", [
         aUsername.value,
         aCalendarName,
       ]);
       return prompter.promptPassword(aTitle, aText, aPassword, savepassword, aSavePassword);
-    } else {
-      aText = cal.l10n.getAnyString("global", "commonDialogs", "EnterUserPasswordFor2", [
-        aCalendarName,
-      ]);
-      return prompter.promptUsernameAndPassword(
-        aTitle,
-        aText,
-        aUsername,
-        aPassword,
-        savepassword,
-        aSavePassword
-      );
     }
+    aText = cal.l10n.getAnyString("global", "commonDialogs", "EnterUserPasswordFor2", [
+      aCalendarName,
+    ]);
+    return prompter.promptUsernameAndPassword(
+      aTitle,
+      aText,
+      aUsername,
+      aPassword,
+      savepassword,
+      aSavePassword
+    );
   },
 
   /**
    * Make sure the passed origin is actually an uri string, because password manager functions
    * require it. This is a fallback for compatibility only and should be removed a few versions
    * after Lightning 6.2
    *
    * @param {String} aOrigin      The hostname or origin to check
    * @return {String}             The origin uri
    */
-  _ensureOrigin: function(aOrigin) {
+  _ensureOrigin(aOrigin) {
     try {
       let { prePath, spec } = Services.io.newURI(aOrigin);
       if (prePath == "oauth:") {
         return spec;
       }
       return prePath;
     } catch (e) {
       return "https://" + aOrigin;
@@ -399,17 +383,17 @@ var calauth = {
   /**
    * Helper to insert/update an entry to the password manager.
    *
    * @param {String} aUsername    The username to insert
    * @param {String} aPassword    The corresponding password
    * @param {String} aOrigin      The corresponding origin
    * @param {String} aRealm       The password realm (unused on branch)
    */
-  passwordManagerSave: function(aUsername, aPassword, aOrigin, aRealm) {
+  passwordManagerSave(aUsername, aPassword, aOrigin, aRealm) {
     cal.ASSERT(aUsername);
     cal.ASSERT(aPassword);
 
     let origin = this._ensureOrigin(aOrigin);
 
     if (!Services.logins.getLoginSavingEnabled(origin)) {
       throw new Components.Exception(
         "Password saving is disabled for " + origin,
@@ -442,17 +426,17 @@ var calauth = {
    * Helper to retrieve an entry from the password manager.
    *
    * @param {String} aUsername    The username to search
    * @param {String} aPassword    The corresponding password
    * @param {String} aOrigin      The corresponding origin
    * @param {String} aRealm       The password realm (unused on branch)
    * @return {Boolean}            True, if an entry exists in the password manager
    */
-  passwordManagerGet: function(aUsername, aPassword, aOrigin, aRealm) {
+  passwordManagerGet(aUsername, aPassword, aOrigin, aRealm) {
     cal.ASSERT(aUsername);
 
     if (typeof aPassword != "object") {
       throw new Components.Exception("", Cr.NS_ERROR_XPC_NEED_OUT_OBJECT);
     }
 
     let origin = this._ensureOrigin(aOrigin);
 
@@ -473,17 +457,17 @@ var calauth = {
   /**
    * Helper to remove an entry from the password manager
    *
    * @param {String} aUsername    The username to remove
    * @param {String} aOrigin      The corresponding origin
    * @param {String} aRealm       The password realm (unused on branch)
    * @return {Boolean}            Could the user be removed?
    */
-  passwordManagerRemove: function(aUsername, aOrigin, aRealm) {
+  passwordManagerRemove(aUsername, aOrigin, aRealm) {
     cal.ASSERT(aUsername);
 
     let origin = this._ensureOrigin(aOrigin);
 
     try {
       let logins = Services.logins.findLogins(origin, null, aRealm);
       for (let loginInfo of logins) {
         if (loginInfo.username == aUsername) {
@@ -510,34 +494,34 @@ var calauth = {
 };
 
 // Cache for authentication information since onAuthInformation in the prompt
 // listener is called without further information. If the password is not
 // saved, there is no way to retrieve it. We use ref counting to avoid keeping
 // the password in memory longer than needed.
 var gAuthCache = {
   _authInfoCache: new Map(),
-  planForAuthInfo: function(hostKey) {
+  planForAuthInfo(hostKey) {
     let authInfo = this._authInfoCache.get(hostKey);
     if (authInfo) {
       authInfo.refCnt++;
     } else {
       this._authInfoCache.set(hostKey, { refCnt: 1 });
     }
   },
 
-  setAuthInfo: function(hostKey, aAuthInfo) {
+  setAuthInfo(hostKey, aAuthInfo) {
     let authInfo = this._authInfoCache.get(hostKey);
     if (authInfo) {
       authInfo.username = aAuthInfo.username;
       authInfo.password = aAuthInfo.password;
     }
   },
 
-  retrieveAuthInfo: function(hostKey) {
+  retrieveAuthInfo(hostKey) {
     let authInfo = this._authInfoCache.get(hostKey);
     if (authInfo) {
       authInfo.refCnt--;
 
       if (authInfo.refCnt == 0) {
         this._authInfoCache.delete(hostKey);
       }
     }
--- a/calendar/base/modules/utils/calCategoryUtils.jsm
+++ b/calendar/base/modules/utils/calCategoryUtils.jsm
@@ -16,17 +16,17 @@ ChromeUtils.defineModuleGetter(this, "ca
 this.EXPORTED_SYMBOLS = ["calcategory"]; /* exported calcategory */
 
 var calcategory = {
   /**
    * Sets up the default categories from the localized string
    *
    * @return      The default set of categories as a comma separated string.
    */
-  setupDefaultCategories: function() {
+  setupDefaultCategories() {
     let defaultBranch = Services.prefs.getDefaultBranch("");
 
     // First, set up the category names
     let categories = cal.l10n.getString("categories", "categories2");
     defaultBranch.setStringPref("calendar.categories.names", categories);
 
     // Now, initialize the category default colors
     let categoryArray = calcategory.stringToArray(categories);
@@ -43,17 +43,17 @@ var calcategory = {
   },
 
   /**
    * Get array of category names from preferences or locale default,
    * unescaping any commas in each category name.
    *
    * @return                      array of category names
    */
-  fromPrefs: function() {
+  fromPrefs() {
     let categories = Services.prefs.getStringPref("calendar.categories.names", null);
 
     // If no categories are configured load a default set from properties file
     if (!categories) {
       categories = calcategory.setupDefaultCategories();
     }
     return calcategory.stringToArray(categories);
   },
@@ -64,17 +64,17 @@ var calcategory = {
    * Stored categories may include escaped commas within a name. Split
    * categories string at commas, but not at escaped commas (\,). Afterward,
    * replace escaped commas (\,) with commas (,) in each name.
    *
    * @param aCategoriesPrefValue  string from "calendar.categories.names" pref,
    *                                which may contain escaped commas (\,) in names.
    * @return                      list of category names
    */
-  stringToArray: function(aCategories) {
+  stringToArray(aCategories) {
     if (!aCategories) {
       return [];
     }
     /* eslint-disable no-control-regex */
     // \u001A is the unicode "SUBSTITUTE" character
     let categories = aCategories
       .replace(/\\,/g, "\u001A")
       .split(",")
@@ -93,12 +93,12 @@ var calcategory = {
    *
    * Category names may contain commas (,). Escape commas (\,) in each, then
    * join them in comma separated string for storage.
    *
    * @param aSortedCategoriesArray    sorted array of category names, may
    *                                    contain unescaped commas, which will
    *                                    be escaped in combined string.
    */
-  arrayToString: function(aSortedCategoriesArray) {
+  arrayToString(aSortedCategoriesArray) {
     return aSortedCategoriesArray.map(cat => cat.replace(/,/g, "\\,")).join(",");
   },
 };
--- a/calendar/base/modules/utils/calDataUtils.jsm
+++ b/calendar/base/modules/utils/calDataUtils.jsm
@@ -157,51 +157,50 @@ class OperationGroup {
   }
 
   toString() {
     return `[OperationGroup id=${this.id}]`;
   }
 }
 
 var caldata = {
-  ListenerSet: ListenerSet,
-  ObserverSet: ObserverSet,
-  OperationGroup: OperationGroup,
+  ListenerSet,
+  ObserverSet,
+  OperationGroup,
 
   /**
    * Use the binary search algorithm to search for an item in an array.
    * function.
    *
    * The comptor function may look as follows for calIDateTime objects.
    *     function comptor(a, b) {
    *         return a.compare(b);
    *     }
    * If no comptor is specified, the default greater-than comptor will be used.
    *
    * @param itemArray             The array to search.
    * @param newItem               The item to search in the array.
    * @param comptor               A comparison function that can compare two items.
    * @return                      The index of the new item.
    */
-  binarySearch: function(itemArray, newItem, comptor) {
+  binarySearch(itemArray, newItem, comptor) {
     function binarySearchInternal(low, high) {
       // Are we done yet?
       if (low == high) {
         return low + (comptor(newItem, itemArray[low]) < 0 ? 0 : 1);
       }
 
       let mid = Math.floor(low + (high - low) / 2);
       let cmp = comptor(newItem, itemArray[mid]);
       if (cmp > 0) {
         return binarySearchInternal(mid + 1, high);
       } else if (cmp < 0) {
         return binarySearchInternal(low, mid);
-      } else {
-        return mid;
       }
+      return mid;
     }
 
     if (itemArray.length < 1) {
       return -1;
     }
     if (!comptor) {
       comptor = function(a, b) {
         return (a > b) - (a < b);
@@ -219,24 +218,17 @@ var caldata = {
    * @param aItem                The calendar item to add a widget for.
    * @param comptor              A comparison function that can compare two items (not DOM Nodes!)
    * @param discardDuplicates    Use the comptor function to check if the item in
    *                               question is already in the array. If so, the
    *                               new item is not inserted.
    * @param itemAccessor         [optional] A function that receives a DOM node and returns the associated item
    *                               If null, this function will be used: function(n) n.item
    */
-  binaryInsertNode: function(
-    parentNode,
-    insertNode,
-    aItem,
-    comptor,
-    discardDuplicates,
-    itemAccessor
-  ) {
+  binaryInsertNode(parentNode, insertNode, aItem, comptor, discardDuplicates, itemAccessor) {
     let accessor = itemAccessor || caldata.binaryInsertNodeDefaultAccessor;
 
     // Get the index of the node before which the inserNode will be inserted
     let newIndex = caldata.binarySearch(Array.from(parentNode.children, accessor), aItem, comptor);
 
     if (newIndex < 0) {
       parentNode.appendChild(insertNode);
       newIndex = 0;
@@ -263,17 +255,17 @@ var caldata = {
    * @param itemArray             The array to insert into.
    * @param item                  The item to insert into the array.
    * @param comptor               A comparison function that can compare two items.
    * @param discardDuplicates     Use the comptor function to check if the item in
    *                                question is already in the array. If so, the
    *                                new item is not inserted.
    * @return                      The index of the new item.
    */
-  binaryInsert: function(itemArray, item, comptor, discardDuplicates) {
+  binaryInsert(itemArray, item, comptor, discardDuplicates) {
     let newIndex = caldata.binarySearch(itemArray, item, comptor);
 
     if (newIndex < 0) {
       itemArray.push(item);
       newIndex = 0;
     } else if (
       !discardDuplicates ||
       comptor(itemArray[Math.min(newIndex, itemArray.length - 1)], item) != 0
@@ -289,17 +281,17 @@ var caldata = {
    * Generic object comparer
    * Use to compare two objects which are not of type calIItemBase, in order
    * to avoid the js-wrapping issues mentioned above.
    *
    * @param aObject        first object to be compared
    * @param aOtherObject   second object to be compared
    * @param aIID           IID to use in comparison, undefined/null defaults to nsISupports
    */
-  compareObjects: function(aObject, aOtherObject, aIID) {
+  compareObjects(aObject, aOtherObject, aIID) {
     // xxx todo: seems to work fine, but I still mistrust this trickery...
     //           Anybody knows an official API that could be used for this purpose?
     //           For what reason do clients need to pass aIID since
     //           every XPCOM object has to implement nsISupports?
     //           XPCOM (like COM, like UNO, ...) defines that QueryInterface *only* needs to return
     //           the very same pointer for nsISupports during its lifetime.
     if (!aIID) {
       aIID = Ci.nsISupports;
--- a/calendar/base/modules/utils/calDateTimeUtils.jsm
+++ b/calendar/base/modules/utils/calDateTimeUtils.jsm
@@ -37,45 +37,45 @@ var caldtz = {
     return cal.getTimezoneService().floating;
   },
 
   /**
    * Makes sure the given timezone id is part of the list of recent timezones.
    *
    * @param aTzid     The timezone id to add
    */
-  saveRecentTimezone: function(aTzid) {
+  saveRecentTimezone(aTzid) {
     let recentTimezones = caldtz.getRecentTimezones();
     const MAX_RECENT_TIMEZONES = 5; // We don't need a pref for *everything*.
 
     if (aTzid != caldtz.defaultTimezone.tzid && !recentTimezones.includes(aTzid)) {
       // Add the timezone if its not already the default timezone
       recentTimezones.unshift(aTzid);
       recentTimezones.splice(MAX_RECENT_TIMEZONES);
       Services.prefs.setStringPref("calendar.timezone.recent", JSON.stringify(recentTimezones));
     }
   },
 
   /**
    * Returns a calIDateTime that corresponds to the current time in the user's
    * default timezone.
    */
-  now: function() {
+  now() {
     let date = caldtz.jsDateToDateTime(new Date());
     return date.getInTimezone(caldtz.defaultTimezone);
   },
 
   /**
    * Get the default event start date. This is the next full hour, or 23:00 if it
    * is past 23:00.
    *
    * @param aReferenceDate    If passed, the time of this date will be modified,
    *                            keeping the date and timezone intact.
    */
-  getDefaultStartDate: function(aReferenceDate) {
+  getDefaultStartDate(aReferenceDate) {
     let startDate = caldtz.now();
     if (aReferenceDate) {
       let savedHour = startDate.hour;
       startDate = aReferenceDate;
       if (!startDate.isMutable) {
         startDate = startDate.clone();
       }
       startDate.isDate = false;
@@ -93,75 +93,75 @@ var caldtz = {
   /**
    * Setup the default start and end hours of the given item. This can be a task
    * or an event.
    *
    * @param aItem             The item to set up the start and end date for.
    * @param aReferenceDate    If passed, the time of this date will be modified,
    *                            keeping the date and timezone intact.
    */
-  setDefaultStartEndHour: function(aItem, aReferenceDate) {
+  setDefaultStartEndHour(aItem, aReferenceDate) {
     aItem[caldtz.startDateProp(aItem)] = caldtz.getDefaultStartDate(aReferenceDate);
 
     if (cal.item.isEvent(aItem)) {
       aItem.endDate = aItem.startDate.clone();
       aItem.endDate.minute += Services.prefs.getIntPref("calendar.event.defaultlength", 60);
     }
   },
 
   /**
    * Returns the property name used for the start date of an item, ie either an
    * event's start date or a task's entry date.
    */
-  startDateProp: function(aItem) {
+  startDateProp(aItem) {
     if (cal.item.isEvent(aItem)) {
       return "startDate";
     } else if (cal.item.isToDo(aItem)) {
       return "entryDate";
     }
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
   /**
    * Returns the property name used for the end date of an item, ie either an
    * event's end date or a task's due date.
    */
-  endDateProp: function(aItem) {
+  endDateProp(aItem) {
     if (cal.item.isEvent(aItem)) {
       return "endDate";
     } else if (cal.item.isToDo(aItem)) {
       return "dueDate";
     }
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
   /**
    * Check if the two dates are on the same day (ignoring time)
    *
    * @param date1     The left date to compare
    * @param date2     The right date to compare
    * @return          True, if dates are on the same day
    */
-  sameDay: function(date1, date2) {
+  sameDay(date1, date2) {
     if (date1 && date2) {
       if (date1.day == date2.day && date1.month == date2.month && date1.year == date2.year) {
         return true;
       }
     }
     return false;
   },
 
   /**
    * Many computations want to work only with date-times, not with dates.  This
    * method will return a proper datetime (set to midnight) for a date object.  If
    * the object is already a datetime, it will simply be returned.
    *
    * @param aDate  the date or datetime to check
    */
-  ensureDateTime: function(aDate) {
+  ensureDateTime(aDate) {
     if (!aDate || !aDate.isDate) {
       return aDate;
     }
     let newDate = aDate.clone();
     newDate.isDate = false;
     return newDate;
   },
 
@@ -172,17 +172,17 @@ var caldtz = {
    * @param aTimezone (optional) a timezone that should be enforced
    * @returns         a calIDateTime
    *
    * @warning  Use of this function is strongly discouraged.  calIDateTime should
    *           be used directly whenever possible.
    *           If you pass a timezone, then the passed jsDate's timezone will be ignored,
    *           but only its local time portions are be taken.
    */
-  jsDateToDateTime: function(aDate, aTimezone) {
+  jsDateToDateTime(aDate, aTimezone) {
     let newDate = cal.createDateTime();
     if (aTimezone) {
       newDate.resetTo(
         aDate.getFullYear(),
         aDate.getMonth(),
         aDate.getDate(),
         aDate.getHours(),
         aDate.getMinutes(),
@@ -197,33 +197,32 @@ var caldtz = {
 
   /**
    * Convert a calIDateTime to a Javascript date object. This is the
    * replacement for the former .jsDate property.
    *
    * @param cdt       The calIDateTime instnace
    * @return          The Javascript date equivalent.
    */
-  dateTimeToJsDate: function(cdt) {
+  dateTimeToJsDate(cdt) {
     if (cdt.timezone.isFloating) {
       return new Date(cdt.year, cdt.month, cdt.day, cdt.hour, cdt.minute, cdt.second);
-    } else {
-      return new Date(cdt.nativeTime / 1000);
     }
+    return new Date(cdt.nativeTime / 1000);
   },
 
   /**
    * fromRFC3339
    * Convert a RFC3339 compliant Date string to a calIDateTime.
    *
    * @param aStr          The RFC3339 compliant Date String
    * @param aTimezone     The timezone this date string is most likely in
    * @return              A calIDateTime object
    */
-  fromRFC3339: function(aStr, aTimezone) {
+  fromRFC3339(aStr, aTimezone) {
     // XXX I have not covered leapseconds (matches[8]), this might need to
     // be done. The only reference to leap seconds I found is bug 227329.
     let dateTime = cal.createDateTime();
 
     // Killer regex to parse RFC3339 dates
     let re = new RegExp(
       "^([0-9]{4})-([0-9]{2})-([0-9]{2})" +
         "([Tt]([0-9]{2}):([0-9]{2}):([0-9]{2})(\\.[0-9]+)?)?" +
@@ -294,17 +293,17 @@ var caldtz = {
 
   /**
    * toRFC3339
    * Convert a calIDateTime to a RFC3339 compliant Date string
    *
    * @param aDateTime     The calIDateTime object
    * @return              The RFC3339 compliant date string
    */
-  toRFC3339: function(aDateTime) {
+  toRFC3339(aDateTime) {
     if (!aDateTime) {
       return "";
     }
 
     let full_tzoffset = aDateTime.timezoneOffset;
     let tzoffset_hr = Math.floor(Math.abs(full_tzoffset) / 3600);
 
     let tzoffset_mn = ((Math.abs(full_tzoffset) / 3600).toFixed(2) - tzoffset_hr) * 60;
@@ -344,17 +343,17 @@ var caldtz = {
 
   /**
    * Gets the list of recent timezones. Optionally returns the list as
    * calITimezones.
    *
    * @param aConvertZones     (optional) If true, return calITimezones instead
    * @return                  An array of timezone ids or calITimezones.
    */
-  getRecentTimezones: function(aConvertZones) {
+  getRecentTimezones(aConvertZones) {
     let recentTimezones = JSON.parse(
       Services.prefs.getStringPref("calendar.timezone.recent", "[]") || "[]"
     );
     if (!Array.isArray(recentTimezones)) {
       recentTimezones = [];
     }
 
     let tzService = cal.getTimezoneService();
--- a/calendar/base/modules/utils/calEmailUtils.jsm
+++ b/calendar/base/modules/utils/calEmailUtils.jsm
@@ -21,17 +21,17 @@ var calemail = {
    * parameters. These parameters are mostly raw header fields, see #createRecipientList function
    * to create a recipient list string.
    *
    * @param {String} aRecipient       The email recipients string.
    * @param {String} aSubject         The email subject.
    * @param {String} aBody            The encoded email body text.
    * @param {nsIMsgIdentity} aIdentity    The email identity to use for sending
    */
-  sendTo: function(aRecipient, aSubject, aBody, aIdentity) {
+  sendTo(aRecipient, aSubject, aBody, aIdentity) {
     let msgParams = Cc["@mozilla.org/messengercompose/composeparams;1"].createInstance(
       Ci.nsIMsgComposeParams
     );
     let composeFields = Cc["@mozilla.org/messengercompose/composefields;1"].createInstance(
       Ci.nsIMsgCompFields
     );
 
     composeFields.to = aRecipient;
@@ -47,17 +47,17 @@ var calemail = {
   },
 
   /**
    * Iterates all email identities and calls the passed function with identity and account.
    * If the called function returns false, iteration is stopped.
    *
    * @param {Function} aFunc       The function to be called for each identity and account
    */
-  iterateIdentities: function(aFunc) {
+  iterateIdentities(aFunc) {
     let accounts = MailServices.accounts.accounts;
     for (let i = 0; i < accounts.length; ++i) {
       let account = accounts.queryElementAt(i, Ci.nsIMsgAccount);
       let identities = account.identities;
       for (let j = 0; j < identities.length; ++j) {
         let identity = identities.queryElementAt(j, Ci.nsIMsgIdentity);
         if (!aFunc(identity, account)) {
           break;
@@ -67,37 +67,37 @@ var calemail = {
   },
 
   /**
    * Prepends a mailto: prefix to an email address like string
    *
    * @param  {String} aId     The string to prepend the prefix if not already there
    * @return {String}         The string with prefix
    */
-  prependMailTo: function(aId) {
+  prependMailTo(aId) {
     return aId.replace(/^(?:mailto:)?(.*)@/i, "mailto:$1@");
   },
 
   /**
    * Removes an existing mailto: prefix from an attendee id
    *
    * @param  {String} aId     The string to remove the prefix from if any
    * @return {String}         The string without prefix
    */
-  removeMailTo: function(aId) {
+  removeMailTo(aId) {
     return aId.replace(/^mailto:/i, "");
   },
 
   /**
    * Provides a string to use in email "to" header for given attendees
    *
    * @param  {calIAttendee[]} aAttendees          Array of calIAttendee's to check
    * @return {String}                             Valid string to use in a 'to' header of an email
    */
-  createRecipientList: function(aAttendees) {
+  createRecipientList(aAttendees) {
     let cbEmail = function(aVal) {
       let email = calemail.getAttendeeEmail(aVal, true);
       if (!email.length) {
         cal.LOG("Dropping invalid recipient for email transport: " + aVal.toString());
       }
       return email;
     };
     return aAttendees
@@ -109,17 +109,17 @@ var calemail = {
   /**
    * Returns a wellformed email string like 'attendee@example.net',
    * 'Common Name <attendee@example.net>' or '"Name, Common" <attendee@example.net>'
    *
    * @param  {calIAttendee} aAttendee     The attendee to check
    * @param  {Boolean} aIncludeCn         Whether or not to return also the CN if available
    * @return {String}                     Valid email string or an empty string in case of error
    */
-  getAttendeeEmail: function(aAttendee, aIncludeCn) {
+  getAttendeeEmail(aAttendee, aIncludeCn) {
     // If the recipient id is of type urn, we need to figure out the email address, otherwise
     // we fall back to the attendee id
     let email = aAttendee.id.match(/^urn:/i) ? aAttendee.getProperty("EMAIL") || "" : aAttendee.id;
     // Strip leading "mailto:" if it exists.
     email = email.replace(/^mailto:/i, "");
     // We add the CN if requested and available
     let commonName = aAttendee.commonName;
     if (aIncludeCn && email.length > 0 && commonName && commonName.length > 0) {
@@ -135,17 +135,17 @@ var calemail = {
   },
 
   /**
    * Returns a basically checked recipient list - malformed elements will be removed
    *
    * @param {String} aRecipients      A comma-seperated list of e-mail addresses
    * @return {String}                 A validated comma-seperated list of e-mail addresses
    */
-  validateRecipientList: function(aRecipients) {
+  validateRecipientList(aRecipients) {
     let compFields = Cc["@mozilla.org/messengercompose/composefields;1"].createInstance(
       Ci.nsIMsgCompFields
     );
     // Resolve the list considering also configured common names
     let members = compFields.splitRecipients(aRecipients, false);
     let list = [];
     let prefix = "";
     for (let member of members) {
@@ -193,17 +193,17 @@ var calemail = {
   /**
    * Check if the attendee object matches one of the addresses in the list. This
    * is useful to determine whether the current user acts as a delegate.
    *
    * @param {calIAttendee} aRefAttendee   The reference attendee object
    * @param {String[]} aAddresses         The list of addresses
    * @return {Boolean}                    True, if there is a match
    */
-  attendeeMatchesAddresses: function(aRefAttendee, aAddresses) {
+  attendeeMatchesAddresses(aRefAttendee, aAddresses) {
     let attId = aRefAttendee.id;
     if (!attId.match(/^mailto:/i)) {
       // Looks like its not a normal attendee, possibly urn:uuid:...
       // Try getting the email through the EMAIL property.
       let emailProp = aRefAttendee.getProperty("EMAIL");
       if (emailProp) {
         attId = emailProp;
       }
--- a/calendar/base/modules/utils/calItemUtils.jsm
+++ b/calendar/base/modules/utils/calItemUtils.jsm
@@ -48,65 +48,65 @@ var calitem = {
       mDeletedItems: null,
 
       /**
        * Expect the difference engine to be in the given state.
        *
        * @param aState    The state to be in
        * @param aMethod   The method name expecting the state
        */
-      _expectState: function(aState, aMethod) {
+      _expectState(aState, aMethod) {
         if ((this.state & aState) == 0) {
           throw new Error(
             "ItemDiff method " + aMethod + " called while in unexpected state " + this.state
           );
         }
       },
 
       /**
        * Load the difference engine with one item, see load.
        *
        * @param item      The item to load
        */
-      load1: function(item) {
+      load1(item) {
         this.load([item]);
       },
 
       /**
        * Loads an array of items. This step cannot be executed
        * after calling the difference methods.
        *
        * @param items     The array of items to load
        */
-      load: function(items) {
+      load(items) {
         this._expectState(this.STATE_INITIAL | this.STATE_LOADING, "load");
 
         for (let item of items) {
           this.mInitialItems[item.hashId] = item;
         }
 
         this.state = this.STATE_LOADING;
       },
 
       /**
        * Calculates the difference for the passed item, see difference.
        *
        * @param item      The item to calculate difference with
        */
-      difference1: function(item) {
+      difference1(item) {
         this.difference([item]);
       },
 
       /**
        * Calculate the difference for the array of items. This method should be
        * called after all load methods and before the complete method.
        *
        * @param items     The array of items to calculate difference with
        */
-      difference: function(items) {
+      difference(items) {
         this._expectState(
           this.STATE_INITIAL | this.STATE_LOADING | this.STATE_DIFFERING,
           "difference"
         );
 
         this.mModifiedOldItems.startBatch();
         this.mModifiedItems.startBatch();
         this.mAddedItems.startBatch();
@@ -128,17 +128,17 @@ var calitem = {
 
         this.state = this.STATE_DIFFERING;
       },
 
       /**
        * Tell the engine that all load and difference calls have been made, this
        * makes sure that all item states are correctly returned.
        */
-      complete: function() {
+      complete() {
         this._expectState(
           this.STATE_INITIAL | this.STATE_LOADING | this.STATE_DIFFERING,
           "complete"
         );
 
         this.mDeletedItems.startBatch();
 
         for (let hashId in this.mInitialItems) {
@@ -179,17 +179,17 @@ var calitem = {
       /** @return the number of loaded items */
       get count() {
         return Object.keys(this.mInitialItems).length;
       },
 
       /**
        * Resets the difference engine to its initial state.
        */
-      reset: function() {
+      reset() {
         this.mInitialItems = {};
         this.mModifiedItems = new cal.HashedArray();
         this.mModifiedOldItems = new cal.HashedArray();
         this.mAddedItems = new cal.HashedArray();
         this.mDeletedItems = new cal.HashedArray();
         this.state = this.STATE_INITIAL;
       },
     };
@@ -198,73 +198,73 @@ var calitem = {
 
   /**
    * Checks if an item is supported by a Calendar.
    *
    * @param aCalendar the calendar
    * @param aItem the item either a task or an event
    * @return true or false
    */
-  isItemSupported: function(aItem, aCalendar) {
+  isItemSupported(aItem, aCalendar) {
     if (calitem.isToDo(aItem)) {
       return aCalendar.getProperty("capabilities.tasks.supported") !== false;
     } else if (calitem.isEvent(aItem)) {
       return aCalendar.getProperty("capabilities.events.supported") !== false;
     }
     return false;
   },
 
   /*
    * Checks whether a calendar supports events
    *
    * @param aCalendar
    */
-  isEventCalendar: function(aCalendar) {
+  isEventCalendar(aCalendar) {
     return aCalendar.getProperty("capabilities.events.supported") !== false;
   },
 
   /*
    * Checks whether a calendar supports tasks
    *
    * @param aCalendar
    */
-  isTaskCalendar: function(aCalendar) {
+  isTaskCalendar(aCalendar) {
     return aCalendar.getProperty("capabilities.tasks.supported") !== false;
   },
 
   /**
    * Determines whether or not the aObject is a calIEvent
    *
    * @param aObject  the object to test
    * @returns        true if the object is a calIEvent, false otherwise
    */
-  isEvent: function(aObject) {
+  isEvent(aObject) {
     return cal.wrapInstance(aObject, Ci.calIEvent) != null;
   },
 
   /**
    * Determines whether or not the aObject is a calITodo
    *
    * @param aObject  the object to test
    * @returns        true if the object is a calITodo, false otherwise
    */
-  isToDo: function(aObject) {
+  isToDo(aObject) {
     return cal.wrapInstance(aObject, Ci.calITodo) != null;
   },
 
   /**
    * Checks whether the passed item fits into the demanded range.
    *
    * @param item               the item
    * @param rangeStart         (inclusive) range start or null (open range)
    * @param rangeStart         (exclusive) range end or null (open range)
    * @param returnDtstartOrDue returns item's start (or due) date in case
    *                           the item is in the specified Range; null otherwise.
    */
-  checkIfInRange: function(item, rangeStart, rangeEnd, returnDtstartOrDue) {
+  checkIfInRange(item, rangeStart, rangeEnd, returnDtstartOrDue) {
     let startDate;
     let endDate;
     let queryStart = cal.dtz.ensureDateTime(rangeStart);
     if (calitem.isEvent(item)) {
       startDate = item.startDate;
       if (!startDate) {
         // DTSTART mandatory
         // xxx todo: should we assert this case?
@@ -310,17 +310,17 @@ var calitem = {
       (!queryEnd || start.compare(queryEnd) < 0) &&
       (!queryStart || end.compare(queryStart) > 0)
     ) {
       return startDate;
     }
     return null;
   },
 
-  setItemProperty: function(item, propertyName, aValue, aCapability) {
+  setItemProperty(item, propertyName, aValue, aCapability) {
     let isSupported =
       item.calendar.getProperty("capabilities." + aCapability + ".supported") !== false;
     let value = aCapability && !isSupported ? null : aValue;
 
     switch (propertyName) {
       case "startDate":
         if (
           (value.isDate && !item.startDate.isDate) ||
@@ -399,17 +399,17 @@ var calitem = {
     }
   },
 
   /**
    * Returns the default transparency to apply for an event depending on whether its an all-day event
    *
    * @param aIsAllDay      If true, the default transparency for all-day events is returned
    */
-  getEventDefaultTransparency: function(aIsAllDay) {
+  getEventDefaultTransparency(aIsAllDay) {
     let transp = null;
     if (aIsAllDay) {
       transp = Services.prefs.getBoolPref(
         "calendar.events.defaultTransparency.allday.transparent",
         false
       )
         ? "TRANSPARENT"
         : "OPAQUE";
@@ -440,17 +440,17 @@ var calitem = {
      *
      * @param aFirstItem        The item to compare.
      * @param aSecondItem       The item to compare to.
      * @param aIgnoreProps      (optional) An array of parameters to ignore.
      * @param aIgnoreParams     (optional) An object describing which parameters to
      *                                     ignore.
      * @return                  True, if items match.
      */
-  compareContent: function(aFirstItem, aSecondItem, aIgnoreProps, aIgnoreParams) {
+  compareContent(aFirstItem, aSecondItem, aIgnoreProps, aIgnoreParams) {
     let ignoreProps = arr2hash(
       aIgnoreProps || [
         "SEQUENCE",
         "DTSTAMP",
         "LAST-MODIFIED",
         "X-MOZ-GENERATION",
         "X-MICROSOFT-DISALLOW-COUNTER",
         "X-MOZ-SEND-INVITATIONS",
@@ -509,17 +509,17 @@ var calitem = {
   },
 
   /**
    * Shifts an item by the given timely offset.
    *
    * @param item an item
    * @param offset an offset (calIDuration)
    */
-  shiftOffset: function(item, offset) {
+  shiftOffset(item, offset) {
     // When modifying dates explicitly using the setters is important
     // since those may triggers e.g. calIRecurrenceInfo::onStartDateChange
     // or invalidate other properties. Moreover don't modify the date-time objects
     // without cloning, because changes cannot be calculated if doing so.
     if (calitem.isEvent(item)) {
       let date = item.startDate.clone();
       date.addDuration(offset);
       item.startDate = date;
@@ -543,17 +543,17 @@ var calitem = {
 
   /**
    * moves an item to another startDate
    *
    * @param aOldItem             The Item to be modified
    * @param aNewDate             The date at which the new item is going to start
    * @return                     The modified item
    */
-  moveToDate: function(aOldItem, aNewDate) {
+  moveToDate(aOldItem, aNewDate) {
     let newItem = aOldItem.clone();
     let start = (
       aOldItem[cal.dtz.startDateProp(aOldItem)] || aOldItem[cal.dtz.endDateProp(aOldItem)]
     ).clone();
     let isDate = start.isDate;
     start.resetTo(
       aNewDate.year,
       aNewDate.month,
@@ -578,17 +578,17 @@ var calitem = {
       newItem[cal.dtz.endDateProp(newItem)] = start;
     }
     return newItem;
   },
 
   /**
    * Shortcut function to serialize an item (including all overridden items).
    */
-  serialize: function(aItem) {
+  serialize(aItem) {
     let serializer = Cc["@mozilla.org/calendar/ics-serializer;1"].createInstance(
       Ci.calIIcsSerializer
     );
     serializer.addItems([aItem]);
     return serializer.serializeToString();
   },
 
   /**
@@ -604,33 +604,33 @@ var calitem = {
   /**
    * This is a centralized function for setting the prodid and version on an
    * ical component.  This should be used whenever you need to set the prodid
    * and version on a calIcalComponent object.
    *
    * @param aIcalComponent        The ical component to set the prodid and
    *                                version on.
    */
-  setStaticProps: function(aIcalComponent) {
+  setStaticProps(aIcalComponent) {
     // Throw for an invalid parameter
     aIcalComponent = cal.wrapInstance(aIcalComponent, Ci.calIIcalComponent);
     if (!aIcalComponent) {
       throw Cr.NS_ERROR_INVALID_ARG;
     }
     // Set the prodid and version
     aIcalComponent.prodid = calitem.productId;
     aIcalComponent.version = calitem.productVersion;
   },
 
   /**
    * Search for already open item dialog.
    *
    * @param aItem     The item of the dialog to search for.
    */
-  findWindow: function(aItem) {
+  findWindow(aItem) {
     // check for existing dialog windows
     for (let dlg of Services.wm.getEnumerator("Calendar:EventDialog")) {
       if (
         dlg.arguments[0] &&
         dlg.arguments[0].mode == "modify" &&
         dlg.arguments[0].calendarEvent &&
         dlg.arguments[0].calendarEvent.hashId == aItem.hashId
       ) {
@@ -648,45 +648,44 @@ var calitem = {
 
   /**
    * sets the 'isDate' property of an item
    *
    * @param aItem         The Item to be modified
    * @param aIsDate       True or false indicating the new value of 'isDate'
    * @return              The modified item
    */
-  setToAllDay: function(aItem, aIsDate) {
+  setToAllDay(aItem, aIsDate) {
     let start = aItem[cal.dtz.startDateProp(aItem)];
     let end = aItem[cal.dtz.endDateProp(aItem)];
     if (start || end) {
       let item = aItem.clone();
       if (start && start.isDate != aIsDate) {
         start = start.clone();
         start.isDate = aIsDate;
         item[cal.dtz.startDateProp(item)] = start;
       }
       if (end && end.isDate != aIsDate) {
         end = end.clone();
         end.isDate = aIsDate;
         item[cal.dtz.endDateProp(item)] = end;
       }
       return item;
-    } else {
-      return aItem;
     }
+    return aItem;
   },
 
   /**
    * This function return the progress state of a task:
    * completed, overdue, duetoday, inprogress, future
    *
    * @param aTask     The task to check.
    * @return          The progress atom.
    */
-  getProgressAtom: function(aTask) {
+  getProgressAtom(aTask) {
     let nowdate = new Date();
 
     if (aTask.recurrenceInfo) {
       return "repeating";
     }
 
     if (aTask.isCompleted) {
       return "completed";
--- a/calendar/base/modules/utils/calIteratorUtils.jsm
+++ b/calendar/base/modules/utils/calIteratorUtils.jsm
@@ -18,17 +18,17 @@ this.EXPORTED_SYMBOLS = ["caliterate"]; 
 var caliterate = {
   /**
    * Iterates an array of items, i.e. the passed item including all
    * overridden instances of a recurring series.
    *
    * @param {calIItemBase[]} items        array of items to iterate
    * @yields {calIItemBase}
    */
-  items: function*(items) {
+  *items(items) {
     for (let item of items) {
       yield item;
       let rec = item.recurrenceInfo;
       if (rec) {
         for (let exid of rec.getExceptionIds()) {
           yield rec.getExceptionFor(exid);
         }
       }
@@ -63,17 +63,17 @@ var caliterate = {
         iterable = Object.entries(iterable);
       }
 
       let ourIter = iterable[Symbol.iterator]();
       let currentThread = Services.tm.currentThread;
 
       // This is our dispatcher, it will be used for the iterations
       let dispatcher = {
-        run: function() {
+        run() {
           let startTime = new Date().getTime();
           while (new Date().getTime() - startTime < LATENCY) {
             let next = ourIter.next();
             let done = next.done;
 
             if (!done) {
               let rc = body(next.value);
               if (rc == cal.iterate.forEach.BREAK) {
@@ -111,17 +111,17 @@ var caliterate = {
    *
    * This iterator can only be used in a for..of block:
    *   for (let component of cal.iterate.icalComponent(aComp)) { ... }
    *
    *  @param {calIIcalComponent} aComponent   The component to iterate given the above rules.
    *  @param {String} aCompType               The type of item to iterate.
    *  @yields {calIIcalComponent}             The iterator that yields all items.
    */
-  icalComponent: function*(aComponent, aCompType = "ANY") {
+  *icalComponent(aComponent, aCompType = "ANY") {
     if (aComponent && aComponent.componentType == "VCALENDAR") {
       yield* cal.iterate.icalSubcomponent(aComponent, aCompType);
     } else if (aComponent && aComponent.componentType == "XROOT") {
       for (let calComp of cal.iterate.icalSubcomponent(aComponent, "VCALENDAR")) {
         yield* cal.iterate.icalSubcomponent(calComp, aCompType);
       }
     } else if (aComponent && (aCompType == "ANY" || aCompType == aComponent.componentType)) {
       yield aComponent;
@@ -135,17 +135,17 @@ var caliterate = {
    * This iterator can only be used in a for() block:
    *   for (let component of cal.iterate.icalSubcomponent(aComp)) { ... }
    *
    * @param {calIIcalComponent} aComponent    The component who's subcomponents to iterate.
    * @param {?String} aSubcomp                (optional) the specific subcomponent to enumerate.
    *                                            If not given, "ANY" will be used.
    * @yields {calIIcalComponent}              An iterator object to iterate the properties.
    */
-  icalSubcomponent: function*(aComponent, aSubcomp = "ANY") {
+  *icalSubcomponent(aComponent, aSubcomp = "ANY") {
     for (
       let subcomp = aComponent.getFirstSubcomponent(aSubcomp);
       subcomp;
       subcomp = aComponent.getNextSubcomponent(aSubcomp)
     ) {
       yield subcomp;
     }
   },
@@ -155,17 +155,17 @@ var caliterate = {
    * This iterator can only be used in a for() block:
    *   for (let property of cal.iterate.icalProperty(aComp)) { ... }
    *
    * @param {calIIcalComponent} aComponent    The component to iterate.
    * @param {?String} aProperty               (optional) the specific property to enumerate.
    *                                            If not given, "ANY" will be used.
    * @yields {calIIcalProperty}               An iterator object to iterate the properties.
    */
-  icalProperty: function*(aComponent, aProperty = "ANY") {
+  *icalProperty(aComponent, aProperty = "ANY") {
     for (
       let prop = aComponent.getFirstProperty(aProperty);
       prop;
       prop = aComponent.getNextProperty(aProperty)
     ) {
       yield prop;
     }
   },
@@ -175,17 +175,17 @@ var caliterate = {
    * This iterator behaves similar to the object iterator. Possible uses:
    *   for (let paramName in cal.iterate.icalParameter(prop)) { ... }
    * or:
    *   for (let [paramName, paramValue] of cal.iterate.icalParameter(prop)) { ... }
    *
    * @param {calIIcalProperty} aProperty         The property to iterate.
    * @yields {[String, String]}                  An iterator object to iterate the properties.
    */
-  icalParameter: function*(aProperty) {
+  *icalParameter(aProperty) {
     let paramSet = new Set();
     for (
       let paramName = aProperty.getFirstParameterName();
       paramName;
       paramName = aProperty.getNextParameterName()
     ) {
       // Workaround to avoid infinite loop when the property
       // contains duplicate parameters (bug 875739 for libical)
--- a/calendar/base/modules/utils/calItipUtils.jsm
+++ b/calendar/base/modules/utils/calItipUtils.jsm
@@ -20,17 +20,17 @@ var calitip = {
   /**
    * Gets the sequence/revision number, either of the passed item or the last received one of an
    * attendee; see <http://tools.ietf.org/html/draft-desruisseaux-caldav-sched-04#section-7.1>.
    *
    * @param {calIAttendee|calIItemBase} aItem     The item or attendee to get the sequence info
    *                                                from.
    * @return {Number}                             The sequence number
    */
-  getSequence: function(aItem) {
+  getSequence(aItem) {
     let seq = null;
 
     let wrappedItem = cal.wrapInstance(aItem, Ci.calIAttendee);
     if (wrappedItem) {
       seq = wrappedItem.getProperty("RECEIVED-SEQUENCE");
     } else if (aItem) {
       // Unless the below is standardized, we store the last original
       // REQUEST/PUBLISH SEQUENCE in X-MOZ-RECEIVED-SEQUENCE to test against it
@@ -44,30 +44,29 @@ var calitip = {
       // use Microsoft's Sequence number. I <3 MS
       if (seq === null || seq == "0") {
         seq = aItem.getProperty("X-MICROSOFT-CDO-APPT-SEQUENCE");
       }
     }
 
     if (seq === null) {
       return 0;
-    } else {
-      seq = parseInt(seq, 10);
-      return isNaN(seq) ? 0 : seq;
     }
+    seq = parseInt(seq, 10);
+    return isNaN(seq) ? 0 : seq;
   },
 
   /**
    * Gets the stamp date-time, either of the passed item or the last received one of an attendee;
    * see <http://tools.ietf.org/html/draft-desruisseaux-caldav-sched-04#section-7.2>.
    *
    * @param {calIAttendee|calIItemBase} aItem     The item or attendee to retrieve the stamp from
    * @return {calIDateTime}                       The timestamp for the item
    */
-  getStamp: function(aItem) {
+  getStamp(aItem) {
     let dtstamp = null;
 
     let wrappedItem = cal.wrapInstance(aItem, Ci.calIAttendee);
     if (wrappedItem) {
       let stamp = wrappedItem.getProperty("RECEIVED-DTSTAMP");
       if (stamp) {
         dtstamp = cal.createDateTime(stamp);
       }
@@ -90,91 +89,89 @@ var calitip = {
   /**
    * Compares sequences and/or stamps of two items
    *
    * @param {calIItemBase|calIAttendee} aItem1        The first item to compare
    * @param {calIItemBase|calIAttendee} aItem2        The second item to compare
    * @return {Number}                                 +1 if item2 is newer, -1 if item1 is newer
    *                                                    or 0 if both are equal
    */
-  compare: function(aItem1, aItem2) {
+  compare(aItem1, aItem2) {
     let comp = calitip.compareSequence(aItem1, aItem2);
     if (comp == 0) {
       comp = calitip.compareStamp(aItem1, aItem2);
     }
     return comp;
   },
 
   /**
    * Compares sequences of two items
    *
    * @param {calIItemBase|calIAttendee} aItem1        The first item to compare
    * @param {calIItemBase|calIAttendee} aItem2        The second item to compare
    * @return {Number}                                 +1 if item2 is newer, -1 if item1 is newer
    *                                                    or 0 if both are equal
    */
-  compareSequence: function(aItem1, aItem2) {
+  compareSequence(aItem1, aItem2) {
     let seq1 = calitip.getSequence(aItem1);
     let seq2 = calitip.getSequence(aItem2);
     if (seq1 > seq2) {
       return 1;
     } else if (seq1 < seq2) {
       return -1;
-    } else {
-      return 0;
     }
+    return 0;
   },
 
   /**
    * Compares stamp of two items
    *
    * @param {calIItemBase|calIAttendee} aItem1        The first item to compare
    * @param {calIItemBase|calIAttendee} aItem2        The second item to compare
    * @return {Number}                                 +1 if item2 is newer, -1 if item1 is newer
    *                                                    or 0 if both are equal
    */
-  compareStamp: function(aItem1, aItem2) {
+  compareStamp(aItem1, aItem2) {
     let st1 = calitip.getStamp(aItem1);
     let st2 = calitip.getStamp(aItem2);
     if (st1 && st2) {
       return st1.compare(st2);
     } else if (!st1 && st2) {
       return -1;
     } else if (st1 && !st2) {
       return 1;
-    } else {
-      return 0;
     }
+    return 0;
   },
 
   /**
    * Checks if the given calendar is a scheduling calendar. This means it
    * needs an organizer id and an itip transport. It should also be writable.
    *
    * @param {calICalendar} aCalendar      The calendar to check
    * @return {Boolean}                    True, if its a scheduling calendar.
    */
-  isSchedulingCalendar: function(aCalendar) {
+  isSchedulingCalendar(aCalendar) {
     return (
       cal.acl.isCalendarWritable(aCalendar) &&
       aCalendar.getProperty("organizerId") &&
       aCalendar.getProperty("itip.transport")
     );
   },
 
   /**
    * Scope: iTIP message receiver
    *
    * Given an nsIMsgDBHdr and an imipMethod, set up the given itip item.
    *
    * @param {calIItemBase} itipItem   The item to set up
    * @param {String} imipMethod       The received imip method
    * @param {nsIMsgDBHdr} aMsgHdr     Information about the received email
    */
-  initItemFromMsgData: function(itipItem, imipMethod, aMsgHdr) {
+  initItemFromMsgData(itipItem, imipMethod, aMsgHdr) {
     // set the sender of the itip message
     itipItem.sender = calitip.getMessageSender(aMsgHdr);
 
     // Get the recipient identity and save it with the itip item.
     itipItem.identity = calitip.getMessageRecipient(aMsgHdr);
 
     // We are only called upon receipt of an invite, so ensure that isSend
     // is false.
@@ -217,17 +214,17 @@ var calitip = {
    *
    * Gets the suggested text to be shown when an imip item has been processed.
    * This text is ready localized and can be displayed to the user.
    *
    * @param {Number} aStatus         The status of the processing (i.e NS_OK, an error code)
    * @param {Number} aOperationType  An operation type from calIOperationListener
    * @return {String}                The suggested text.
    */
-  getCompleteText: function(aStatus, aOperationType) {
+  getCompleteText(aStatus, aOperationType) {
     let text = "";
     const cIOL = Ci.calIOperationListener;
     if (Components.isSuccessCode(aStatus)) {
       switch (aOperationType) {
         case cIOL.ADD:
           text = cal.l10n.getLtnString("imipAddedItemToCal2");
           break;
         case cIOL.MODIFY:
@@ -247,17 +244,17 @@ var calitip = {
    * Scope: iTIP message receiver
    *
    * Gets a text describing the given itip method. The text is of the form
    * "This Message contains a ... ".
    *
    * @param {String} method      The method to describe.
    * @return {String}            The localized text about the method.
    */
-  getMethodText: function(method) {
+  getMethodText(method) {
     switch (method) {
       case "REFRESH":
         return cal.l10n.getLtnString("imipBarRefreshText");
       case "REQUEST":
         return cal.l10n.getLtnString("imipBarRequestText");
       case "PUBLISH":
         return cal.l10n.getLtnString("imipBarPublishText");
       case "CANCEL":
@@ -289,17 +286,17 @@ var calitip = {
    * @see processItipItem   This takes the same parameters as its optionFunc.
    * @param {calIItipItem} itipItem       The itipItem to query.
    * @param {Number} rc                   The result of retrieving the item
    * @param {Function} actionFunc         The action function.
    * @param {calIItemBase[]} foundItems   An array of items found while searching for the item
    *                                        in subscribed calendars
    * @return {Object}                     Return information about the options
    */
-  getOptionsText: function(itipItem, rc, actionFunc, foundItems) {
+  getOptionsText(itipItem, rc, actionFunc, foundItems) {
     let imipLabel = null;
     if (itipItem.receivedMethod) {
       imipLabel = calitip.getMethodText(itipItem.receivedMethod);
     }
     let data = { label: imipLabel, showItems: [], hideItems: [] };
     let separateButtons = Services.prefs.getBoolPref(
       "calendar.itip.separateInvitationButtons",
       false
@@ -470,17 +467,17 @@ var calitip = {
 
   /**
    * Scope: iTIP message receiver
    * Retrieves the message sender.
    *
    * @param {nsIMsgDBHdr} aMsgHdr     The message header to check.
    * @return {String}                 The email address of the intended recipient.
    */
-  getMessageSender: function(aMsgHdr) {
+  getMessageSender(aMsgHdr) {
     let author = (aMsgHdr && aMsgHdr.author) || "";
     let compFields = Cc["@mozilla.org/messengercompose/composefields;1"].createInstance(
       Ci.nsIMsgCompFields
     );
     let addresses = compFields.splitRecipients(author, true);
     if (addresses.length != 1) {
       cal.LOG("No unique email address for lookup in message.\r\n" + cal.STACK(20));
     }
@@ -490,17 +487,17 @@ var calitip = {
   /**
    * Scope: iTIP message receiver
    *
    * Retrieves the intended recipient for this message.
    *
    * @param {nsIMsgDBHdr} aMsgHdr     The message to check.
    * @return {String}                 The email of the intended recipient.
    */
-  getMessageRecipient: function(aMsgHdr) {
+  getMessageRecipient(aMsgHdr) {
     if (!aMsgHdr) {
       return null;
     }
 
     let identities;
     let actMgr = MailServices.accounts;
     if (aMsgHdr.accountKey) {
       // First, check if the message has an account key. If so, we can use the
@@ -569,17 +566,17 @@ var calitip = {
    * Prompt for the target calendar, if needed for the given method. This calendar will be set on
    * the passed itip item.
    *
    * @param {String} aMethod          The method to check.
    * @param {calIItipItem} aItipItem  The itip item to set the target calendar on.
    * @param {DOMWindpw} aWindow       The window to open the dialog on.
    * @return {Boolean}                True, if a calendar was selected or no selection is needed.
    */
-  promptCalendar: function(aMethod, aItipItem, aWindow) {
+  promptCalendar(aMethod, aItipItem, aWindow) {
     let needsCalendar = false;
     let targetCalendar = null;
     switch (aMethod) {
       // methods that don't require the calendar chooser:
       case "REFRESH":
       case "REQUEST:UPDATE":
       case "REQUEST:UPDATE-MINOR":
       case "PUBLISH:UPDATE":
@@ -646,17 +643,17 @@ var calitip = {
 
   /**
    * Clean up after the given iTIP item. This needs to be called once for each time
    * processItipItem is called. May be called with a null itipItem in which case it will do
    * nothing.
    *
    * @param {calIItipItem} itipItem      The iTIP item to clean up for.
    */
-  cleanupItipItem: function(itipItem) {
+  cleanupItipItem(itipItem) {
     if (itipItem) {
       let itemList = itipItem.getItemList();
       if (itemList.length > 0) {
         // Again, we can assume the id is the same over all items per spec
         ItipItemFinderFactory.cleanup(itemList[0].id);
       }
     }
   },
@@ -678,17 +675,17 @@ var calitip = {
    *   * CANCEL -- invitation cancel (sent by organizer)
    *   * COUNTER -- counterproposal (sent by attendee)
    *   * DECLINECOUNTER -- denial of a counterproposal (sent by organizer)
    *
    * @param {calIItipItem} itipItem       The iTIP item
    * @param {Function} optionsFunc        The function being called with parameters: itipItem,
    *                                          resultCode, actionFunc
    */
-  processItipItem: function(itipItem, optionsFunc) {
+  processItipItem(itipItem, optionsFunc) {
     switch (itipItem.receivedMethod.toUpperCase()) {
       case "REFRESH":
       case "PUBLISH":
       case "REQUEST":
       case "CANCEL":
       case "COUNTER":
       case "DECLINECOUNTER":
       case "REPLY": {
@@ -726,17 +723,17 @@ var calitip = {
    *                                            parameters for sending itip messages as response
    *                                            mode, comments or a subset of recipients. Currently
    *                                            implemented attributes are:
    *                             * responseMode Response mode (long) as defined for autoResponse
    *                                            of calIItipItem. The default mode is USER (which
    *                                            will trigger displaying the previously known popup
    *                                            to ask the user whether to send)
    */
-  checkAndSend: function(aOpType, aItem, aOriginalItem, aExtResponse = null) {
+  checkAndSend(aOpType, aItem, aOriginalItem, aExtResponse = null) {
     // balance out parts of the modification vs delete confusion, deletion of occurrences
     // are notified as parent modifications and modifications of occurrences are notified
     // as mixed new-occurrence, old-parent (IIRC).
     if (aOriginalItem && aItem.recurrenceInfo) {
       if (aOriginalItem.recurrenceId && !aItem.recurrenceId) {
         // sanity check: assure aItem doesn't refer to the master
         aItem = aItem.recurrenceInfo.getOccurrenceFor(aOriginalItem.recurrenceId);
         cal.ASSERT(aItem, "unexpected!");
@@ -1016,17 +1013,17 @@ var calitip = {
 
   /**
    * Bumps the SEQUENCE in case of a major change; XXX todo may need more fine-tuning.
    *
    * @param {calIItemBase} newItem        The new item to set the sequence on
    * @param {calIItemBase} oldItem        The old item to get the previous version from.
    * @return {calIItemBase}               The newly changed item
    */
-  prepareSequence: function(newItem, oldItem) {
+  prepareSequence(newItem, oldItem) {
     if (calitip.isInvitation(newItem)) {
       return newItem; // invitation copies don't bump the SEQUENCE
     }
 
     if (newItem.recurrenceId && !oldItem.recurrenceId && oldItem.recurrenceInfo) {
       // XXX todo: there's still the bug that modifyItem is called with mixed occurrence/parent,
       //           find original occurrence
       oldItem = oldItem.recurrenceInfo.getOccurrenceFor(newItem.recurrenceId);
@@ -1079,17 +1076,17 @@ var calitip = {
    * Returns a copy of an itipItem with modified properties and items build from scratch Use
    * itipItem.clone() instead if only a simple copy is required
    *
    * @param  {calIItipItem} aItipItem  ItipItem to derive a new one from
    * @param  {calIItemBase[]} aItems   calIEvent or calITodo items to be contained in the new itipItem
    * @param  {Object} aProps           Properties to be different in the new itipItem
    * @return {calIItipItem}            The copied and modified item
    */
-  getModifiedItipItem: function(aItipItem, aItems = [], aProps = {}) {
+  getModifiedItipItem(aItipItem, aItems = [], aProps = {}) {
     let itipItem = Cc["@mozilla.org/calendar/itip-item;1"].createInstance(Ci.calIItipItem);
     let serializedItems = "";
     for (let item of aItems) {
       serializedItems += cal.item.serialize(item);
     }
     itipItem.init(serializedItems);
 
     itipItem.autoResponse = "autoResponse" in aProps ? aProps.autoResponse : aItipItem.autoResponse;
@@ -1110,17 +1107,17 @@ var calitip = {
    * A shortcut to send DECLINECOUNTER messages - for everything else use calitip.checkAndSend
    *
    * @param {calIItipItem} aItem              item to be sent
    * @param {String} aMethod                  iTIP method
    * @param {calIAttendee[]} aRecipientsList  array of calIAttendee objects the message should be sent to
    * @param {Object} aAutoResponse            JS object whether the transport should ask before sending
    * @return {Boolean}                        True
    */
-  sendDeclineCounterMessage: function(aItem, aMethod, aRecipientsList, aAutoResponse) {
+  sendDeclineCounterMessage(aItem, aMethod, aRecipientsList, aAutoResponse) {
     if (aMethod == "DECLINECOUNTER") {
       return sendMessage(aItem, aMethod, aRecipientsList, aAutoResponse);
     }
     return false;
   },
 
   /**
    * Returns a copy of an event that
@@ -1129,17 +1126,17 @@ var calitip = {
    * - has any attendee removed
    * Intended to get a copy of a normal event invitation that behaves as if the PUBLISH method was
    * chosen instead.
    *
    * @param {calIItemBase} aItem      Original item
    * @param {?String} aUid            UID to use for the new item
    * @return {calIItemBase}           The copied item for publishing
    */
-  getPublishLikeItemCopy: function(aItem, aUid) {
+  getPublishLikeItemCopy(aItem, aUid) {
     // avoid changing aItem
     let item = aItem.clone();
     // reset to a new UUID if applicable
     item.id = aUid || cal.getUUID();
     // add a relation to the original item
     let relation = cal.createRelation();
     relation.relId = aItem.id;
     relation.relType = "SIBLING";
@@ -1153,34 +1150,34 @@ var calitip = {
   },
 
   /**
    * Shortcut function to check whether an item is an invitation copy.
    *
    * @param {calIItemBase} aItem      The item to check for an invitation.
    * @return {Boolean}                True, if the item is an invitation.
    */
-  isInvitation: function(aItem) {
+  isInvitation(aItem) {
     let isInvitation = false;
     let calendar = cal.wrapInstance(aItem.calendar, Ci.calISchedulingSupport);
     if (calendar) {
       isInvitation = calendar.isInvitation(aItem);
     }
     return isInvitation;
   },
 
   /**
    * Shortcut function to check whether an item is an invitation copy and has a participation
    * status of either NEEDS-ACTION or TENTATIVE.
    *
    * @param {calIAttendee|calIItemBase} aItem     either calIAttendee or calIItemBase
    * @return {Boolean}                            True, if the attendee partstat is NEEDS-ACTION
    *                                                or TENTATIVE
    */
-  isOpenInvitation: function(aItem) {
+  isOpenInvitation(aItem) {
     let wrappedItem = cal.wrapInstance(aItem, Ci.calIAttendee);
     if (!wrappedItem) {
       aItem = calitip.getInvitedAttendee(aItem);
     }
     if (aItem) {
       switch (aItem.participationStatus) {
         case "NEEDS-ACTION":
         case "TENTATIVE":
@@ -1193,17 +1190,17 @@ var calitip = {
   /**
    * Resolves delegated-to/delegated-from calusers for a given attendee to also include the
    * respective CNs if available in a given set of attendees
    *
    * @param {calIAttendee} aAttendee          The attendee to resolve the delegation information for
    * @param {calIAttendee[]} aAttendees       An array of calIAttendee objects to look up
    * @return {Object}                         An object with string attributes for delegators and delegatees
    */
-  resolveDelegation: function(aAttendee, aAttendees) {
+  resolveDelegation(aAttendee, aAttendees) {
     let attendees = aAttendees || [aAttendee];
 
     // this will be replaced by a direct property getter in calIAttendee
     let delegators = [];
     let delegatees = [];
     let delegatorProp = aAttendee.getProperty("DELEGATED-FROM");
     if (delegatorProp) {
       delegators = typeof delegatorProp == "string" ? [delegatorProp] : delegatorProp;
@@ -1231,17 +1228,17 @@ var calitip = {
   /**
    * Shortcut function to get the invited attendee of an item.
    *
    * @param {calIItemBase} aItem          Event or task to get the invited attendee for
    * @param {?calICalendar} aCalendar     The calendar to use for checking, defaults to the item
    *                                        calendar
    * @return {?calIAttendee}              The attendee that was invited
    */
-  getInvitedAttendee: function(aItem, aCalendar) {
+  getInvitedAttendee(aItem, aCalendar) {
     if (!aCalendar) {
       aCalendar = aItem.calendar;
     }
     let invitedAttendee = null;
     let calendar = cal.wrapInstance(aCalendar, Ci.calISchedulingSupport);
     if (calendar) {
       invitedAttendee = calendar.getInvitedAttendee(aItem);
     }
@@ -1251,17 +1248,17 @@ var calitip = {
   /**
    * Returns all attendees from given set of attendees matching based on the attendee id
    * or a sent-by parameter compared to the specified email address
    *
    * @param {calIAttendee[]} aAttendees       An array of calIAttendee objects
    * @param {String} aEmailAddress            A string containing the email address for lookup
    * @return {calIAttendee[]}                 Returns an array of matching attendees
    */
-  getAttendeesBySender: function(aAttendees, aEmailAddress) {
+  getAttendeesBySender(aAttendees, aEmailAddress) {
     let attendees = [];
     // we extract the email address to make it work also for a raw header value
     let compFields = Cc["@mozilla.org/messengercompose/composefields;1"].createInstance(
       Ci.nsIMsgCompFields
     );
     let addresses = compFields.splitRecipients(aEmailAddress, true);
     if (addresses.length == 1) {
       let searchFor = cal.email.prependMailTo(addresses[0]);
@@ -1495,19 +1492,18 @@ function sendMessage(aItem, aMethod, aRe
       sendItem.removeAllAttendees();
       sendItem.addAttendee(recipient);
       // send message
       if (!_sendItem(sendToList, sendItem)) {
         return false;
       }
     }
     return true;
-  } else {
-    return _sendItem(aRecipientsList, aItem);
   }
+  return _sendItem(aRecipientsList, aItem);
 }
 
 /** local to this module file
  * An operation listener that is used on calendar operations which checks and sends further iTIP
  * messages based on the calendar action.
  *
  * @param {Object} aOpListener          operation listener to forward
  * @param {calIItemBase} aOldItem       The previous item before modification (if any)
@@ -1522,26 +1518,26 @@ function ItipOpListener(aOpListener, aOl
 }
 ItipOpListener.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
 
   mOpListener: null,
   mOldItem: null,
   mExtResponse: null,
 
-  onOperationComplete: function(aCalendar, aStatus, aOperationType, aId, aDetail) {
+  onOperationComplete(aCalendar, aStatus, aOperationType, aId, aDetail) {
     cal.ASSERT(Components.isSuccessCode(aStatus), "error on iTIP processing");
     if (Components.isSuccessCode(aStatus)) {
       calitip.checkAndSend(aOperationType, aDetail, this.mOldItem, this.mExtResponse);
     }
     if (this.mOpListener) {
       this.mOpListener.onOperationComplete(aCalendar, aStatus, aOperationType, aId, aDetail);
     }
   },
-  onGetResult: function(calendar, status, itemType, detail, items) {},
+  onGetResult(calendar, status, itemType, detail, items) {},
 };
 
 /** local to this module file
  * Add a parameter SCHEDULE-AGENT=CLIENT to the item before it is
  * created or updated so that the providers knows scheduling will
  * be handled by the client.
  *
  * @param {calIItemBase} item       item about to be added or updated
@@ -1562,30 +1558,30 @@ var ItipItemFinderFactory = {
   /**
    * Create an item finder and track its progress. Be sure to clean up the
    * finder for this id at some point.
    *
    * @param {String} aId              The item id to search for
    * @param {calIIipItem} aItipItem   The iTIP item used for processing
    * @param {Function} aOptionsFunc   The options function used for processing the found item
    */
-  findItem: function(aId, aItipItem, aOptionsFunc) {
+  findItem(aId, aItipItem, aOptionsFunc) {
     this.cleanup(aId);
     let finder = new ItipItemFinder(aId, aItipItem, aOptionsFunc);
     this._findMap[aId] = finder;
     finder.findItem();
   },
 
   /**
    * Clean up tracking for the given id. This needs to be called once for
    * every time findItem is called.
    *
    * @param {String} aId           The item id to clean up for
    */
-  cleanup: function(aId) {
+  cleanup(aId) {
     if (aId in this._findMap) {
       let finder = this._findMap[aId];
       finder.destroy();
       delete this._findMap[aId];
     }
   },
 };
 
@@ -1605,49 +1601,49 @@ function ItipItemFinder(aId, itipItem, o
 ItipItemFinder.prototype = {
   QueryInterface: cal.generateQI([Ci.calIObserver, Ci.calIOperationListener]),
 
   mSearchId: null,
   mItipItem: null,
   mOptionsFunc: null,
   mFoundItems: null,
 
-  findItem: function() {
+  findItem() {
     this.mFoundItems = [];
     this._unobserveChanges();
     this.mItipItem.targetCalendar.getItem(this.mSearchId, this);
   },
 
-  _observeChanges: function(aCalendar) {
+  _observeChanges(aCalendar) {
     this._unobserveChanges();
     this.mObservedCalendar = aCalendar;
 
     if (this.mObservedCalendar) {
       this.mObservedCalendar.addObserver(this);
     }
   },
-  _unobserveChanges: function() {
+  _unobserveChanges() {
     if (this.mObservedCalendar) {
       this.mObservedCalendar.removeObserver(this);
       this.mObservedCalendar = null;
     }
   },
 
-  onStartBatch: function() {},
-  onEndBatch: function() {},
-  onError: function() {},
-  onPropertyChanged: function() {},
-  onPropertyDeleting: function() {},
-  onLoad: function(aCalendar) {
+  onStartBatch() {},
+  onEndBatch() {},
+  onError() {},
+  onPropertyChanged() {},
+  onPropertyDeleting() {},
+  onLoad(aCalendar) {
     // Its possible that the item was updated. We need to re-retrieve the
     // items now.
     this.findItem();
   },
 
-  onModifyItem: function(aNewItem, aOldItem) {
+  onModifyItem(aNewItem, aOldItem) {
     let refItem = aOldItem || aNewItem;
     if (refItem.id == this.mSearchId) {
       // Check existing found items to see if it already exists
       let found = false;
       for (let [idx, item] of Object.entries(this.mFoundItems)) {
         if (item.id == refItem.id && item.calendar.id == refItem.calendar.id) {
           if (aNewItem) {
             this.mFoundItems.splice(idx, 1, aNewItem);
@@ -1662,35 +1658,35 @@ ItipItemFinder.prototype = {
       // If it hasn't been found and there is to add a item, add it to the end
       if (!found && aNewItem) {
         this.mFoundItems.push(aNewItem);
       }
       this.processFoundItems();
     }
   },
 
-  onAddItem: function(aItem) {
+  onAddItem(aItem) {
     // onModifyItem is set up to also handle additions
     this.onModifyItem(aItem, null);
   },
 
-  onDeleteItem: function(aItem) {
+  onDeleteItem(aItem) {
     // onModifyItem is set up to also handle deletions
     this.onModifyItem(null, aItem);
   },
 
-  onOperationComplete: function(aCalendar, aStatus, aOperationType, aId, aDetail) {
+  onOperationComplete(aCalendar, aStatus, aOperationType, aId, aDetail) {
     this.processFoundItems();
   },
 
-  destroy: function() {
+  destroy() {
     this._unobserveChanges();
   },
 
-  processFoundItems: function() {
+  processFoundItems() {
     let rc = Cr.NS_OK;
     const method = this.mItipItem.receivedMethod.toUpperCase();
     let actionMethod = method;
     let operations = [];
 
     if (this.mFoundItems.length > 0) {
       // Save the target calendar on the itip item
       this.mItipItem.targetCalendar = this.mFoundItems[0].calendar;
@@ -2022,14 +2018,14 @@ ItipItemFinder.prototype = {
         }
       };
       actionFunc.method = actionMethod;
     }
 
     this.mOptionsFunc(this.mItipItem, rc, actionFunc, this.mFoundItems);
   },
 
-  onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
+  onGetResult(aCalendar, aStatus, aItemType, aDetail, aItems) {
     if (Components.isSuccessCode(aStatus)) {
       this.mFoundItems = this.mFoundItems.concat(aItems);
     }
   },
 };
--- a/calendar/base/modules/utils/calL10NUtils.jsm
+++ b/calendar/base/modules/utils/calL10NUtils.jsm
@@ -28,19 +28,18 @@ function _getString(aComponent, aBundleN
   try {
     if (!(propName in _getString._bundleCache)) {
       _getString._bundleCache[propName] = Services.strings.createBundle(propName);
     }
     let props = _getString._bundleCache[propName];
 
     if (aParams && aParams.length) {
       return props.formatStringFromName(aStringName, aParams);
-    } else {
-      return props.GetStringFromName(aStringName);
     }
+    return props.GetStringFromName(aStringName);
   } catch (ex) {
     let msg = `Failed to read '${aStringName}' from ${propName}.`;
     Cu.reportError(`${msg} Error: ${ex}`);
     return aStringName;
   }
 }
 _getString._bundleCache = {};
 
@@ -126,45 +125,45 @@ var call10n = {
   /**
    * Gets the month name string in the right form depending on a base string.
    *
    * @param {Number} aMonthNum     The month number to get, 1-based.
    * @param {String} aBundleName   The Bundle to get the string from
    * @param {String} aStringBase   The base string name, .monthFormat will be appended
    * @return {String}              The formatted month name
    */
-  formatMonth: function(aMonthNum, aBundleName, aStringBase) {
+  formatMonth(aMonthNum, aBundleName, aStringBase) {
     let monthForm = call10n.getString(aBundleName, aStringBase + ".monthFormat") || "nominative";
 
     if (monthForm == "nominative") {
       // Fall back to the default name format
       monthForm = "name";
     }
 
     return call10n.getDateFmtString(`month.${aMonthNum}.${monthForm}`);
   },
 
   /**
    * Create a new locale collator
    *
    * @return {nsICollation}       A new locale collator
    */
-  createLocaleCollator: function() {
+  createLocaleCollator() {
     return Cc["@mozilla.org/intl/collation-factory;1"]
       .getService(Ci.nsICollationFactory)
       .CreateCollation();
   },
 
   /**
    * Sort an array of strings in place, according to the current locale.
    *
    * @param {String[]} aStringArray   The strings to sort
    * @return {String[]}               The sorted strings, more specifically aStringArray
    */
-  sortArrayByLocaleCollator: function(aStringArray) {
+  sortArrayByLocaleCollator(aStringArray) {
     let collator = call10n.createLocaleCollator();
     aStringArray.sort((a, b) => collator.compareString(0, a, b));
     return aStringArray;
   },
 
   /**
    * Provides locale dependent parameters for displaying calendar views
    *
--- a/calendar/base/modules/utils/calPrintUtils.jsm
+++ b/calendar/base/modules/utils/calPrintUtils.jsm
@@ -16,17 +16,17 @@ this.EXPORTED_SYMBOLS = ["calprint"]; /*
 var calprint = {
   /**
    * Returns a simple key in the format YYYY-MM-DD for use in the table of
    * dates to day boxes
    *
    * @param dt    The date to translate
    * @return      YYYY-MM-DD
    */
-  getDateKey: function(date) {
+  getDateKey(date) {
     return date.year + "-" + date.month + "-" + date.day;
   },
 
   /**
    * Serializes the given item by setting marked nodes to the item's content.
    * Has some expectations about the DOM document (in CSS-selector-speak), all
    * following nodes MUST exist.
    *
@@ -35,17 +35,17 @@ var calprint = {
    *   - .item-title gets the item title
    *   - .category-color-box gets a 2px solid border in category color
    *   - .calendar-color-box gets background color of the calendar
    *
    * @param document          The DOM Document to set things on
    * @param item              The item to serialize
    * @param dayContainer      The DOM Node to insert the container in
    */
-  addItemToDaybox: function(document, item, boxDate, dayContainer) {
+  addItemToDaybox(document, item, boxDate, dayContainer) {
     // Clone our template
     let itemNode = document.getElementById("item-template").cloneNode(true);
     itemNode.removeAttribute("id");
     itemNode.item = item;
 
     // Fill in details of the item
     let itemInterval = cal.print.getItemIntervalString(item, boxDate);
     itemNode.querySelector(".item-interval").textContent = itemInterval;
@@ -80,17 +80,17 @@ var calprint = {
    * - #task-list-box will have the "hidden" attribute removed.
    * - #task-template will be cloned and filled, and modified:
    *   - .task-checkbox gets the "checked" attribute set, if completed
    *   - .task-title gets the item title.
    *
    * @param document          The DOM Document to set things on
    * @param item              The item to serialize
    */
-  addItemToDayboxNodate: function(document, item) {
+  addItemToDayboxNodate(document, item) {
     let taskContainer = document.getElementById("task-container");
     let taskNode = document.getElementById("task-template").cloneNode(true);
     taskNode.removeAttribute("id");
     taskNode.item = item;
 
     let taskListBox = document.getElementById("tasks-list-box");
     if (taskListBox.hasAttribute("hidden")) {
       let tasksTitle = document.getElementById("tasks-title");
@@ -116,17 +116,17 @@ var calprint = {
   },
 
   /**
    * Get time interval string for the given item. Returns an empty string for all-day items.
    *
    * @param aItem     The item providing the interval
    * @return          The string describing the interval
    */
-  getItemIntervalString: function(aItem, aBoxDate) {
+  getItemIntervalString(aItem, aBoxDate) {
     // omit time label for all-day items
     let startDate = aItem[cal.dtz.startDateProp(aItem)];
     let endDate = aItem[cal.dtz.endDateProp(aItem)];
     if ((startDate && startDate.isDate) || (endDate && endDate.isDate)) {
       return "";
     }
 
     // check for tasks without start and/or due date
@@ -140,24 +140,22 @@ var calprint = {
     endDate = endDate.getInTimezone(defaultTimezone);
     let start = startDate.clone();
     let end = endDate.clone();
     start.isDate = true;
     end.isDate = true;
     if (start.compare(end) == 0) {
       // Events that start and end in the same day.
       return dateFormatter.formatTimeInterval(startDate, endDate);
-    } else {
-      // Events that span two or more days.
-      let compareStart = aBoxDate.compare(start);
-      let compareEnd = aBoxDate.compare(end);
-      if (compareStart == 0) {
-        return "\u21e4 " + dateFormatter.formatTime(startDate); // unicode '⇤'
-      } else if (compareStart > 0 && compareEnd < 0) {
-        return "\u21ff"; // unicode '↔'
-      } else if (compareEnd == 0) {
-        return "\u21e5 " + dateFormatter.formatTime(endDate); // unicode '⇥'
-      } else {
-        return "";
-      }
     }
+    // Events that span two or more days.
+    let compareStart = aBoxDate.compare(start);
+    let compareEnd = aBoxDate.compare(end);
+    if (compareStart == 0) {
+      return "\u21e4 " + dateFormatter.formatTime(startDate); // unicode '⇤'
+    } else if (compareStart > 0 && compareEnd < 0) {
+      return "\u21ff"; // unicode '↔'
+    } else if (compareEnd == 0) {
+      return "\u21e5 " + dateFormatter.formatTime(endDate); // unicode '⇥'
+    }
+    return "";
   },
 };
--- a/calendar/base/modules/utils/calProviderUtils.jsm
+++ b/calendar/base/modules/utils/calProviderUtils.jsm
@@ -28,23 +28,17 @@ var calprovider = {
    *                                                            data. In the latter case the
    *                                                            string will be converted to an
    *                                                            input stream.
    * @param {String} aContentType                             Value for Content-Type header, if any
    * @param {nsIInterfaceRequestor} aNotificationCallbacks    Calendar using channel
    * @param {?nsIChannel} aExisting                           An existing channel to modify (optional)
    * @return {nsIChannel}                                     The prepared channel
    */
-  prepHttpChannel: function(
-    aUri,
-    aUploadData,
-    aContentType,
-    aNotificationCallbacks,
-    aExisting = null
-  ) {
+  prepHttpChannel(aUri, aUploadData, aContentType, aNotificationCallbacks, aExisting = null) {
     let originAttributes = {};
 
     // The current nsIHttpChannel implementation separates connections only
     // by hosts, which causes issues with cookies and password caching for
     // two or more simultaneous connections to the same host and different
     // authenticated users. This can be solved by providing the additional
     // userContextId, which also separates connections (a.k.a. containers).
     // Connections for userA @ server1 and userA @ server2 can exist in the
@@ -106,27 +100,27 @@ var calprovider = {
 
   /**
    * Send prepared HTTP request asynchronously
    *
    * @param {nsIStreamLoader} aStreamLoader       Stream loader for request
    * @param {nsIChannel} aChannel                 Channel for request
    * @param {nsIStreamLoaderObserver} aListener   Listener for method completion
    */
-  sendHttpRequest: function(aStreamLoader, aChannel, aListener) {
+  sendHttpRequest(aStreamLoader, aChannel, aListener) {
     aStreamLoader.init(aListener);
     aChannel.asyncOpen(aStreamLoader);
   },
 
   /**
    * Shortcut to create an nsIStreamLoader
    *
    * @return {nsIStreamLoader}        A fresh streamloader
    */
-  createStreamLoader: function() {
+  createStreamLoader() {
     return Cc["@mozilla.org/network/stream-loader;1"].createInstance(Ci.nsIStreamLoader);
   },
 
   /**
    * getInterface method for providers. This should be called in the context of
    * the respective provider, i.e
    *
    * return cal.provider.InterfaceRequestor_getInterface.apply(this, arguments);
@@ -139,33 +133,32 @@ var calprovider = {
    * NOTE: If the server only provides one realm for all calendars, be sure that
    * the |this| object implements calICalendar. In this case the calendar name
    * will be appended to the realm. If you need that feature disabled, see the
    * capabilities section of calICalendar.idl
    *
    * @param {nsIIDRef} aIID       The interface ID to return
    * @return {nsISupports}        The requested interface
    */
-  InterfaceRequestor_getInterface: function(aIID) {
+  InterfaceRequestor_getInterface(aIID) {
     try {
       // Try to query the this object for the requested interface but don't
       // throw if it fails since that borks the network code.
       return this.QueryInterface(aIID);
     } catch (e) {
       // Support Auth Prompt Interfaces
       if (aIID.equals(Ci.nsIAuthPrompt2)) {
         if (!this.calAuthPrompt) {
           this.calAuthPrompt = new cal.auth.Prompt();
         }
         return this.calAuthPrompt;
       } else if (aIID.equals(Ci.nsIAuthPromptProvider) || aIID.equals(Ci.nsIPrompt)) {
         return Services.ww.getNewPrompter(null);
-      } else {
-        Components.returnCode = e;
       }
+      Components.returnCode = e;
     }
     return null;
   },
 
   // TODO: Add new error handling that uses this code. See bug 1547096.
   /**
    * Bad Certificate Handler for Network Requests. Shows the Network Exception
    * Dialog if a certificate Problem occurs.
@@ -180,17 +173,17 @@ var calprovider = {
       // Unfortunately we can't pass js objects using the window watcher, so
       // we'll just take the first available calendar window. We also need to
       // do this on a timer so that the modal window doesn't block the
       // network request.
       let calWindow = cal.window.getCalendarWindow();
 
       let timerCallback = {
         thisProvider: this.thisProvider,
-        notify: function(timer) {
+        notify(timer) {
           let params = {
             exceptionAdded: false,
             securityInfo: secInfo,
             prefetchCert: true,
             location: targetSite,
           };
           calWindow.openDialog(
             "chrome://pippki/content/exceptionDialog.xhtml",
@@ -236,34 +229,34 @@ var calprovider = {
   },
 
   /**
    * Gets the iTIP/iMIP transport if the passed calendar has configured email.
    *
    * @param {calICalendar} aCalendar      The calendar to get the transport for
    * @return {?calIItipTransport}         The email transport, or null if no identity configured
    */
-  getImipTransport: function(aCalendar) {
+  getImipTransport(aCalendar) {
     // assure an identity is configured for the calendar
     if (aCalendar && aCalendar.getProperty("imip.identity")) {
       return Cc["@mozilla.org/calendar/itip-transport;1?type=email"].getService(
         Ci.calIItipTransport
       );
     }
     return null;
   },
 
   /**
    * Gets the configured identity and account of a particular calendar instance, or null.
    *
    * @param {calICalendar} aCalendar      Calendar instance
    * @param {?Object} outAccount          Optional out value for account
    * @return {nsIMsgIdentity}             The configured identity
    */
-  getEmailIdentityOfCalendar: function(aCalendar, outAccount) {
+  getEmailIdentityOfCalendar(aCalendar, outAccount) {
     cal.ASSERT(aCalendar, "no calendar!", Cr.NS_ERROR_INVALID_ARG);
     let key = aCalendar.getProperty("imip.identity.key");
     if (key === null) {
       // take default account/identity:
       let findIdentity = function(account) {
         if (account && account.identities.length) {
           return account.defaultIdentity || account.identities.queryElementAt(0, Ci.nsIMsgIdentity);
         }
@@ -285,52 +278,51 @@ var calprovider = {
           }
         }
       }
 
       if (outAccount) {
         outAccount.value = foundIdentity ? foundAccount : null;
       }
       return foundIdentity;
-    } else {
-      if (key.length == 0) {
-        // i.e. "None"
-        return null;
-      }
-      let identity = null;
-      cal.email.iterateIdentities((identity_, account) => {
-        if (identity_.key == key) {
-          identity = identity_;
-          if (outAccount) {
-            outAccount.value = account;
-          }
+    }
+    if (key.length == 0) {
+      // i.e. "None"
+      return null;
+    }
+    let identity = null;
+    cal.email.iterateIdentities((identity_, account) => {
+      if (identity_.key == key) {
+        identity = identity_;
+        if (outAccount) {
+          outAccount.value = account;
         }
-        return identity_.key != key;
-      });
+      }
+      return identity_.key != key;
+    });
 
-      if (!identity) {
-        // dangling identity:
-        cal.WARN(
-          "Calendar " +
-            (aCalendar.uri ? aCalendar.uri.spec : aCalendar.id) +
-            " has a dangling E-Mail identity configured."
-        );
-      }
-      return identity;
+    if (!identity) {
+      // dangling identity:
+      cal.WARN(
+        "Calendar " +
+          (aCalendar.uri ? aCalendar.uri.spec : aCalendar.id) +
+          " has a dangling E-Mail identity configured."
+      );
     }
+    return identity;
   },
 
   /**
    * Opens the calendar conflict dialog
    *
    * @param {String} aMode        The conflict mode, either "modify" or "delete"
    * @param {calIItemBase} aItem  The item to raise a conflict for
    * @return {Boolean}            True, if the item should be overwritten
    */
-  promptOverwrite: function(aMode, aItem) {
+  promptOverwrite(aMode, aItem) {
     let window = cal.window.getCalendarWindow();
     let args = {
       item: aItem,
       mode: aMode,
       overwrite: false,
     };
 
     window.openDialog(
@@ -343,17 +335,17 @@ var calprovider = {
     return args.overwrite;
   },
 
   /**
    * Gets the calendar directory, defaults to <profile-dir>/calendar-data
    *
    * @return {nsIFile}        The calendar-data directory as nsIFile
    */
-  getCalendarDirectory: function() {
+  getCalendarDirectory() {
     if (calprovider.getCalendarDirectory.mDir === undefined) {
       let dir = Services.dirsvc.get("ProfD", Ci.nsIFile);
       dir.append("calendar-data");
       if (!dir.exists()) {
         try {
           dir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o700);
         } catch (exc) {
           cal.ASSERT(false, exc);
--- a/calendar/base/modules/utils/calUnifinderUtils.jsm
+++ b/calendar/base/modules/utils/calUnifinderUtils.jsm
@@ -17,17 +17,17 @@ var calunifinder = {
   /**
    * Retrieves the value that is used for comparison for the item with the given
    * property.
    *
    * @param {calIItemBaes} aItem      The item to retrieve the sort key for
    * @param {String} aKey             The property name that should be sorted
    * @return {*}                      The value used in sort comparison
    */
-  getItemSortKey: function(aItem, aKey) {
+  getItemSortKey(aItem, aKey) {
     const taskStatus = ["NEEDS-ACTION", "IN-PROCESS", "COMPLETED", "CANCELLED"];
     const eventStatus = ["TENTATIVE", "CONFIRMED", "CANCELLED"];
 
     switch (aKey) {
       case "priority":
         return aItem.priority || 5;
 
       case "title":
@@ -65,17 +65,17 @@ var calunifinder = {
   },
 
   /**
    * Returns a sort function for the given sort type.
    *
    * @param {String} aSortKey             The sort key to get the compare function for
    * @return {Function}                   The function to be used for sorting values of the type
    */
-  sortEntryComparer: function(aSortKey) {
+  sortEntryComparer(aSortKey) {
     switch (aSortKey) {
       case "title":
       case "categories":
       case "location":
       case "calendar":
         return sortCompare.string;
 
       // All dates use "date_filled"
@@ -98,17 +98,17 @@ var calunifinder = {
   /**
    * Sort the unifinder items by the given sort key, using the modifier to flip direction. The
    * items are sorted in place.
    *
    * @param {calIItemBase[]} aItems           The items to sort
    * @param {String} aSortKey                 The item sort key
    * @param {?Number} aModifier               Either 1 or -1, to indicate sort direction
    */
-  sortItems: function(aItems, aSortKey, aModifier = 1) {
+  sortItems(aItems, aSortKey, aModifier = 1) {
     let comparer = calunifinder.sortEntryComparer(aSortKey);
     aItems.sort((a, b) => {
       let sortvalA = calunifinder.getItemSortKey(a, aSortKey);
       let sortvalB = calunifinder.getItemSortKey(b, aSortKey);
       return comparer(sortvalA, sortvalB, aModifier);
     });
   },
 };
@@ -121,75 +121,74 @@ const sortCompare = (calunifinder.sortEn
   /**
    * Compare two things as if they were numbers.
    *
    * @param {*} a                 The first thing to compare
    * @param {*} b                 The second thing to compare
    * @param {Number} modifier     -1 to flip direction, or 1
    * @return {Number}             Either -1, 0, or 1
    */
-  number: function(a, b, modifier = 1) {
+  number(a, b, modifier = 1) {
     return sortCompare.general(Number(a), Number(b), modifier);
   },
 
   /**
    * Compare two things as if they were dates.
    *
    * @param {*} a                 The first thing to compare
    * @param {*} b                 The second thing to compare
    * @param {Number} modifier     -1 to flip direction, or 1
    * @return {Number}             Either -1, 0, or 1
    */
-  date: function(a, b, modifier = 1) {
+  date(a, b, modifier = 1) {
     return sortCompare.general(a, b, modifier);
   },
 
   /**
    * Compare two things generally, using the typical ((a > b) - (a < b))
    *
    * @param {*} a                 The first thing to compare
    * @param {*} b                 The second thing to compare
    * @param {Number} modifier     -1 to flip direction, or 1
    * @return {Number}             Either -1, 0, or 1
    */
-  general: function(a, b, modifier = 1) {
+  general(a, b, modifier = 1) {
     return ((a > b) - (a < b)) * modifier;
   },
 
   /**
    * Compare two dates, keeping the nativeTime zero date in mind.
    *
    * @param {*} a                 The first date to compare
    * @param {*} b                 The second date to compare
    * @param {Number} modifier     -1 to flip direction, or 1
    * @return {Number}             Either -1, 0, or 1
    */
-  date_filled: function(a, b, modifier = 1) {
+  date_filled(a, b, modifier = 1) {
     const NULL_DATE = -62168601600000000;
 
     if (a == b) {
       return 0;
     } else if (a == NULL_DATE) {
       return 1;
     } else if (b == NULL_DATE) {
       return -1;
-    } else {
-      return sortCompare.general(a, b, modifier);
     }
+    return sortCompare.general(a, b, modifier);
   },
 
   /**
    * Compare two strings, sorting empty values to the end by default
    *
    * @param {*} a                 The first string to compare
    * @param {*} b                 The second string to compare
    * @param {Number} modifier     -1 to flip direction, or 1
    * @return {Number}             Either -1, 0, or 1
    */
-  string: function(a, b, modifier = 1) {
+  string(a, b, modifier = 1) {
     if (a.length == 0 || b.length == 0) {
       // sort empty values to end (so when users first sort by a
       // column, they can see and find the desired values in that
       // column without scrolling past all the empty values).
       return -(a.length - b.length) * modifier;
     }
 
     return a.localeCompare(b, undefined, { numeric: true }) * modifier;
@@ -198,12 +197,12 @@ const sortCompare = (calunifinder.sortEn
   /**
    * Catch-all function to compare two unknown values. Will return 0.
    *
    * @param {*} a                 The first thing to compare
    * @param {*} b                 The second thing to compare
    * @param {Number} modifier     Provided for consistency, but unused
    * @return {Number}             Will always return 0
    */
-  unknown: function(a, b, modifier = 1) {
+  unknown(a, b, modifier = 1) {
     return 0;
   },
 });
--- a/calendar/base/modules/utils/calViewUtils.jsm
+++ b/calendar/base/modules/utils/calViewUtils.jsm
@@ -19,17 +19,17 @@ var calview = {
   /**
    * Checks if the mousepointer of an event resides over a XULBox during an event
    *
    * @param aMouseEvent   The event eg. a 'mouseout' or 'mousedown' event
    * @param aXULBox       The xul element
    * @return              true or false depending on whether the mouse pointer
    *                      resides over the xulelement
    */
-  isMouseOverBox: function(aMouseEvent, aXULElement) {
+  isMouseOverBox(aMouseEvent, aXULElement) {
     let boundingRect = aXULElement.getBoundingClientRect();
     let boxWidth = boundingRect.width;
     let boxHeight = boundingRect.height;
     let boxScreenX = aXULElement.screenX;
     let boxScreenY = aXULElement.screenY;
     let mouseX = aMouseEvent.screenX;
     let mouseY = aMouseEvent.screenY;
     let xIsWithin = mouseX >= boxScreenX && mouseX <= boxScreenX + boxWidth;
@@ -40,17 +40,17 @@ var calview = {
   /**
    * Removes those childnodes from a node that contain a specified attribute
    * and where the value of this attribute matches a passed value
    *
    * @param aParentNode   The parent node that contains the child nodes in question
    * @param aAttribute    The name of the attribute
    * @param aAttribute    The value of the attribute
    */
-  removeChildElementsByAttribute: function(aParentNode, aAttribute, aValue) {
+  removeChildElementsByAttribute(aParentNode, aAttribute, aValue) {
     let childNode = aParentNode.lastElementChild;
     while (childNode) {
       let prevChildNode = childNode.previousElementSibling;
       if (!aAttribute || aAttribute === undefined) {
         childNode.remove();
       } else if (!aValue || aValue === undefined) {
         childNode.remove();
       } else if (
@@ -71,17 +71,17 @@ var calview = {
    * @param aChildNode  The childnode.
    * @param aLocalName  The localName of the to-be-returned parent
    *                      that is looked for.
    * @return            The parent with the given localName or the
    *                      given childNode 'aChildNode'. If no appropriate
    *                      parent node with aLocalName could be
    *                      retrieved it is returned 'null'.
    */
-  getParentNodeOrThis: function(aChildNode, aLocalName) {
+  getParentNodeOrThis(aChildNode, aLocalName) {
     let node = aChildNode;
     while (node && node.localName != aLocalName) {
       node = node.parentNode;
       if (node.tagName == undefined) {
         return null;
       }
     }
     return node;
@@ -94,17 +94,17 @@ var calview = {
    * @param aChildNode      The childnode.
    * @param aAttibuteName   The name of the attribute that is to be compared with
    * @param aAttibuteValue  The value of the attribute that is to be compared with
    * @return                The parent with the given attributeName set that has
    *                          the same value as the given given attributevalue
    *                          'aAttributeValue'. If no appropriate
    *                          parent node can be retrieved it is returned 'null'.
    */
-  getParentNodeOrThisByAttribute: function(aChildNode, aAttributeName, aAttributeValue) {
+  getParentNodeOrThisByAttribute(aChildNode, aAttributeName, aAttributeValue) {
     let node = aChildNode;
     while (node && node.getAttribute(aAttributeName) != aAttributeValue) {
       node = node.parentNode;
       if (node.tagName == undefined) {
         return null;
       }
     }
     return node;
@@ -128,17 +128,17 @@ var calview = {
    *              no punctuation, and of course no spaces.
    *   nmchar            [_a-zA-Z0-9-]|{nonascii}|{escape}
    *   name              {nmchar}+
    *   http://www.w3.org/TR/CSS21/grammar.html#scanner
    *
    * @param aString       The unicode string to format
    * @return              The formatted string using only chars [_a-zA-Z0-9-]
    */
-  formatStringForCSSRule: function(aString) {
+  formatStringForCSSRule(aString) {
     function toReplacement(char) {
       // char code is natural number (positive integer)
       let nat = char.charCodeAt(0);
       switch (nat) {
         case 0x20: // space
           return "_";
         default:
           return "-ux" + nat.toString(16) + "-"; // lowercase
@@ -148,17 +148,17 @@ var calview = {
     return aString.toLowerCase().replace(/[^a-zA-Z0-9]/g, toReplacement);
   },
 
   /**
    * Gets the cached instance of the composite calendar.
    *
    * @param aWindow       The window to get the composite calendar for.
    */
-  getCompositeCalendar: function(aWindow) {
+  getCompositeCalendar(aWindow) {
     if (typeof aWindow._compositeCalendar == "undefined") {
       let comp = (aWindow._compositeCalendar = Cc[
         "@mozilla.org/calendar/calendar;1?type=composite"
       ].createInstance(Ci.calICompositeCalendar));
       comp.prefPrefix = "calendar-main";
 
       if (typeof aWindow.gCalendarStatusFeedback != "undefined") {
         // If we are in a window that has calendar status feedback, set
@@ -171,17 +171,17 @@ var calview = {
 
   /**
    * Hash the given string into a color from the color palette of the standard
    * color picker.
    *
    * @param str           The string to hash into a color.
    * @return              The hashed color.
    */
-  hashColor: function(str) {
+  hashColor(str) {
     // This is the palette of colors in the current colorpicker implementation.
     // Unfortunately, there is no easy way to extract these colors from the
     // binding directly.
     const colorPalette = [
       "#FFFFFF",
       "#FFCCCC",
       "#FFCC99",
       "#FFFF99",
@@ -258,17 +258,17 @@ var calview = {
   },
 
   /**
    * Pick whichever of "black" or "white" will look better when used as a text
    * color against a background of bgColor.
    *
    * @param bgColor   the background color as a "#RRGGBB" string
    */
-  getContrastingTextColor: function(bgColor) {
+  getContrastingTextColor(bgColor) {
     let calcColor = bgColor.replace(/#/g, "");
     let red = parseInt(calcColor.substring(0, 2), 16);
     let green = parseInt(calcColor.substring(2, 4), 16);
     let blue = parseInt(calcColor.substring(4, 6), 16);
 
     // Calculate the brightness (Y) value using the YUV color system.
     let brightness = 0.299 * red + 0.587 * green + 0.114 * blue;
 
@@ -283,17 +283,17 @@ var calview = {
 
   /**
    * Item comparator for inserting items into dayboxes.
    *
    * @param a     The first item
    * @param b     The second item
    * @return      The usual -1, 0, 1
    */
-  compareItems: function(a, b) {
+  compareItems(a, b) {
     if (!a) {
       return -1;
     }
     if (!b) {
       return 1;
     }
 
     let aIsEvent = cal.item.isEvent(a);
--- a/calendar/base/modules/utils/calWindowUtils.jsm
+++ b/calendar/base/modules/utils/calWindowUtils.jsm
@@ -16,17 +16,17 @@ this.EXPORTED_SYMBOLS = ["calwindow"]; /
 
 var calwindow = {
   /**
    * Opens the Create Calendar wizard
    *
    * @param aWindow    the window to open the dialog on, or null for the main calendar window
    * @param aCallback  a function to be performed after calendar creation
    */
-  openCalendarWizard: function(aWindow, aCallback) {
+  openCalendarWizard(aWindow, aCallback) {
     let window = aWindow || calwindow.getCalendarWindow();
     window.openDialog(
       "chrome://calendar/content/calendarCreation.xhtml",
       "caEditServer",
       // Workaround for Bug 1151440 - the HTML color picker won't work
       // in linux when opened from modal dialog
       AppConstants.platform == "linux"
         ? "chrome,titlebar,resizable"
@@ -36,42 +36,42 @@ var calwindow = {
   },
 
   /**
    * Opens the calendar properties window for aCalendar
    *
    * @param aWindow    the window to open the dialog on, or null for the main calendar window
    * @param aCalendar  the calendar whose properties should be displayed
    */
-  openCalendarProperties: function(aWindow, aCalendar) {
+  openCalendarProperties(aWindow, aCalendar) {
     let window = aWindow || calwindow.getCalendarWindow();
     window.openDialog(
       "chrome://calendar/content/calendar-properties-dialog.xhtml",
       "CalendarPropertiesDialog",
       "modal,chrome,titlebar,resizable",
       { calendar: aCalendar }
     );
   },
 
   /**
    * Opens the print dialog
    *
    * @param aWindow    the window to open the dialog on, or null for the main calendar window
    */
-  openPrintDialog: function(aWindow = null) {
+  openPrintDialog(aWindow = null) {
     let window = aWindow || calwindow.getCalendarWindow();
     window.openDialog(
       "chrome://calendar/content/calendar-print-dialog.xhtml",
       "Print",
       "centerscreen,chrome,resizable"
     );
   },
 
   /**
    * Returns the most recent calendar window in an application independent way
    */
-  getCalendarWindow: function() {
+  getCalendarWindow() {
     return (
       Services.wm.getMostRecentWindow("calendarMainWindow") ||
       Services.wm.getMostRecentWindow("mail:3pane")
     );
   },
 };
--- a/calendar/base/modules/utils/calXMLUtils.jsm
+++ b/calendar/base/modules/utils/calXMLUtils.jsm
@@ -21,17 +21,17 @@ var calxml = {
    * - an array of strings or DOM elements
    *
    * @param aNode     The context node to search from
    * @param aExpr     The XPath expression to search for
    * @param aResolver (optional) The namespace resolver to use for the expression
    * @param aType     (optional) Force a result type, must be an XPathResult constant
    * @return          The result, see above for details.
    */
-  evalXPath: function(aNode, aExpr, aResolver, aType) {
+  evalXPath(aNode, aExpr, aResolver, aType) {
     const XPR = {
       // XPathResultType
       ANY_TYPE: 0,
       NUMBER_TYPE: 1,
       STRING_TYPE: 2,
       BOOLEAN_TYPE: 3,
       UNORDERED_NODE_ITERATOR_TYPE: 4,
       ORDERED_NODE_ITERATOR_TYPE: 5,
@@ -108,72 +108,71 @@ var calxml = {
    * - A string, number, boolean or DOM Element value
    *
    * @param aNode     The context node to search from
    * @param aExpr     The XPath expression to search for
    * @param aResolver (optional) The namespace resolver to use for the expression
    * @param aType     (optional) Force a result type, must be an XPathResult constant
    * @return          The result, see above for details.
    */
-  evalXPathFirst: function(aNode, aExpr, aResolver, aType) {
+  evalXPathFirst(aNode, aExpr, aResolver, aType) {
     let result = calxml.evalXPath(aNode, aExpr, aResolver, aType);
 
     if (Array.isArray(result)) {
       return result[0];
-    } else {
-      return result;
     }
+    return result;
   },
 
   /**
    * Parse the given string into a DOM tree
    *
    * @param str       The string to parse
    * @return          The parsed DOM Document
    */
-  parseString: function(str) {
+  parseString(str) {
     let parser = new DOMParser();
     parser.forceEnableXULXBL();
     return parser.parseFromString(str, "application/xml");
   },
 
   /**
    * Read an XML file synchronously. This method should be avoided, consider
    * rewriting the caller to be asynchronous.
    *
    * @param uri       The URI to read.
    * @return          The DOM Document resulting from the file.
    */
-  parseFile: function(uri) {
+  parseFile(uri) {
     let req = new XMLHttpRequest();
     req.open("GET", uri, false);
     req.overrideMimeType("text/xml");
     req.send(null);
     return req.responseXML;
   },
 
   /**
    * Serialize the DOM tree into a string.
    *
    * @param doc       The DOM document to serialize
    * @return          The DOM document as a string.
    */
-  serializeDOM: function(doc) {
+  serializeDOM(doc) {
     let serializer = new XMLSerializer();
     return serializer.serializeToString(doc);
   },
 
   /**
    * Escape a string for use in XML
    *
    * @param str           The string to escape
    * @param isAttribute   If true, " and ' are also escaped
    * @return              The escaped string
    */
-  escapeString: function(str, isAttribute) {
+  escapeString(str, isAttribute) {
     return str.replace(/[&<>'"]/g, chr => {
       switch (chr) {
         case "&":
           return "&amp;";
         case "<":
           return "&lt;";
         case ">":
           return "&gt;";
--- a/calendar/base/src/calAlarm.js
+++ b/calendar/base/src/calAlarm.js
@@ -35,27 +35,27 @@ calAlarm.prototype = {
   mImmutable: false,
   mRelated: 0,
   mRepeat: 0,
 
   /**
    * calIAlarm
    */
 
-  ensureMutable: function() {
+  ensureMutable() {
     if (this.mImmutable) {
       throw Cr.NS_ERROR_OBJECT_IS_IMMUTABLE;
     }
   },
 
   get isMutable() {
     return !this.mImmutable;
   },
 
-  makeImmutable: function() {
+  makeImmutable() {
     if (this.mImmutable) {
       return;
     }
 
     const objectMembers = ["mAbsoluteDate", "mOffset", "mDuration", "mLastAck"];
     for (let member of objectMembers) {
       if (this[member] && this[member].isMutable) {
         this[member].makeImmutable();
@@ -67,17 +67,17 @@ calAlarm.prototype = {
       if (propval instanceof Ci.calIDateTime && propval.isMutable) {
         propval.makeImmutable();
       }
     }
 
     this.mImmutable = true;
   },
 
-  clone: function() {
+  clone() {
     let cloned = new calAlarm();
 
     cloned.mImmutable = false;
 
     const simpleMembers = ["mAction", "mSummary", "mDescription", "mRelated", "mRepeat"];
 
     const arrayMembers = ["mAttendees", "mAttachments"];
 
@@ -246,91 +246,91 @@ calAlarm.prototype = {
     let alarmDate = this.mAbsoluteDate.clone();
 
     // All Day events are handled as 00:00:00
     alarmDate.isDate = false;
     alarmDate.addDuration(this.mDuration);
     return alarmDate;
   },
 
-  getAttendees: function() {
+  getAttendees() {
     let attendees;
     if (this.action == "AUDIO" || this.action == "DISPLAY") {
       attendees = [];
     } else {
       attendees = this.mAttendees.concat([]);
     }
     return attendees;
   },
 
-  addAttendee: function(aAttendee) {
+  addAttendee(aAttendee) {
     // Make sure its not duplicate
     this.deleteAttendee(aAttendee);
 
     // Now check if its valid
     if (this.action == "AUDIO" || this.action == "DISPLAY") {
       throw new Error("Alarm type AUDIO/DISPLAY may not have attendees");
     }
 
     // And add it (again)
     this.mAttendees.push(aAttendee);
   },
 
-  deleteAttendee: function(aAttendee) {
+  deleteAttendee(aAttendee) {
     let deleteId = aAttendee.id;
     for (let i = 0; i < this.mAttendees.length; i++) {
       if (this.mAttendees[i].id == deleteId) {
         this.mAttendees.splice(i, 1);
         break;
       }
     }
   },
 
-  clearAttendees: function() {
+  clearAttendees() {
     this.mAttendees = [];
   },
 
-  getAttachments: function() {
+  getAttachments() {
     let attachments;
     if (this.action == "AUDIO") {
       attachments = this.mAttachments.length ? [this.mAttachments[0]] : [];
     } else if (this.action == "DISPLAY") {
       attachments = [];
     } else {
       attachments = this.mAttachments.concat([]);
     }
     return attachments;
   },
 
-  addAttachment: function(aAttachment) {
+  addAttachment(aAttachment) {
     // Make sure its not duplicate
     this.deleteAttachment(aAttachment);
 
     // Now check if its valid
     if (this.action == "AUDIO" && this.mAttachments.length) {
       throw new Error("Alarm type AUDIO may only have one attachment");
     } else if (this.action == "DISPLAY") {
       throw new Error("Alarm type DISPLAY may not have attachments");
     }
 
     // And add it (again)
     this.mAttachments.push(aAttachment);
   },
 
-  deleteAttachment: function(aAttachment) {
+  deleteAttachment(aAttachment) {
     let deleteHash = aAttachment.hashId;
     for (let i = 0; i < this.mAttachments.length; i++) {
       if (this.mAttachments[i].hashId == deleteHash) {
         this.mAttachments.splice(i, 1);
         break;
       }
     }
   },
 
-  clearAttachments: function() {
+  clearAttachments() {
     this.mAttachments = [];
   },
 
   get icalString() {
     let comp = this.icalComponent;
     return comp ? comp.serializeToICS() : "";
   },
   set icalString(val) {
@@ -548,72 +548,69 @@ calAlarm.prototype = {
           }
           this.mPropertyParams[prop.propertyName][paramName] = param;
         }
       }
     }
     return aComp;
   },
 
-  hasProperty: function(aName) {
+  hasProperty(aName) {
     return this.getProperty(aName.toUpperCase()) != null;
   },
 
-  getProperty: function(aName) {
+  getProperty(aName) {
     let name = aName.toUpperCase();
     if (name in this.promotedProps) {
       if (this.promotedProps[name] === true) {
         // Complex promoted props will return undefined
         return undefined;
-      } else {
-        return this[this.promotedProps[name]];
       }
-    } else {
-      return this.mProperties.get(name);
+      return this[this.promotedProps[name]];
     }
+    return this.mProperties.get(name);
   },
 
-  setProperty: function(aName, aValue) {
+  setProperty(aName, aValue) {
     this.ensureMutable();
     let name = aName.toUpperCase();
     if (name in this.promotedProps) {
       if (this.promotedProps[name] === true) {
         cal.WARN(`Attempted to set complex property ${name} to a simple value ${aValue}`);
       } else {
         this[this.promotedProps[name]] = aValue;
       }
     } else {
       this.mProperties.set(name, aValue);
     }
     return aValue;
   },
 
-  deleteProperty: function(aName) {
+  deleteProperty(aName) {
     this.ensureMutable();
     let name = aName.toUpperCase();
     if (name in this.promotedProps) {
       this[this.promotedProps[name]] = null;
     } else {
       this.mProperties.delete(name);
     }
   },
 
   get properties() {
     return this.mProperties.entries();
   },
 
-  toString: function(aItem) {
+  toString(aItem) {
     function alarmString(aPrefix) {
       if (!aItem || cal.item.isEvent(aItem)) {
         return aPrefix + "Event";
       } else if (cal.item.isToDo(aItem)) {
         return aPrefix + "Task";
-      } else {
-        return aPrefix;
       }
+      return aPrefix;
     }
 
     if (this.related == ALARM_RELATED_ABSOLUTE && this.mAbsoluteDate) {
       // this is an absolute alarm. Use the calendar default timezone and
       // format it.
       let formatter = cal.getDateFormatter();
       let formatDate = this.mAbsoluteDate.getInTimezone(cal.dtz.defaultTimezone);
       return formatter.formatDateTime(formatDate);
@@ -661,15 +658,14 @@ calAlarm.prototype = {
         originStringName += "After";
       }
 
       let originString = cal.l10n.getString("calendar-alarms", alarmString(originStringName));
       return cal.l10n.getString("calendar-alarms", "reminderCustomTitle", [
         unitString,
         originString,
       ]);
-    } else {
-      // This is an incomplete alarm, but then again we should never reach
-      // this state.
-      return "[Incomplete calIAlarm]";
     }
+    // This is an incomplete alarm, but then again we should never reach
+    // this state.
+    return "[Incomplete calIAlarm]";
   },
 };
--- a/calendar/base/src/calAlarmMonitor.js
+++ b/calendar/base/src/calAlarmMonitor.js
@@ -45,32 +45,32 @@ calAlarmMonitor.prototype = {
     classID: calAlarmMonitorClassID,
     interfaces: calAlarmMonitorInterfaces,
     flags: Ci.nsIClassInfo.SINGLETON,
   }),
 
   /**
    * nsIObserver
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     let alarmService = Cc["@mozilla.org/calendar/alarm-service;1"].getService(Ci.calIAlarmService);
     switch (aTopic) {
       case "alarm-service-startup":
         alarmService.addObserver(this);
         break;
       case "alarm-service-shutdown":
         alarmService.removeObserver(this);
         break;
     }
   },
 
   /**
    * calIAlarmServiceObserver
    */
-  onAlarm: function(aItem, aAlarm) {
+  onAlarm(aItem, aAlarm) {
     if (aAlarm.action != "DISPLAY") {
       // This monitor only looks for DISPLAY alarms.
       return;
     }
 
     this.mAlarms.push([aItem, aAlarm]);
 
     if (Services.prefs.getBoolPref("calendar.alarms.playsound", true)) {
@@ -127,55 +127,55 @@ calAlarmMonitor.prototype = {
         this
       );
     }
     if (!this.mWindowOpening) {
       calAlarmWindow.addWidgetFor(aItem, aAlarm);
     }
   },
 
-  window_onLoad: function() {
+  window_onLoad() {
     let calAlarmWindow = this.mWindowOpening;
     this.mWindowOpening = null;
     if (this.mAlarms.length > 0) {
       for (let [item, alarm] of this.mAlarms) {
         calAlarmWindow.addWidgetFor(item, alarm);
       }
     } else {
       // Uh oh, it seems the alarms were removed even before the window
       // finished loading. Looks like we can close it again
       calAlarmWindow.closeIfEmpty();
     }
   },
 
-  onRemoveAlarmsByItem: function(aItem) {
+  onRemoveAlarmsByItem(aItem) {
     let calAlarmWindow = peekAlarmWindow();
     this.mAlarms = this.mAlarms.filter(([thisItem, alarm]) => {
       let ret = aItem.hashId != thisItem.hashId;
       if (!ret && calAlarmWindow) {
         // window is open
         calAlarmWindow.removeWidgetFor(thisItem, alarm);
       }
       return ret;
     });
   },
 
-  onRemoveAlarmsByCalendar: function(calendar) {
+  onRemoveAlarmsByCalendar(calendar) {
     let calAlarmWindow = peekAlarmWindow();
     this.mAlarms = this.mAlarms.filter(([thisItem, alarm]) => {
       let ret = calendar.id != thisItem.calendar.id;
 
       if (!ret && calAlarmWindow) {
         // window is open
         calAlarmWindow.removeWidgetFor(thisItem, alarm);
       }
       return ret;
     });
   },
 
-  onAlarmsLoaded: function(aCalendar) {
+  onAlarmsLoaded(aCalendar) {
     // the alarm dialog won't close while alarms are loading, check again now
     let calAlarmWindow = peekAlarmWindow();
     if (calAlarmWindow && this.mAlarms.length == 0) {
       calAlarmWindow.closeIfEmpty();
     }
   },
 };
--- a/calendar/base/src/calAlarmService.js
+++ b/calendar/base/src/calAlarmService.js
@@ -30,72 +30,72 @@ function calAlarmService() {
   this.mTimerMap = {};
   this.mObservers = new cal.data.ListenerSet(Ci.calIAlarmServiceObserver);
 
   this.calendarObserver = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIObserver]),
     alarmService: this,
 
     // calIObserver:
-    onStartBatch: function() {},
-    onEndBatch: function() {},
-    onLoad: function(calendar) {
+    onStartBatch() {},
+    onEndBatch() {},
+    onLoad(calendar) {
       // ignore any onLoad events until initial getItems() call of startup has finished:
       if (calendar && this.alarmService.mLoadedCalendars[calendar.id]) {
         // a refreshed calendar signals that it has been reloaded
         // (and cannot notify detailed changes), thus reget all alarms of it:
         this.alarmService.initAlarms([calendar]);
       }
     },
 
-    onAddItem: function(aItem) {
+    onAddItem(aItem) {
       this.alarmService.addAlarmsForOccurrences(aItem);
     },
-    onModifyItem: function(aNewItem, aOldItem) {
+    onModifyItem(aNewItem, aOldItem) {
       if (!aNewItem.recurrenceId) {
         // deleting an occurrence currently calls modifyItem(newParent, *oldOccurrence*)
         aOldItem = aOldItem.parentItem;
       }
 
       this.onDeleteItem(aOldItem);
       this.onAddItem(aNewItem);
     },
-    onDeleteItem: function(aDeletedItem) {
+    onDeleteItem(aDeletedItem) {
       this.alarmService.removeAlarmsForOccurrences(aDeletedItem);
     },
-    onError: function(aCalendar, aErrNo, aMessage) {},
-    onPropertyChanged: function(aCalendar, aName, aValue, aOldValue) {
+    onError(aCalendar, aErrNo, aMessage) {},
+    onPropertyChanged(aCalendar, aName, aValue, aOldValue) {
       switch (aName) {
         case "suppressAlarms":
         case "disabled":
           this.alarmService.initAlarms([aCalendar]);
           break;
       }
     },
-    onPropertyDeleting: function(aCalendar, aName) {
+    onPropertyDeleting(aCalendar, aName) {
       this.onPropertyChanged(aCalendar, aName);
     },
   };
 
   this.calendarManagerObserver = {
     QueryInterface: ChromeUtils.generateQI([Ci.calICalendarManagerObserver]),
     alarmService: this,
 
-    onCalendarRegistered: function(aCalendar) {
+    onCalendarRegistered(aCalendar) {
       this.alarmService.observeCalendar(aCalendar);
       // initial refresh of alarms for new calendar:
       this.alarmService.initAlarms([aCalendar]);
     },
-    onCalendarUnregistering: function(aCalendar) {
+    onCalendarUnregistering(aCalendar) {
       // XXX todo: we need to think about calendar unregistration;
       // there may still be dangling items (-> alarm dialog),
       // dismissing those alarms may write data...
       this.alarmService.unobserveCalendar(aCalendar);
     },
-    onCalendarDeleting: function(aCalendar) {
+    onCalendarDeleting(aCalendar) {
       this.alarmService.unobserveCalendar(aCalendar);
       delete this.alarmService.mLoadedCalendars[aCalendar.id];
     },
   };
 }
 
 var calAlarmServiceClassID = Components.ID("{7a9200dd-6a64-4fff-a798-c5802186e2cc}");
 var calAlarmServiceInterfaces = [Ci.calIAlarmService, Ci.nsIObserver];
@@ -116,17 +116,17 @@ calAlarmService.prototype = {
     classDescription: "Calendar Alarm Service",
     interfaces: calAlarmServiceInterfaces,
     flags: Ci.nsIClassInfo.SINGLETON,
   }),
 
   /**
    * nsIObserver
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     // This will also be called on app-startup, but nothing is done yet, to
     // prevent unwanted dialogs etc. See bug 325476 and 413296
     if (aTopic == "profile-after-change" || aTopic == "wake_notification") {
       this.shutdown();
       this.startup();
     }
     if (aTopic == "xpcom-shutdown") {
       this.shutdown();
@@ -141,17 +141,17 @@ calAlarmService.prototype = {
     // different than the default timezone?
     return this.mTimezone || cal.dtz.defaultTimezone;
   },
 
   set timezone(aTimezone) {
     return (this.mTimezone = aTimezone);
   },
 
-  snoozeAlarm: function(aItem, aAlarm, aDuration) {
+  snoozeAlarm(aItem, aAlarm, aDuration) {
     // Right now we only support snoozing all alarms for the given item for
     // aDuration.
 
     // Make sure we're working with the parent, otherwise we'll accidentally
     // create an exception
     let newEvent = aItem.parentItem.clone();
     let alarmTime = nowUTC();
 
@@ -173,17 +173,17 @@ calAlarmService.prototype = {
         alarmTime.icalString
       );
     }
     // calling modifyItem will cause us to get the right callback
     // and update the alarm properly
     return newEvent.calendar.modifyItem(newEvent, aItem.parentItem, null);
   },
 
-  dismissAlarm: function(aItem, aAlarm) {
+  dismissAlarm(aItem, aAlarm) {
     let rv;
     if (cal.acl.isCalendarWritable(aItem.calendar) && cal.acl.userCanModifyItem(aItem)) {
       let now = nowUTC();
       // We want the parent item, otherwise we're going to accidentally
       // create an exception.  We've relnoted (for 0.1) the slightly odd
       // behavior this can cause if you move an event after dismissing an
       // alarm
       let oldParent = aItem.parentItem;
@@ -202,25 +202,25 @@ calAlarmService.prototype = {
       // effectively dismissing from a user's pov, since the alarm neither
       // popups again in the current user session nor will be added after
       // next restart, since it is missed then already
       this.removeAlarmsForItem(aItem);
     }
     return rv;
   },
 
-  addObserver: function(aObserver) {
+  addObserver(aObserver) {
     this.mObservers.add(aObserver);
   },
 
-  removeObserver: function(aObserver) {
+  removeObserver(aObserver) {
     this.mObservers.delete(aObserver);
   },
 
-  startup: function() {
+  startup() {
     if (this.mStarted) {
       return;
     }
 
     Services.obs.addObserver(this, "profile-after-change");
     Services.obs.addObserver(this, "xpcom-shutdown");
     Services.obs.addObserver(this, "wake_notification");
 
@@ -233,17 +233,17 @@ calAlarmService.prototype = {
 
     for (let calendar of cal.getCalendarManager().getCalendars()) {
       this.observeCalendar(calendar);
     }
 
     /* set up a timer to update alarms every N hours */
     let timerCallback = {
       alarmService: this,
-      notify: function() {
+      notify() {
         let now = nowUTC();
         let start;
         if (this.alarmService.mRangeEnd) {
           // This is a subsequent search, so we got all the past alarms before
           start = this.alarmService.mRangeEnd.clone();
         } else {
           // This is our first search for alarms.  We're going to look for
           // alarms +/- 1 month from now.  If someone sets an alarm more than
@@ -266,17 +266,17 @@ calAlarmService.prototype = {
     };
     timerCallback.notify();
 
     this.mUpdateTimer = newTimerWithCallback(timerCallback, kHoursBetweenUpdates * 3600000, true);
 
     this.mStarted = true;
   },
 
-  shutdown: function() {
+  shutdown() {
     if (!this.mStarted) {
       return;
     }
 
     // Tell people that we're no longer running.
     Services.obs.notifyObservers(null, "alarm-service-shutdown");
 
     if (this.mUpdateTimer) {
@@ -296,27 +296,27 @@ calAlarmService.prototype = {
 
     Services.obs.removeObserver(this, "profile-after-change");
     Services.obs.removeObserver(this, "xpcom-shutdown");
     Services.obs.removeObserver(this, "wake_notification");
 
     this.mStarted = false;
   },
 
-  observeCalendar: function(calendar) {
+  observeCalendar(calendar) {
     calendar.addObserver(this.calendarObserver);
   },
 
-  unobserveCalendar: function(calendar) {
+  unobserveCalendar(calendar) {
     calendar.removeObserver(this.calendarObserver);
     this.disposeCalendarTimers([calendar]);
     this.mObservers.notify("onRemoveAlarmsByCalendar", [calendar]);
   },
 
-  addAlarmsForItem: function(aItem) {
+  addAlarmsForItem(aItem) {
     if (cal.item.isToDo(aItem) && aItem.isCompleted) {
       // If this is a task and it is completed, don't add the alarm.
       return;
     }
 
     let showMissed = Services.prefs.getBoolPref("calendar.alarms.showmissed", true);
 
     let alarms = aItem.getAlarms();
@@ -392,69 +392,68 @@ calAlarmService.prototype = {
         } else {
           // The alarm was not snoozed or dismissed, fire it now.
           this.alarmFired(aItem, alarm);
         }
       }
     }
   },
 
-  removeAlarmsForItem: function(aItem) {
+  removeAlarmsForItem(aItem) {
     // make sure already fired alarms are purged out of the alarm window:
     this.mObservers.notify("onRemoveAlarmsByItem", [aItem]);
     // Purge alarms specifically for this item (i.e exception)
     for (let alarm of aItem.getAlarms()) {
       this.removeTimer(aItem, alarm);
     }
   },
 
-  getOccurrencesInRange: function(aItem) {
+  getOccurrencesInRange(aItem) {
     // We search 1 month in each direction for alarms.  Therefore,
     // we need occurrences between initial start date and 1 month from now
     let until = nowUTC();
     until.month += 1;
 
     if (aItem && aItem.recurrenceInfo) {
       return aItem.recurrenceInfo.getOccurrences(this.mRangeStart, until, 0);
-    } else {
-      return cal.item.checkIfInRange(aItem, this.mRangeStart, until) ? [aItem] : [];
     }
+    return cal.item.checkIfInRange(aItem, this.mRangeStart, until) ? [aItem] : [];
   },
 
-  addAlarmsForOccurrences: function(aParentItem) {
+  addAlarmsForOccurrences(aParentItem) {
     let occs = this.getOccurrencesInRange(aParentItem);
 
     // Add an alarm for each occurrence
     occs.forEach(this.addAlarmsForItem, this);
   },
 
-  removeAlarmsForOccurrences: function(aParentItem) {
+  removeAlarmsForOccurrences(aParentItem) {
     let occs = this.getOccurrencesInRange(aParentItem);
 
     // Remove alarm for each occurrence
     occs.forEach(this.removeAlarmsForItem, this);
   },
 
-  addTimer: function(aItem, aAlarm, aTimeout) {
+  addTimer(aItem, aAlarm, aTimeout) {
     this.mTimerMap[aItem.calendar.id] = this.mTimerMap[aItem.calendar.id] || {};
     this.mTimerMap[aItem.calendar.id][aItem.hashId] =
       this.mTimerMap[aItem.calendar.id][aItem.hashId] || {};
 
     let self = this;
     let alarmTimerCallback = {
-      notify: function() {
+      notify() {
         self.alarmFired(aItem, aAlarm);
       },
     };
 
     let timer = newTimerWithCallback(alarmTimerCallback, aTimeout, false);
     this.mTimerMap[aItem.calendar.id][aItem.hashId][aAlarm.icalString] = timer;
   },
 
-  removeTimer: function(aItem, aAlarm) {
+  removeTimer(aItem, aAlarm) {
     /* Is the calendar in the timer map */
     if (
       aItem.calendar.id in this.mTimerMap &&
       /* ...and is the item in the calendar map */
       aItem.hashId in this.mTimerMap[aItem.calendar.id] &&
       /* ...and is the alarm in the item map ? */
       aAlarm.icalString in this.mTimerMap[aItem.calendar.id][aItem.hashId]
     ) {
@@ -472,39 +471,39 @@ calAlarmService.prototype = {
 
       // If the calendar map is empty, remove it from the timer map
       if (this.mTimerMap[aItem.calendar.id].toSource() == "({})") {
         delete this.mTimerMap[aItem.calendar.id];
       }
     }
   },
 
-  disposeCalendarTimers: function(aCalendars) {
+  disposeCalendarTimers(aCalendars) {
     for (let calendar of aCalendars) {
       if (calendar.id in this.mTimerMap) {
         for (let hashId in this.mTimerMap[calendar.id]) {
           let itemTimerMap = this.mTimerMap[calendar.id][hashId];
           for (let icalString in itemTimerMap) {
             let timer = itemTimerMap[icalString];
             timer.cancel();
           }
         }
         delete this.mTimerMap[calendar.id];
       }
     }
   },
 
-  findAlarms: function(aCalendars, aStart, aUntil) {
+  findAlarms(aCalendars, aStart, aUntil) {
     let getListener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
       alarmService: this,
       addRemovePromise: PromiseUtils.defer(),