Bug 1346797 - Fix calendar eslint issues. r=MakeMyDay
authoreslint <eslint@bugzilla.kewis.ch>
Mon, 13 Mar 2017 15:30:50 +0100
changeset 29132 076da1348bcce4fc0b579531505709fb0601b790
parent 29131 9c0e3022858b6fc0f25c4b9f32563ee143075467
child 29133 69ed6b20f6f2955a848a1cc750762834b857c482
push id2068
push userclokep@gmail.com
push dateMon, 13 Nov 2017 19:02:14 +0000
treeherdercomm-beta@9c7e7ce8672b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMakeMyDay
bugs1346797
Bug 1346797 - Fix calendar eslint issues. r=MakeMyDay MozReview-Commit-ID: AdhLRaAKMQs
.eslintrc.js
calendar/.eslintrc.js
calendar/base/content/agenda-listbox.js
calendar/base/content/calendar-base-view.xml
calendar/base/content/calendar-chrome-startup.js
calendar/base/content/calendar-common-sets.js
calendar/base/content/calendar-daypicker.xml
calendar/base/content/calendar-extract.js
calendar/base/content/calendar-invitations-manager.js
calendar/base/content/calendar-item-bindings.xml
calendar/base/content/calendar-item-editing.js
calendar/base/content/calendar-management.js
calendar/base/content/calendar-month-view.xml
calendar/base/content/calendar-multiday-view.xml
calendar/base/content/calendar-task-tree.js
calendar/base/content/calendar-task-tree.xml
calendar/base/content/calendar-task-view.js
calendar/base/content/calendar-ui-utils.js
calendar/base/content/calendar-unifinder-todo.js
calendar/base/content/calendar-unifinder.js
calendar/base/content/calendar-view-core.xml
calendar/base/content/calendar-views.js
calendar/base/content/dialogs/calendar-alarm-dialog.js
calendar/base/content/dialogs/calendar-event-dialog-attendees.js
calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
calendar/base/content/dialogs/calendar-summary-dialog.js
calendar/base/content/import-export.js
calendar/base/content/preferences/alarms.js
calendar/base/content/today-pane.js
calendar/base/content/widgets/calendar-list-tree.xml
calendar/base/content/widgets/minimonth.xml
calendar/base/modules/calAlarmUtils.jsm
calendar/base/modules/calExtract.jsm
calendar/base/modules/calItipUtils.jsm
calendar/base/modules/calRecurrenceUtils.jsm
calendar/base/modules/calUtils.jsm
calendar/base/src/calAlarm.js
calendar/base/src/calAttendee.js
calendar/base/src/calCachedCalendar.js
calendar/base/src/calFilter.js
calendar/base/src/calItemBase.js
calendar/base/src/calUtils.js
calendar/lightning/content/lightning-item-iframe.js
calendar/lightning/content/lightning-item-panel.js
calendar/lightning/content/messenger-overlay-sidebar.js
calendar/lightning/modules/ltnInvitationUtils.jsm
calendar/providers/caldav/calDavCalendar.js
calendar/providers/ics/calICSCalendar.js
calendar/providers/storage/calStorageCalendar.js
calendar/providers/storage/calStorageUpgrade.jsm
calendar/providers/wcap/calWcapSession.js
calendar/resources/content/datetimepickers/datetimepickers.xml
calendar/resources/content/publish.js
calendar/test/mozmill/.eslintrc.js
calendar/test/mozmill/eventDialog/testEventDialog.js
calendar/test/mozmill/invitations/test-imip-bar-eml.js
calendar/test/mozmill/shared-modules/test-calendar-utils.js
calendar/test/mozmill/views/testTaskView.js
calendar/test/unit/head_consts.js
calendar/test/unit/test_alarmservice.js
calendar/test/unit/test_attendee.js
calendar/test/unit/test_bug1199942.js
calendar/test/unit/test_bug759324.js
calendar/test/unit/test_calitiputils.js
calendar/test/unit/test_ltninvitationutils.js
calendar/test/unit/test_recur.js
calendar/test/unit/test_storage.js
calendar/test/unit/test_timezone.js
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,14 +1,23 @@
 "use strict";
 
 module.exports = {
+  "root": true,
+
+  // 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": [
     "mozilla"
   ],
-  "rules": {
-    "mozilla/import-globals": 1,
-  },
-  "env": {
-    "es6": true
+
+  // The html plugin is enabled via a command line option on eslint. To avoid
+  // bad interactions with the xml preprocessor in eslint-plugin-mozilla, we
+  // turn off processing of the html plugin for .xml files.
+  "settings": {
+    "html/xml-extensions": [ ".xhtml" ]
   },
 };
--- a/calendar/.eslintrc.js
+++ b/calendar/.eslintrc.js
@@ -1,14 +1,11 @@
 "use strict";
 
 module.exports = {
-    "extends": [
-        "../mozilla/toolkit/.eslintrc.js"
-    ],
     "rules": {
         // Enforce one true brace style (opening brace on the same line)
         // Allow single line (for now) because of the vast number of changes needed
         "brace-style": [2, "1tbs", { allowSingleLine: true }],
 
         // Enforce newline at the end of file, with no multiple empty lines.
         "eol-last": 2,
 
@@ -20,16 +17,19 @@ module.exports = {
         "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, 81],
+
         // Enforce curly brace conventions for all control statements.
         "curly": 2,
 
         // Enforce the spacing around the * in generator functions.
         "generator-star-spacing": [2, "after"],
 
         // Require space before/after arrow function's arrow
         "arrow-spacing": [2, { before: true, after: true }],
@@ -152,16 +152,17 @@ module.exports = {
         // Disallow use of multiple spaces (sometimes used to align const values,
         // array or object items, etc.). It's hard to maintain and doesn't add that
         // much benefit.
         "no-multi-spaces": 2,
 
         // Require 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.
@@ -286,16 +287,19 @@ module.exports = {
         "no-multi-str": 2,
 
         // Disallow Symbol Constructor
         "no-new-symbol": 2,
 
         // Disallow Initializing to undefined
         "no-undef-init": 2,
 
+        // Don't Disallow Undeclared Variables (for now)
+        "no-undef": 0,
+
         // 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,
@@ -397,16 +401,19 @@ module.exports = {
         "func-names": [2, "never"],
 
         // Enforce placing object properties on separate lines
         "object-property-newline": [2, { allowMultiplePropertiesPerLine: true }],
 
         // Enforce consistent line breaks inside braces
         "object-curly-newline": [2, { multiline: true }],
 
+        // Require Object Literal Shorthand Syntax (consistent for now)
+        "object-shorthand": [2, "consistent"],
+
         // 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, {
--- a/calendar/base/content/agenda-listbox.js
+++ b/calendar/base/content/agenda-listbox.js
@@ -50,17 +50,17 @@ agendaListbox.init = function() {
         }
     };
     Services.prefs.addObserver("calendar.agendaListbox", prefObserver, false);
 
     // Make sure the agenda listbox is unloaded
     window.addEventListener("unload", () => {
         Services.prefs.removeObserver("calendar.agendaListbox", prefObserver);
         this.uninit();
-    }, false);
+    });
 };
 
 /**
  * Clean up the agenda listbox, used on window unload.
  */
 agendaListbox.uninit = function() {
     if (this.calendar) {
         this.calendar.removeObserver(this.calendarObserver);
@@ -1097,17 +1097,17 @@ function scheduleNextCurrentEventUpdate(
             }
         };
         // Add observer
         Services.obs.addObserver(wakeObserver, "wake_notification", false);
 
         // Remove observer on unload
         window.addEventListener("unload", () => {
             Services.obs.removeObserver(wakeObserver, "wake_notification");
-        }, false);
+        });
 
         gEventTimer = Components.classes["@mozilla.org/timer;1"]
                                    .createInstance(Components.interfaces.nsITimer);
     }
     gEventTimer.initWithCallback(udCallback, aMsUntil, gEventTimer.TYPE_ONE_SHOT);
 }
 
 /**
--- a/calendar/base/content/calendar-base-view.xml
+++ b/calendar/base/content/calendar-base-view.xml
@@ -49,17 +49,16 @@
       })
       ]]></field>
 
       <field name="mPrefObserver"><![CDATA[
       ({
           calView: this,
           observe: function(subj, topic, pref) {
               this.calView.handlePreference(subj, topic, pref);
-              return;
           }
       })
       ]]></field>
 
       <field name="mObserver"><![CDATA[
         // the calIObserver, calICompositeObserver, and calIAlarmServiceObserver
         ({
             QueryInterface: XPCOMUtils.generateQI([
@@ -93,17 +92,16 @@
                 }
 
                 let occs = aItem.getOccurrencesBetween(this.calView.startDate,
                                                        this.calView.queryEndDate,
                                                        {});
                 for (let occ of occs) {
                     this.calView.doAddItem(occ);
                 }
-                return;
             },
 
             onModifyItem: function(aNewItem, aOldItem) {
                 if (cal.isToDo(aNewItem) && cal.isToDo(aOldItem) &&
                     !this.calView.mTasksInView) {
                     return;
                 }
                 let occs;
@@ -652,21 +650,24 @@
           }
           this.refreshView();
         ]]></body>
       </method>
 
       <method name="updateDaysOffPrefs">
         <body><![CDATA[
           const weekPrefix = "calendar.week.";
-          const prefNames = ["d0sundaysoff", "d1mondaysoff", "d2tuesdaysoff",
-                             "d3wednesdaysoff", "d4thursdaysoff",
-                             "d5fridaysoff", "d6saturdaysoff"];
-          const defaults = ["true", "false", "false", "false",
-                            "false", "false", "true"];
+          const prefNames = [
+              "d0sundaysoff", "d1mondaysoff", "d2tuesdaysoff",
+              "d3wednesdaysoff", "d4thursdaysoff", "d5fridaysoff",
+              "d6saturdaysoff"
+          ];
+          const defaults = [
+              "true", "false", "false", "false", "false", "false", "true"
+          ];
           let daysOff = [];
           for (let i in prefNames) {
               if (Preferences.get(weekPrefix + prefNames[i], defaults[i])) {
                   daysOff.push(Number(i));
               }
           }
           this.daysOffArray = daysOff;
         ]]></body>
@@ -873,23 +874,25 @@
 
       <property name="date">
         <getter><![CDATA[
           return this.mDate;
         ]]></getter>
         <setter><![CDATA[
           this.mDate = val;
           let dateFormatter = cal.getDateFormatter();
-          let label = cal.calGetString("calendar", "dayHeaderLabel",
-                                       [dateFormatter.shortDayName(val.weekday),
-                                        dateFormatter.formatDateWithoutYear(val)]);
+          let label = cal.calGetString("calendar", "dayHeaderLabel", [
+              dateFormatter.shortDayName(val.weekday),
+              dateFormatter.formatDateWithoutYear(val)
+          ]);
           this.shortName.setAttribute("value", label);
-          label = cal.calGetString("calendar", "dayHeaderLabel",
-                                   [dateFormatter.dayName(val.weekday),
-                                    dateFormatter.formatDateWithoutYear(val)]);
+          label = cal.calGetString("calendar", "dayHeaderLabel", [
+              dateFormatter.dayName(val.weekday),
+              dateFormatter.formatDateWithoutYear(val)
+          ]);
           this.longName.setAttribute("value", label);
           return val;
         ]]></setter>
       </property>
 
       <property name="shortWeekNames">
         <getter><![CDATA[
         ]]></getter>
@@ -904,18 +907,19 @@
 
       <method name="getLongWeekdayPixels">
         <body><![CDATA[
           // Only do this if the long weekdays are visible and we haven't already cached.
           let longNameWidth = this.longName.boxObject.width;
           if (longNameWidth > 0) {
               this.longWeekdayPixels = longNameWidth +
                                        getSummarizedStyleValues(this.longName, ["margin-left", "margin-right"]);
-              this.longWeekdayPixels += getSummarizedStyleValues(this, ["border-left-width",
-                                                                        "padding-left", "padding-right"]);
+              this.longWeekdayPixels += getSummarizedStyleValues(this, [
+                  "border-left-width", "padding-left", "padding-right"
+              ]);
               return this.longWeekdayPixels;
           } else {
               // in this case the weekdaypixels have not yet been layouted;
               // by definition 0 is returned
               return 0;
           }
         ]]></body>
       </method>
--- a/calendar/base/content/calendar-chrome-startup.js
+++ b/calendar/base/content/calendar-chrome-startup.js
@@ -27,24 +27,24 @@ function commonInitCalendar() {
 
     // Make sure we update ourselves if the program stays open over midnight
     scheduleMidnightUpdate(refreshUIBits);
 
     // Set up the command controller from calendar-common-sets.js
     injectCalendarCommandController();
 
     // Set up item and day selection listeners
-    getViewDeck().addEventListener("dayselect", observeViewDaySelect, false);
+    getViewDeck().addEventListener("dayselect", observeViewDaySelect);
     getViewDeck().addEventListener("itemselect", calendarController.onSelectionChanged, true);
 
     // Start alarm service
     Components.classes["@mozilla.org/calendar/alarm-service;1"]
               .getService(Components.interfaces.calIAlarmService)
               .startup();
-    document.getElementById("calsidebar_splitter").addEventListener("command", onCalendarViewResize, false);
+    document.getElementById("calsidebar_splitter").addEventListener("command", onCalendarViewResize);
     window.addEventListener("resize", onCalendarViewResize, true);
 
     // Set up the category colors
     categoryManagement.initCategories();
 
     // Set up window pref observers
     calendarWindowPrefs.init();
 
@@ -76,17 +76,17 @@ function commonFinishCalendar() {
     unloadCalendarManager();
 
     // clean up the unifinder
     finishCalendarToDoUnifinder();
 
     // Remove the command controller
     removeCalendarCommandController();
 
-    document.getElementById("calsidebar_splitter").removeEventListener("command", onCalendarViewResize, false);
+    document.getElementById("calsidebar_splitter").removeEventListener("command", onCalendarViewResize);
     window.removeEventListener("resize", onCalendarViewResize, true);
 
     // Clean up the category colors
     categoryManagement.cleanupCategories();
 
     // Clean up window pref observers
     calendarWindowPrefs.cleanup();
 }
@@ -145,17 +145,17 @@ var calendarWindowPrefs = {
                     break;
                 }
             }
         } else if (aTopic == "domwindowopened") {
             let win = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
             win.addEventListener("load", () => {
                 let attributeValue = Preferences.get("calendar.view.useSystemColors", false) && "true";
                 setElementValue(win.document.documentElement, attributeValue, "systemcolors");
-            }, false);
+            });
         }
     }
 };
 
 /**
  * Migrate calendar UI. This function is called at each startup and can be used
  * to change UI items that require js code intervention
  */
--- a/calendar/base/content/calendar-common-sets.js
+++ b/calendar/base/content/calendar-common-sets.js
@@ -431,21 +431,19 @@ var calendarController = {
                 }
                 break;
 
             default:
                 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);
-                    return;
                 }
 
         }
-        return;
     },
 
     onEvent: function(aEvent) {
     },
 
     isCalendarInForeground: function() {
         return gCurrentMode && gCurrentMode != "mail";
     },
@@ -895,21 +893,25 @@ function deleteSelectedItems() {
 }
 
 function calendarUpdateNewItemsCommand() {
     // keep current current status
     let oldEventValue = CalendarNewEventsCommandEnabled;
     let oldTaskValue = CalendarNewTasksCommandEnabled;
 
     // define command set to update
-    let eventCommands = ["calendar_new_event_command",
-                         "calendar_new_event_context_command"];
-    let taskCommands = ["calendar_new_todo_command",
-                        "calendar_new_todo_context_command",
-                        "calendar_new_todo_todaypane_command"];
+    let eventCommands = [
+        "calendar_new_event_command",
+        "calendar_new_event_context_command"
+    ];
+    let taskCommands = [
+        "calendar_new_todo_command",
+        "calendar_new_todo_context_command",
+        "calendar_new_todo_todaypane_command"
+    ];
 
     // re-calculate command status
     CalendarNewEventsCommandEnabled = false;
     CalendarNewTasksCommandEnabled = false;
     let calendars = cal.getCalendarManager().getCalendars({}).filter(cal.isCalendarWritable).filter(cal.userCanAddItemsToCalendar);
     if (calendars.some(cal.isEventCalendar)) {
         CalendarNewEventsCommandEnabled = true;
     }
@@ -934,18 +936,20 @@ function calendarUpdateDeleteCommand(sel
     for (let item of selectedItems) {
         if (!cal.userCanDeleteItemsFromCalendar(item.calendar)) {
             CalendarDeleteCommandEnabled = false;
             break;
         }
     }
 
     if (CalendarDeleteCommandEnabled != oldValue) {
-        let commands = ["calendar_delete_event_command",
-                        "calendar_delete_todo_command",
-                        "calendar_delete_focused_item_command",
-                        "button_delete",
-                        "cmd_delete"];
+        let commands = [
+            "calendar_delete_event_command",
+            "calendar_delete_todo_command",
+            "calendar_delete_focused_item_command",
+            "button_delete",
+            "cmd_delete"
+        ];
         for (let command of commands) {
             goUpdateCommand(command);
         }
     }
 }
--- a/calendar/base/content/calendar-daypicker.xml
+++ b/calendar/base/content/calendar-daypicker.xml
@@ -35,17 +35,17 @@
               event.initEvent("select", true, true);
               this.calendar.dispatchEvent(event);
           }
         ]]></body>
       </method>
       <constructor><![CDATA[
         this.setAttribute("autoCheck", "true");
         this.setAttribute("type", "checkbox");
-        this.addEventListener("DOMAttrModified", this.onmodified, false);
+        this.addEventListener("DOMAttrModified", this.onmodified);
       ]]></constructor>
     </implementation>
   </binding>
 
   <!--
   ########################################################################
   ## daypicker-weekday
   ########################################################################
--- a/calendar/base/content/calendar-extract.js
+++ b/calendar/base/content/calendar-extract.js
@@ -208,26 +208,26 @@ var calendarExtract = {
         let timeSpent = (new Date()).getTime() - time;
         cal.LOG("[calExtract] Total time spent for conversion (including loading of dictionaries): " + timeSpent + "ms");
     },
 
     addListeners: function() {
         if (window.top.document.location == "chrome://messenger/content/messenger.xul") {
             // covers initial load and folder change
             let folderTree = document.getElementById("folderTree");
-            folderTree.addEventListener("select", this.setState, false);
+            folderTree.addEventListener("select", this.setState);
 
             // covers selection change in a folder
             let msgTree = window.top.GetThreadTree();
-            msgTree.addEventListener("select", this.setState, false);
+            msgTree.addEventListener("select", this.setState);
 
             window.addEventListener("unload", () => {
-                folderTree.removeEventListener("select", this.setState, false);
-                msgTree.removeEventListener("select", this.setState, false);
-            }, false);
+                folderTree.removeEventListener("select", this.setState);
+                msgTree.removeEventListener("select", this.setState);
+            });
         }
     },
 
     setState: function() {
         let eventButton = document.getElementById("extractEventButton");
         let taskButton = document.getElementById("extractTaskButton");
         let hdrEventButton = document.getElementById("hdrExtractEventButton");
         let hdrTaskButton = document.getElementById("hdrExtractTaskButton");
@@ -266,9 +266,9 @@ var calendarExtract = {
 
         contextMenuEvent.disabled = contextEventDisabled;
         contextMenuTask.disabled = contextTaskDisabled;
 
         contextMenu.disabled = contextEventDisabled && contextTaskDisabled;
     }
 };
 
-window.addEventListener("load", calendarExtract.addListeners.bind(calendarExtract), false);
+window.addEventListener("load", calendarExtract.addListeners.bind(calendarExtract));
--- a/calendar/base/content/calendar-invitations-manager.js
+++ b/calendar/base/content/calendar-invitations-manager.js
@@ -66,17 +66,17 @@ function InvitationsManager() {
     this.mItemList = [];
     this.mStartDate = null;
     this.mJobsPending = 0;
     this.mTimer = null;
 
     window.addEventListener("unload", () => {
         // Unload handlers get removed automatically
         this.cancelInvitationsUpdate();
-    }, false);
+    });
 }
 
 InvitationsManager.prototype = {
     mItemList: null,
     mStartDate: null,
     mJobsPending: 0,
     mTimer: null,
 
--- a/calendar/base/content/calendar-item-bindings.xml
+++ b/calendar/base/content/calendar-item-bindings.xml
@@ -82,20 +82,20 @@
               this.setAttribute("hidden", "true");
           } else {
               const kDefaultTimezone = cal.calendarDefaultTimezone();
               let localTime = date.getInTimezone(kDefaultTimezone);
               let formatter = cal.getDateFormatter();
               itemDateTimeLabel.value = formatter.formatDateTime(localTime);
               if (!date.timezone.isFloating && date.timezone.tzid != kDefaultTimezone.tzid) {
                   // we additionally display the original datetime with timezone
-                  let orgTime = cal.calGetString("calendar",
-                                                 "datetimeWithTimezone",
-                                                 [formatter.formatDateTime(date),
-                                                  date.timezone.tzid]);
+                  let orgTime = cal.calGetString("calendar", "datetimeWithTimezone", [
+                      formatter.formatDateTime(date),
+                      date.timezone.tzid
+                  ]);
                   itemDateTimeLabel.value += " (" + orgTime + ")";
               }
               this.removeAttribute("hidden");
           }
         ]]></setter>
       </property>
     </implementation>
   </binding>
--- a/calendar/base/content/calendar-item-editing.js
+++ b/calendar/base/content/calendar-item-editing.js
@@ -326,17 +326,17 @@ function createTodoWithDialog(calendar, 
  * @param aPromptOccurrence     If the user should be prompted to select if the
  *                                parent item or occurrence should be modified.
  * @param initialDate           (optional) The initial date for new task datepickers
  * @param aCounterProposal      (optional) An object representing the counterproposal
  *        {
  *            {JsObject} result: {
  *                type: {String} "OK"|"OUTDATED"|"NOTLATESTUPDATE"|"ERROR"|"NODIFF"
  *                descr: {String} a technical description of the problem if type is ERROR or NODIFF,
- *                                otherwise an empty string 
+ *                                otherwise an empty string
  *            },
  *            (empty if result.type = "ERROR"|"NODIFF"){Array} differences: [{
  *                property: {String} a property that is subject to the proposal
  *                proposed: {String} the proposed value
  *                original: {String} the original value
  *            }]
  *        }
  */
--- a/calendar/base/content/calendar-management.js
+++ b/calendar/base/content/calendar-management.js
@@ -345,18 +345,20 @@ function showOnlyCalendar(aCalendar) {
             composite.removeCalendar(calendar);
         }
     }
     composite.addCalendar(aCalendar);
     composite.endBatch();
 }
 
 var compositeObserver = {
-    QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calIObserver,
-                                           Components.interfaces.calICompositeObserver]),
+    QueryInterface: XPCOMUtils.generateQI([
+        Components.interfaces.calIObserver,
+        Components.interfaces.calICompositeObserver
+    ]),
 
     onStartBatch: function() {},
     onEndBatch: function() {},
     onAddItem: function() {},
     onModifyItem: function() {},
     onDeleteItem: function() {},
     onError: function() {},
     onPropertyChanged: function() {},
@@ -415,17 +417,17 @@ var calendarOfflineManager = {
         this.updateOfflineUI(!this.isOnline());
         this.initialized = true;
     },
 
     uninit: function() {
         if (!this.initialized) {
             throw Components.results.NS_ERROR_NOT_INITIALIZED;
         }
-        Services.obs.removeObserver(this, "network:offline-status-changed", false);
+        Services.obs.removeObserver(this, "network:offline-status-changed");
         this.initialized = false;
     },
 
     isOnline: function() {
         return !Services.io.offline;
     },
 
     updateOfflineUI: function(aIsOffline) {
--- a/calendar/base/content/calendar-month-view.xml
+++ b/calendar/base/content/calendar-month-view.xml
@@ -526,17 +526,16 @@
                       this.hideWeekNumbers();
                   }
                   break;
 
               default:
                   this.handleCommonPreference(aSubject, aTopic, aPreference);
                   break;
           }
-          return;
         ]]></body>
       </method>
 
       <method name="getSelectedItems">
         <parameter name="aCount"/>
         <body><![CDATA[
           aCount.value = this.mSelectedItems.length;
           return this.mSelectedItems;
--- a/calendar/base/content/calendar-multiday-view.xml
+++ b/calendar/base/content/calendar-multiday-view.xml
@@ -1343,19 +1343,19 @@
         ]]></body>
       </method>
 
       <method name="onEventSweepKeypress">
         <parameter name="event"/>
         <body><![CDATA[
           let col = document.calendarEventColumnDragging;
           if (col && event.keyCode == event.DOM_VK_ESCAPE) {
-              window.removeEventListener("mousemove", col.onEventSweepMouseMove, false);
-              window.removeEventListener("mouseup", col.onEventSweepMouseUp, false);
-              window.removeEventListener("keypress", col.onEventSweepKeypress, false);
+              window.removeEventListener("mousemove", col.onEventSweepMouseMove);
+              window.removeEventListener("mouseup", col.onEventSweepMouseUp);
+              window.removeEventListener("keypress", col.onEventSweepKeypress);
 
               let lateralColumns = col.firstLastShadowColumns();
               let column = lateralColumns.firstCol;
               let index = lateralColumns.firstIndex;
               while (column && index < col.mDragState.shadows) {
                   column.fgboxes.dragbox.removeAttribute("dragging");
                   column.fgboxes.box.removeAttribute("dragging");
                   column = column.nextSibling;
@@ -1452,19 +1452,19 @@
               // Remove the drag state
               for (let column = firstCol, i = firstIndex;
                    column && i < col.mDragState.shadows;
                    column = column.nextSibling, i++) {
                   column.fgboxes.dragbox.removeAttribute("dragging");
                   column.fgboxes.box.removeAttribute("dragging");
               }
 
-              window.removeEventListener("mousemove", col.onEventSweepMouseMove, false);
-              window.removeEventListener("mouseup", col.onEventSweepMouseUp, false);
-              window.removeEventListener("keypress", col.onEventSweepKeypress, false);
+              window.removeEventListener("mousemove", col.onEventSweepMouseMove);
+              window.removeEventListener("mouseup", col.onEventSweepMouseUp);
+              window.removeEventListener("keypress", col.onEventSweepKeypress);
               document.calendarEventColumnDragging = null;
               col.mDragState = null;
 
               // the multiday view currently exhibits a less than optimal strategy
               // in terms of item selection. items don't get automatically selected
               // when clicked and dragged, as to differentiate inline editing from
               // the act of selecting an event. but the application internal drop
               // targets will ask for selected items in order to pull the data from
@@ -1635,19 +1635,19 @@
               column.fgboxes.dragbox.removeAttribute("dragging");
               column.fgboxes.box.removeAttribute("dragging");
               column = column.nextSibling;
               index++;
           }
 
           col.clearMagicScroll();
 
-          window.removeEventListener("mousemove", col.onEventSweepMouseMove, false);
-          window.removeEventListener("mouseup", col.onEventSweepMouseUp, false);
-          window.removeEventListener("keypress", col.onEventSweepKeypress, false);
+          window.removeEventListener("mousemove", col.onEventSweepMouseMove);
+          window.removeEventListener("mouseup", col.onEventSweepMouseUp);
+          window.removeEventListener("keypress", col.onEventSweepKeypress);
 
           document.calendarEventColumnDragging = null;
 
           // if the user didn't sweep out at least a few pixels, ignore
           // unless we're in a different column
           if (dragState.origColumn == col) {
               let ignore = false;
               let orient = col.getAttribute("orient");
@@ -1909,19 +1909,19 @@
                   }
               }
           } else {
               // Invalid grabbed element.
           }
 
           document.calendarEventColumnDragging = this;
 
-          window.addEventListener("mousemove", this.onEventSweepMouseMove, false);
-          window.addEventListener("mouseup", this.onEventSweepMouseUp, false);
-          window.addEventListener("keypress", this.onEventSweepKeypress, false);
+          window.addEventListener("mousemove", this.onEventSweepMouseMove);
+          window.addEventListener("mouseup", this.onEventSweepMouseUp);
+          window.addEventListener("keypress", this.onEventSweepKeypress);
         ]]></body>
       </method>
 
       <!-- called by sibling columns to tell us to take over the sweeping
          - of an event.
         -->
       <method name="acceptInProgressSweep">
         <parameter name="aDragState"/>
@@ -2084,19 +2084,19 @@
         } else {
             this.mDragState.origLoc = event.screenX;
             this.mDragState.origMin = Math.floor((event.screenX - this.parentNode.boxObject.screenX) / interval) * snapIntMin;
             this.fgboxes.dragspacer.setAttribute("width", this.mDragState.origMin * this.mPixPerMin);
         }
 
         document.calendarEventColumnDragging = this;
 
-        window.addEventListener("mousemove", this.onEventSweepMouseMove, false);
-        window.addEventListener("mouseup", this.onEventSweepMouseUp, false);
-        window.addEventListener("keypress", this.onEventSweepKeypress, false);
+        window.addEventListener("mousemove", this.onEventSweepMouseMove);
+        window.addEventListener("mouseup", this.onEventSweepMouseUp);
+        window.addEventListener("keypress", this.onEventSweepKeypress);
       ]]></handler>
     </handlers>
   </binding>
 
   <binding id="calendar-header-container" extends="chrome://calendar/content/widgets/calendar-widgets.xml#dragndropContainer">
     <content xbl:inherits="selected" flex="1" class="calendar-event-column-header">
       <children/>
     </content>
@@ -2427,17 +2427,16 @@
             // start edge resize drag
             this.parentColumn.startSweepingToModifyEvent(this, this.mOccurrence, whichside,
                                                          event.screenX, event.screenY,
                                                          snapIntMin);
         } else {
             // may be click or drag,
             // so wait for mousemove (or mouseout if fast) to start item move drag
             this.mInMouseDown = true;
-            return;
         }
       ]]></handler>
 
       <handler event="mousemove"><![CDATA[
         if (!this.mInMouseDown) {
             return;
         }
 
@@ -2682,17 +2681,16 @@
                     this.setTimeIndicatorInterval(aSubject.getIntPref(aPreference));
                     this.enableTimeIndicator();
                     break;
 
                 default:
                     this.handleCommonPreference(aSubject, aTopic, aPreference);
                     break;
             }
-            return;
         ]]></body>
       </method>
 
       <method name="onResize">
         <parameter name="aRealSelf"/>
         <body><![CDATA[
           let self = aRealSelf || this; // eslint-disable-line consistent-this
           let isARelayout = !aRealSelf;
@@ -3228,18 +3226,20 @@
 
           if (orient == "horizontal") {
               this.pixelsPerMinute = 1.5;
           } else {
               this.pixelsPerMinute = 0.6;
           }
 
           let normalelems = ["mainbox", "timebar"];
-          let otherelems = ["labelbox", "labeldaybox", "headertimespacer",
-                            "headerbox", "headerdaybox", "scrollbox", "daybox"];
+          let otherelems = [
+              "labelbox", "labeldaybox", "headertimespacer", "headerbox",
+              "headerdaybox", "scrollbox", "daybox"
+          ];
 
           for (let id of normalelems) {
               document.getAnonymousElementByAttribute(this, "anonid", id).setAttribute("orient", orient);
           }
           for (let id of otherelems) {
               document.getAnonymousElementByAttribute(this, "anonid", id).setAttribute("orient", otherorient);
           }
 
@@ -3722,17 +3722,17 @@
                          this, "anonid", "scrollbox");
           let propertyValue = scrollbox.boxObject.firstChild.boxObject[propertyName];
           // Check if we need to show the headerScrollbarSpacer at all
           let headerPropertyValue = propertyValue;
           let headerDayBox = document.getAnonymousElementByAttribute(
                              this, "anonid", "headerdaybox");
           if (headerDayBox) {
               // Only do this when there are multiple days
-              let headerDayBoxMaxHeight = parseInt(document.defaultView.getComputedStyle(headerDayBox, null)
+              let headerDayBoxMaxHeight = parseInt(document.defaultView.getComputedStyle(headerDayBox)
                                                            .getPropertyValue("max-height"), 10);
               if (this.getAttribute("orient") == "vertical" &&
                   headerDayBox.boxObject.height >= headerDayBoxMaxHeight) {
                   // If the headerDayBox is just as high as the max-height, then
                   // there is already a scrollbar and we don't need to show the
                   // headerScrollbarSpacer. This is only valid for the non-rotated
                   // view.
                   headerPropertyValue = 0;
--- a/calendar/base/content/calendar-task-tree.js
+++ b/calendar/base/content/calendar-task-tree.js
@@ -98,21 +98,24 @@ function handleTaskContextMenuStateChang
 
 /**
  * Change the opening menu for the selected tasks.
  *
  * @param aEvent    The popupshowing event of the opening menu.
  */
 function changeMenuForTask(aEvent) {
     // Make sure to update the status of some commands.
-    ["calendar_delete_todo_command",
-     "calendar_toggle_completed_command",
-     "calendar_general-progress_command",
-     "calendar_general-priority_command",
-     "calendar_general-postpone_command"].forEach(goUpdateCommand);
+    let commands = [
+        "calendar_delete_todo_command",
+        "calendar_toggle_completed_command",
+        "calendar_general-progress_command",
+        "calendar_general-priority_command",
+        "calendar_general-postpone_command"
+    ];
+    commands.forEach(goUpdateCommand);
 
     let tasks = getSelectedTasks(aEvent);
     let tasksSelected = (tasks.length > 0);
     if (tasksSelected) {
         let cmd = document.getElementById("calendar_toggle_completed_command");
         if (cal.isPropertyValueSame(tasks, "isCompleted")) {
             setBooleanAttribute(cmd, "checked", tasks[0].isCompleted);
         } else {
--- a/calendar/base/content/calendar-task-tree.xml
+++ b/calendar/base/content/calendar-task-tree.xml
@@ -174,17 +174,17 @@
         Components.utils.import("resource://gre/modules/Services.jsm");
 
         // remove composite calendar observer
         let composite = cal.getCompositeCalendar(window);
         composite.removeObserver(this.mTaskTreeObserver);
 
         // remove the preference observer
         let branch = Services.prefs.getBranch("");
-        branch.removeObserver("calendar.", this, false);
+        branch.removeObserver("calendar.", this);
 
         let widths = "";
         let ordinals = "";
         let visible = "";
         let sorted = this.mTreeView.selectedColumn;
         let tree = document.getAnonymousNodes(this)[0];
         let treecols = tree.getElementsByTagNameNS(tree.namespaceURI, "treecol");
         for (let i = 0; i < treecols.length; i++) {
--- a/calendar/base/content/calendar-task-view.js
+++ b/calendar/base/content/calendar-task-view.js
@@ -293,9 +293,9 @@ function taskViewCopyLink(linkNode) {
     if (linkNode) {
         let linkAddress = linkNode.value;
         let clipboard = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
                                   .getService(Components.interfaces.nsIClipboardHelper);
         clipboard.copyString(linkAddress);
     }
 }
 
-window.addEventListener("load", taskViewOnLoad, false);
+window.addEventListener("load", taskViewOnLoad);
--- a/calendar/base/content/calendar-ui-utils.js
+++ b/calendar/base/content/calendar-ui-utils.js
@@ -536,55 +536,55 @@ function createXULElement(elem) {
  * http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSview-getComputedStyle
  * @param aXULElement   The xul element to be inspected.
  * @param aStyleProps   The css style properties for which values are to be retrieved
  *                        e.g. 'font-size', 'min-width" etc.
  * @return              An integer value denoting the optimal minimum width
  */
 function getSummarizedStyleValues(aXULElement, aStyleProps) {
     let retValue = 0;
-    let cssStyleDeclares = document.defaultView.getComputedStyle(aXULElement, null);
+    let cssStyleDeclares = document.defaultView.getComputedStyle(aXULElement);
     for (let prop of aStyleProps) {
         retValue += parseInt(cssStyleDeclares.getPropertyValue(prop), 10);
     }
     return retValue;
 }
 
 /**
  * Calculates the optimal minimum width based on the set css style-rules
  * by considering the css rules for the min-width, padding, border, margin
  * and border of the box.
  *
  * @param aXULElement   The xul element to be inspected.
  * @return              An integer value denoting the optimal minimum width
  */
 function getOptimalMinimumWidth(aXULElement) {
-    return getSummarizedStyleValues(aXULElement, ["min-width",
-                                                  "padding-left", "padding-right",
-                                                  "margin-left", "margin-top",
-                                                  "border-left-width", "border-right-width"]);
+    return getSummarizedStyleValues(aXULElement, [
+        "min-width", "padding-left", "padding-right", "margin-left",
+        "margin-top", "border-left-width", "border-right-width"
+    ]);
 }
 
 /**
  * Calculates the optimal minimum height based on the set css style-rules
  * by considering the css rules for the font-size, padding, border, margin
  * and border of the box. In its current state the line-height is considered
  * by assuming that it's size is about one third of the size of the font-size
  *
  * @param aXULElement   The xul-element to be inspected.
  * @return              An integer value denoting the optimal minimum height
  */
 function getOptimalMinimumHeight(aXULElement) {
     // the following line of code presumes that the line-height is set to "normal"
     // which is supposed to be a "reasonable distance" between the lines
     let firstEntity = parseInt(1.35 * getSummarizedStyleValues(aXULElement, ["font-size"]), 10);
-    let secondEntity = getSummarizedStyleValues(aXULElement,
-                                                ["padding-bottom", "padding-top",
-                                                "margin-bottom", "margin-top",
-                                                "border-bottom-width", "border-top-width"]);
+    let secondEntity = getSummarizedStyleValues(aXULElement, [
+        "padding-bottom", "padding-top", "margin-bottom", "margin-top",
+        "border-bottom-width", "border-top-width"
+    ]);
     return (firstEntity + secondEntity);
 }
 
 /**
  * Gets the "other" orientation value, i.e if "horizontal" is passed, "vertical"
  * is returned and vice versa.
  *
  * @param aOrientation    The orientation value to turn around.
--- a/calendar/base/content/calendar-unifinder-todo.js
+++ b/calendar/base/content/calendar-unifinder-todo.js
@@ -4,17 +4,17 @@
 
 /* exported prepareCalendarToDoUnifinder, finishCalendarToDoUnifinder */
 
 /**
  * Called when the window is loaded to set up the unifinder-todo.
  */
 function prepareCalendarToDoUnifinder() {
     // add listener to update the date filters
-    getViewDeck().addEventListener("dayselect", updateCalendarToDoUnifinder, false);
+    getViewDeck().addEventListener("dayselect", updateCalendarToDoUnifinder);
 
     updateCalendarToDoUnifinder();
 }
 
 /**
  * Updates the applied filter and show completed view of the unifinder todo.
  *
  * @param aFilter        The filter name to set.
@@ -51,10 +51,10 @@ function updateCalendarToDoUnifinder(aFi
     tree.updateFilter(filter);
 }
 
 /**
  * Called when the window is unloaded to clean up the unifinder-todo.
  */
 function finishCalendarToDoUnifinder() {
     // remove listeners
-    getViewDeck().removeEventListener("dayselect", updateCalendarToDoUnifinder, false);
+    getViewDeck().removeEventListener("dayselect", updateCalendarToDoUnifinder);
 }
--- a/calendar/base/content/calendar-unifinder.js
+++ b/calendar/base/content/calendar-unifinder.js
@@ -180,17 +180,17 @@ var unifinderObserver = {
 };
 
 /**
  * Called when the window is loaded to prepare the unifinder. This function is
  * used to add observers, event listeners, etc.
  */
 function prepareCalendarUnifinder() {
     // Only load once
-    window.removeEventListener("load", prepareCalendarUnifinder, false);
+    window.removeEventListener("load", prepareCalendarUnifinder);
     let unifinderTree = document.getElementById("unifinder-search-results-tree");
 
     // Add pref observer
     let branch = Services.prefs.getBranch("");
     branch.addObserver("calendar.", unifinderObserver, false);
 
     // Check if this is not the hidden window, which has no UI elements
     if (unifinderTree) {
@@ -204,17 +204,17 @@ function prepareCalendarUnifinder() {
         unifinderTreeView.mFilter = new calFilter();
 
         // Set up the unifinder views.
         unifinderTreeView.treeElement = unifinderTree;
         unifinderTree.view = unifinderTreeView;
 
         // Listen for changes in the selected day, so we can update if need be
         let viewDeck = getViewDeck();
-        viewDeck.addEventListener("dayselect", unifinderDaySelect, false);
+        viewDeck.addEventListener("dayselect", unifinderDaySelect);
         viewDeck.addEventListener("itemselect", unifinderItemSelect, true);
 
         // Set up sortDirection and sortActive, in case it persisted
         let sorted = unifinderTree.getAttribute("sort-active");
         let sortDirection = unifinderTree.getAttribute("sort-direction");
         if (!sortDirection || sortDirection == "undefined") {
             sortDirection = "ascending";
         }
@@ -244,21 +244,21 @@ function prepareCalendarUnifinder() {
  * added.
  */
 function finishCalendarUnifinder() {
     let ccalendar = cal.getCompositeCalendar(window);
     ccalendar.removeObserver(unifinderObserver);
 
     // Remove pref observer
     let branch = Services.prefs.getBranch("");
-    branch.removeObserver("calendar.", unifinderObserver, false);
+    branch.removeObserver("calendar.", unifinderObserver);
 
     let viewDeck = getViewDeck();
     if (viewDeck) {
-        viewDeck.removeEventListener("dayselect", unifinderDaySelect, false);
+        viewDeck.removeEventListener("dayselect", unifinderDaySelect);
         viewDeck.removeEventListener("itemselect", unifinderItemSelect, true);
     }
 
     // Persist the sort
     let unifinderTree = document.getElementById("unifinder-search-results-tree");
     let sorted = unifinderTreeView.selectedColumn;
     if (sorted) {
         unifinderTree.setAttribute("sort-active", sorted.getAttribute("itemproperty"));
@@ -950,10 +950,10 @@ function toggleUnifinder() {
 
     // Make sure the selection is correct
     if (unifinderTreeView.doingSelection) {
         unifinderTreeView.resetAllowSelection();
     }
     unifinderTreeView.setSelectedItems();
 }
 
-window.addEventListener("load", prepareCalendarUnifinder, false);
-window.addEventListener("unload", finishCalendarUnifinder, false);
+window.addEventListener("load", prepareCalendarUnifinder);
+window.addEventListener("unload", finishCalendarUnifinder);
--- a/calendar/base/content/calendar-view-core.xml
+++ b/calendar/base/content/calendar-view-core.xml
@@ -294,17 +294,16 @@
               // Note that as soon as we do the modifyItem, this element ceases to exist,
               // so don't bother trying to modify anything further here! ('this' exists,
               // because it's being kept alive, but our child content etc. is all gone)
               return;
           }
 
           this.eventNameTextbox.setAttribute("hidden", "true");
           this.eventNameLabel.removeAttribute("hidden");
-          return;
         ]]></body>
       </method>
     </implementation>
 
     <handlers>
       <handler event="contextmenu" phase="capturing"><![CDATA[
         // If the middle/right button was used for click just select the item.
         if (!this.selected) {
--- a/calendar/base/content/calendar-views.js
+++ b/calendar/base/content/calendar-views.js
@@ -208,30 +208,36 @@ function switchToView(aViewType) {
                 node.setAttribute(attr, node.getAttribute(attr + "-" + aViewType));
             } else {
                 node.setAttribute(attr, node.getAttribute(attr + "-all"));
             }
         }
     }
 
     // Set up the labels and accesskeys for the context menu
-    ["calendar-view-context-menu-next",
-     "calendar-view-context-menu-previous",
-     "calendar-go-menu-next",
-     "calendar-go-menu-previous",
-     "appmenu_calendar-go-menu-next",
-     "appmenu_calendar-go-menu-previous"].forEach((x) => {
-         setupViewNode(x, "label");
-         setupViewNode(x, "accesskey");
-     });
+    let ids = [
+        "calendar-view-context-menu-next",
+        "calendar-view-context-menu-previous",
+        "calendar-go-menu-next",
+        "calendar-go-menu-previous",
+        "appmenu_calendar-go-menu-next",
+        "appmenu_calendar-go-menu-previous"
+    ];
+    ids.forEach((x) => {
+        setupViewNode(x, "label");
+        setupViewNode(x, "accesskey");
+    });
 
     // Set up the labels for the view navigation
-    ["previous-view-button",
-     "today-view-button",
-     "next-view-button"].forEach(x => setupViewNode(x, "tooltiptext"));
+    ids = [
+        "previous-view-button",
+        "today-view-button",
+        "next-view-button"
+    ];
+    ids.forEach(x => setupViewNode(x, "tooltiptext"));
 
     try {
         selectedDay = viewDeck.selectedPanel.selectedDay;
         currentSelection = viewDeck.selectedPanel.getSelectedItems({});
     } catch (ex) {
         // This dies if no view has even been chosen this session, but that's
         // ok because we'll just use cal.now() below.
     }
@@ -335,17 +341,17 @@ function scheduleMidnightUpdate(aRefresh
         };
 
         // Add observer
         Services.obs.addObserver(wakeObserver, "wake_notification", false);
 
         // Remove observer on unload
         window.addEventListener("unload", () => {
             Services.obs.removeObserver(wakeObserver, "wake_notification");
-        }, false);
+        });
         gMidnightTimer = Components.classes["@mozilla.org/timer;1"]
                                    .createInstance(Components.interfaces.nsITimer);
     }
     gMidnightTimer.initWithCallback(udCallback, msUntilTomorrow, gMidnightTimer.TYPE_ONE_SHOT);
 }
 
 /**
  * Retuns a cached copy of the view stylesheet.
--- a/calendar/base/content/dialogs/calendar-alarm-dialog.js
+++ b/calendar/base/content/dialogs/calendar-alarm-dialog.js
@@ -266,19 +266,19 @@ function addWidgetFor(aItem, aAlarm) {
     let widget = document.createElement("calendar-alarm-widget");
     let alarmRichlist = document.getElementById("alarm-richlist");
 
     // Add widgets sorted by start date ascending
     cal.binaryInsertNode(alarmRichlist, widget, aItem, widgetAlarmComptor, false);
 
     widget.item = aItem;
     widget.alarm = aAlarm;
-    widget.addEventListener("snooze", onSnoozeAlarm, false);
-    widget.addEventListener("dismiss", onDismissAlarm, false);
-    widget.addEventListener("itemdetails", onItemDetails, false);
+    widget.addEventListener("snooze", onSnoozeAlarm);
+    widget.addEventListener("dismiss", onDismissAlarm);
+    widget.addEventListener("itemdetails", onItemDetails);
 
     setupTitle();
 
     if (!alarmRichlist.userSelectedWidget) {
         // Always select first widget of the list.
         // Since the onselect event causes scrolling,
         // we don't want to process the event when adding widgets.
         alarmRichlist.suppressOnSelect = true;
@@ -306,19 +306,19 @@ function removeWidgetFor(aItem, aAlarm) 
         if (widget.item && widget.item.hashId == hashId &&
             widget.alarm && widget.alarm.icalString == aAlarm.icalString) {
             if (widget.selected) {
                 // Advance selection if needed
                 widget.control.selectedItem = widget.previousSibling ||
                                               widget.nextSibling;
             }
 
-            widget.removeEventListener("snooze", onSnoozeAlarm, false);
-            widget.removeEventListener("dismiss", onDismissAlarm, false);
-            widget.removeEventListener("itemdetails", onItemDetails, false);
+            widget.removeEventListener("snooze", onSnoozeAlarm);
+            widget.removeEventListener("dismiss", onDismissAlarm);
+            widget.removeEventListener("itemdetails", onItemDetails);
 
             widget.remove();
             closeIfEmpty();
             notfound = false;
         }
     }
 
     // Update the title
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.js
@@ -117,17 +117,17 @@ function onLoad() {
                     propagateDateTime();
                     break;
             }
         }
     };
     Services.prefs.addObserver("calendar.", prefObserver, false);
     window.addEventListener("unload", () => {
         Services.prefs.removeObserver("calendar.", prefObserver);
-    }, false);
+    });
 
     opener.setCursor("auto");
     self.focus();
 }
 
 /**
  * This function should be called when the accept button was pressed on the
  * attendee dialog. Calls the accept function specified in the window arguments.
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
@@ -1064,18 +1064,20 @@
         function cycle(values, current) {
             let nextIndex = (values.indexOf(current) + 1) % values.length;
             return values[nextIndex];
         }
 
         let target = event.originalTarget;
         if (target.className == "role-icon") {
             if (target.getAttribute("disabled") != "true") {
-                const roleCycle = ["REQ-PARTICIPANT", "OPT-PARTICIPANT",
-                                   "NON-PARTICIPANT", "CHAIR"];
+                const roleCycle = [
+                    "REQ-PARTICIPANT", "OPT-PARTICIPANT",
+                    "NON-PARTICIPANT", "CHAIR"
+                ];
 
                 let nextValue = cycle(roleCycle, target.getAttribute("role"));
                 target.setAttribute("role", nextValue);
                 this.updateTooltip(target);
             }
         } else if (target.className == "status-icon") {
             if (target.getAttribute("disabled") != "true") {
                 const statusCycle = ["ACCEPTED", "DECLINED", "TENTATIVE"];
--- a/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
@@ -773,32 +773,35 @@ function changeOrderForElements(aPropKey
         Components.utils.reportError(msg + " " + ex);
         return;
     }
 
     // Add elements in the right order, removing them from their old parent
     for (let i = 0; i < aPropParams.length; i++) {
         let newEl = document.getElementById(localeOrder[i]);
         if (newEl) {
-            parents[i].appendChild(newEl.parentNode.removeChild(newEl));
+            parents[i].appendChild(newEl);
         } else {
             cal.ERROR("Localization error, could not find node '" + localeOrder[i] + "'. Please have your localizer check the string '" + aPropKey + "'");
         }
     }
 }
 
 /**
  * Change locale-specific widget order for Edit Recurrence window
  */
 function changeWidgetsOrder() {
-    changeOrderForElements("monthlyOrder",
-                           ["monthly-ordinal",
-                            "monthly-weekday"]);
-    changeOrderForElements("yearlyOrder",
-                           ["yearly-days",
-                            "yearly-period-of-month-label",
-                            "yearly-month-ordinal"]);
-    changeOrderForElements("yearlyOrder2",
-                           ["yearly-ordinal",
-                            "yearly-weekday",
-                            "yearly-period-of-label",
-                            "yearly-month-rule"]);
+    changeOrderForElements("monthlyOrder", [
+        "monthly-ordinal",
+        "monthly-weekday"
+    ]);
+    changeOrderForElements("yearlyOrder", [
+        "yearly-days",
+        "yearly-period-of-month-label",
+        "yearly-month-ordinal"
+    ]);
+    changeOrderForElements("yearlyOrder2", [
+        "yearly-ordinal",
+        "yearly-weekday",
+        "yearly-period-of-label",
+        "yearly-month-rule"
+    ]);
 }
--- a/calendar/base/content/dialogs/calendar-summary-dialog.js
+++ b/calendar/base/content/dialogs/calendar-summary-dialog.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* exported onLoad, onAccept, onCancel, updatePartStat, browseDocument,
- *          sendMailToOrganizer
+ *          sendMailToOrganizer, openAttachment
  */
 
 Components.utils.import("resource://calendar/modules/calUtils.jsm");
 Components.utils.import("resource://calendar/modules/calItipUtils.jsm");
 Components.utils.import("resource://calendar/modules/calAlarmUtils.jsm");
 Components.utils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
 
 /**
--- a/calendar/base/content/import-export.js
+++ b/calendar/base/content/import-export.js
@@ -108,24 +108,21 @@ function loadEventsFromFile(aCalendar) {
         if (aCalendar) {
             putItemsIntoCal(aCalendar, items);
             return;
         }
 
         let calendars = cal.getCalendarManager().getCalendars({});
         calendars = calendars.filter(cal.isCalendarWritable);
 
-        if (calendars.length < 1) {
-            // XXX alert something?
-            return;
-        } else if (calendars.length == 1) {
+        if (calendars.length == 1) {
             // There's only one calendar, so it's silly to ask what calendar
             // the user wants to import into.
             putItemsIntoCal(calendars[0], items, filePath);
-        } else {
+        } else if (calendars.length > 1) {
             // Ask what calendar to import into
             let args = {};
             args.onOk = (aCal) => { putItemsIntoCal(aCal, items, filePath); };
             args.calendars = calendars;
             args.promptText = cal.calGetString("calendar", "importPrompt");
             openDialog("chrome://calendar/content/chooseCalendarDialog.xul",
                        "_blank", "chrome,titlebar,modal,resizable", args);
         }
--- a/calendar/base/content/preferences/alarms.js
+++ b/calendar/base/content/preferences/alarms.js
@@ -118,21 +118,22 @@ 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() {
-        let alarmsPlaySoundPref =
-            document.getElementById("calendar.alarms.playsound");
+        let alarmsPlaySoundPref = document.getElementById("calendar.alarms.playsound");
 
-        let items = [document.getElementById("alarmSoundFileField"),
-                     document.getElementById("calendar.prefs.alarm.sound.useDefault"),
-                     document.getElementById("calendar.prefs.alarm.sound.browse"),
-                     document.getElementById("calendar.prefs.alarm.sound.play")];
+        let items = [
+            document.getElementById("alarmSoundFileField"),
+            document.getElementById("calendar.prefs.alarm.sound.useDefault"),
+            document.getElementById("calendar.prefs.alarm.sound.browse"),
+            document.getElementById("calendar.prefs.alarm.sound.play")
+        ];
 
-        for (let i = 0; i < items.length; i++) {
-            items[i].disabled = !alarmsPlaySoundPref.value;
+        for (let item of items) {
+            item.disabled = !alarmsPlaySoundPref.value;
         }
     }
 };
--- a/calendar/base/content/today-pane.js
+++ b/calendar/base/content/today-pane.js
@@ -20,42 +20,44 @@ var TodayPane = {
         distance: 0,
         session: false
     },
 
     /**
      * Load Handler, sets up the today pane controls.
      */
     onLoad: function() {
-        TodayPane.paneViews = [cal.calGetString("calendar", "eventsandtasks"),
-                               cal.calGetString("calendar", "tasksonly"),
-                               cal.calGetString("calendar", "eventsonly")];
+        TodayPane.paneViews = [
+            cal.calGetString("calendar", "eventsandtasks"),
+            cal.calGetString("calendar", "tasksonly"),
+            cal.calGetString("calendar", "eventsonly")
+        ];
         agendaListbox.setupCalendar();
         TodayPane.initializeMiniday();
         TodayPane.setShortWeekdays();
 
-        document.getElementById("modeBroadcaster").addEventListener("DOMAttrModified", TodayPane.onModeModified, false);
+        document.getElementById("modeBroadcaster").addEventListener("DOMAttrModified", TodayPane.onModeModified);
         TodayPane.setTodayHeader();
 
-        document.getElementById("today-splitter").addEventListener("command", onCalendarViewResize, false);
+        document.getElementById("today-splitter").addEventListener("command", onCalendarViewResize);
         TodayPane.updateSplitterState();
         TodayPane.previousMode = document.getElementById("modeBroadcaster").getAttribute("mode");
         TodayPane.showTodayPaneStatusLabel();
         // Workaround for bug 1360914. For unknown reasons, setTodayHeader() sets
         // the selectedIndex of the "monthNameContainer" deck to a wrong value so
         // the miniday needs to be initialized again.
         TodayPane.initializeMiniday();
     },
 
     /**
      * Unload handler, cleans up the today pane on window unload.
      */
     onUnload: function() {
-        document.getElementById("modeBroadcaster").removeEventListener("DOMAttrModified", TodayPane.onModeModified, false);
-        document.getElementById("today-splitter").removeEventListener("command", onCalendarViewResize, false);
+        document.getElementById("modeBroadcaster").removeEventListener("DOMAttrModified", TodayPane.onModeModified);
+        document.getElementById("today-splitter").removeEventListener("command", onCalendarViewResize);
     },
 
     /**
      * Sets up the label for the switcher that allows switching between today pane
      * views. (event+task, task only, event only)
      */
     setTodayHeader: function() {
         let currentMode = document.getElementById("modeBroadcaster").getAttribute("mode");
@@ -145,23 +147,23 @@ var TodayPane = {
     onMousedown: function(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, false);
-            element.addEventListener("mouseup", TodayPane.stopSwitching, false);
+            element.addEventListener("mouseout", TodayPane.stopSwitching);
+            element.addEventListener("mouseup", TodayPane.stopSwitching);
             TodayPane.minidayTimer = setTimeout(TodayPane.updateAdvanceTimer.bind(TodayPane, Event, aDir), 500);
         } else if (element.id == "datevalue-label") {
             // Start switching days by dragging the mouse with a starting point on the day label
-            window.addEventListener("mousemove", TodayPane.onMousemove, false);
-            window.addEventListener("mouseup", TodayPane.stopSwitching, false);
+            window.addEventListener("mousemove", TodayPane.onMousemove);
+            window.addEventListener("mouseup", TodayPane.stopSwitching);
             TodayPane.minidayDrag.startX = aEvent.clientX;
             TodayPane.minidayDrag.startY = aEvent.clientY;
         }
     },
 
     /**
      * Figure out the mouse distance from the center of the day's label
      * to the current position.
@@ -177,17 +179,17 @@ var TodayPane = {
                 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;
             } else {
                 TodayPane.minidayDrag.distance = 0;
             }
         } else if (x * x + y * y > 9) {
             // move the mouse a bit before starting the drag session
-            window.addEventListener("mouseout", TodayPane.stopSwitching, false);
+            window.addEventListener("mouseout", TodayPane.stopSwitching);
             TodayPane.minidayDrag.session = true;
             let dragCenterImage = document.getElementById("dragCenter-image");
             dragCenterImage.removeAttribute("hidden");
             // Move the starting point in the center so we have a fixed
             // point where stopping the day switching while still dragging
             let centerObj = dragCenterImage.boxObject;
             TodayPane.minidayDrag.startX = Math.floor(centerObj.x + centerObj.width / 2);
             TodayPane.minidayDrag.startY = Math.floor(centerObj.y + centerObj.height / 2);
@@ -249,26 +251,26 @@ var TodayPane = {
                 let dir = element.getAttribute("dir");
                 TodayPane.advance(parseInt(dir, 10));
             }
         }
         if (element.id == "previous-day-button" ||
              element.id == "next-day-button") {
             TodayPane.switchCounter = 0;
             let button = document.getElementById(element.id);
-            button.removeEventListener("mouseout", TodayPane.stopSwitching, false);
+            button.removeEventListener("mouseout", TodayPane.stopSwitching);
         }
         if (TodayPane.minidayDrag.session) {
-            window.removeEventListener("mouseout", TodayPane.stopSwitching, false);
+            window.removeEventListener("mouseout", TodayPane.stopSwitching);
             TodayPane.minidayDrag.distance = 0;
             document.getElementById("dragCenter-image").setAttribute("hidden", "true");
             TodayPane.minidayDrag.session = false;
         }
-        window.removeEventListener("mousemove", TodayPane.onMousemove, false);
-        window.removeEventListener("mouseup", TodayPane.stopSwitching, false);
+        window.removeEventListener("mousemove", TodayPane.onMousemove);
+        window.removeEventListener("mouseup", TodayPane.stopSwitching);
     },
 
     /**
      * Helper function to set the month description on the today pane header.
      *
      * @param aMonthLabel       The XUL node to set the month label on.
      * @param aIndex            The month number, 0-based.
      * @param aYear             The year this month should be displayed with
--- a/calendar/base/content/widgets/calendar-list-tree.xml
+++ b/calendar/base/content/widgets/calendar-list-tree.xml
@@ -90,18 +90,20 @@
               // enabled/disabled.
               document.commandDispatcher.updateCommands("calendar_commands");
           }
       })
       ]]></field>
       <field name="compositeObserver"><![CDATA[
       ({
           listTree: this,
-          QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calICompositeObserver,
-                                                 Components.interfaces.calIObserver]),
+          QueryInterface: XPCOMUtils.generateQI([
+              Components.interfaces.calICompositeObserver,
+              Components.interfaces.calIObserver
+          ]),
 
           // calICompositeObserver
           onCalendarAdded: function(aCalendar) {
               // Make sure the checkbox state is updated
               this.listTree.updateCalendar(aCalendar);
           },
 
           onCalendarRemoved: function(aCalendar) {
--- a/calendar/base/content/widgets/minimonth.xml
+++ b/calendar/base/content/widgets/minimonth.xml
@@ -467,17 +467,17 @@
         Components.utils.import("resource://gre/modules/Services.jsm");
 
         if (this.mObservesComposite == true) {
             cal.getCompositeCalendar(window).removeObserver(this);
         }
 
         // Remove pref observer
         let branch = Services.prefs.getBranch("");
-        branch.removeObserver("calendar.", this, false);
+        branch.removeObserver("calendar.", this);
       ]]></destructor>
 
       <!-- calIOperationListener methods -->
       <method name="onOperationComplete">
         <parameter name="aCalendar"/>
         <parameter name="aStatus"/>
         <parameter name="aOperationType"/>
         <parameter name="aId"/>
--- a/calendar/base/modules/calAlarmUtils.jsm
+++ b/calendar/base/modules/calAlarmUtils.jsm
@@ -69,24 +69,22 @@ cal.alarms = {
                 // 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.calendarDefaultTimezone();
                     // 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.calendarDefaultTimezone();
+                    returnDate = returnDate.getInTimezone(timezone);
                 } else {
-                    if (returnDate.timezone.tzid == "floating") {
-                        let timezone = cal.calendarDefaultTimezone();
-                        returnDate = returnDate.getInTimezone(timezone);
-                    } else {
-                        // Clone the date to correctly add the duration.
-                        returnDate = returnDate.clone();
-                    }
+                    // Clone the date to correctly add the duration.
+                    returnDate = returnDate.clone();
                 }
 
                 returnDate.addDuration(aAlarm.offset);
                 return returnDate;
             }
         }
         return null;
     },
--- a/calendar/base/modules/calExtract.jsm
+++ b/calendar/base/modules/calExtract.jsm
@@ -183,17 +183,17 @@ Extractor.prototype = {
                 } else {
                     cal.LOG("[calExtract] Dictionary present, rules missing: " + dicts[dict]);
                     continue;
                 }
 
                 let correct = 0;
                 let total = 0;
                 for (let word in words) {
-                    words[word] = words[word].replace(/[()\d,;:?!#\.]/g, "");
+                    words[word] = words[word].replace(/[()\d,;:?!#.]/g, "");
                     if (words[word].length >= 2) {
                         total++;
                         if (spellchecker.check(words[word])) {
                             correct++;
                         }
                     }
                 }
 
@@ -356,18 +356,18 @@ Extractor.prototype = {
         }
         this.markContained();
         this.collected = this.collected.sort(this.sort);
 
         return this.collected;
     },
 
     extractDayMonthYear: function(pattern, relation) {
-        let alts = this.getRepPatterns(pattern, ["(\\d{1,2})", "(\\d{1,2})",
-                                                 "(\\d{2,4})"]);
+        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) {
                 if (!this.limitNums(res, this.email) && !this.limitChars(res, this.email)) {
                     let day = parseInt(res[positions[1]], 10);
@@ -381,19 +381,20 @@ Extractor.prototype = {
                                    rev.start, rev.end, rev.pattern, rev.relation, pattern);
                     }
                 }
             }
         }
     },
 
     extractDayMonthNameYear: function(pattern, relation) {
-        let alts = this.getRepPatterns(pattern, ["(\\d{1,2})",
-                                                 "(" + this.allMonths + ")",
-                                                 "(\\d{2,4})"]);
+        let alts = this.getRepPatterns(pattern, [
+            "(\\d{1,2})", "(" + this.allMonths + ")", "(\\d{2,4})"
+        ]);
+
         let res;
         for (let alt in alts) {
             let exp = alts[alt].pattern.split(this.marker).join("|");
             let positions = alts[alt].positions;
             let re = new RegExp(exp, "ig");
 
             while ((res = re.exec(this.email)) != null) {
                 if (!this.limitNums(res, this.email) && !this.limitChars(res, this.email)) {
@@ -426,19 +427,20 @@ Extractor.prototype = {
                 this.guess(item.getFullYear(), item.getMonth() + 1, item.getDate(),
                            null, null,
                            rev.start, rev.end, rev.pattern, rev.relation, pattern);
             }
         }
     },
 
     extractDayMonthName: function(pattern, relation) {
-        let alts = this.getRepPatterns(pattern,
-                                       ["(\\d{1,2}" + this.marker + this.dailyNumbers + ")",
-                                       "(" + this.allMonths + ")"]);
+        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;
             let re = new RegExp(exp, "ig");
 
             while ((res = re.exec(this.email)) != null) {
                 if (!this.limitNums(res, this.email) && !this.limitChars(res, this.email)) {
@@ -1286,11 +1288,11 @@ Extractor.prototype = {
         this.collected.push(dateGuess);
     },
 
     sanitize: function(str) {
         return str.replace(/[-[\]{}()*+?.,\\^$]/g, "\\$&");
     },
 
     unescape: function(str) {
-        return str.replace(/\\([\.])/g, "$1");
+        return str.replace(/\\([.])/g, "$1");
     }
 };
--- a/calendar/base/modules/calItipUtils.jsm
+++ b/calendar/base/modules/calItipUtils.jsm
@@ -274,18 +274,18 @@ cal.itip = {
         let imipLabel = null;
         if (itipItem.receivedMethod) {
             imipLabel = cal.itip.getMethodText(itipItem.receivedMethod);
         }
         let data = { label: imipLabel, buttons: [], hideMenuItems: [] };
 
         let disallowedCounter = false;
         if (foundItems && foundItems.length) {
-             let disallow = foundItems[0].getProperty("X-MICROSOFT-DISALLOW-COUNTER");
-             disallowedCounter = disallow && disallow == "TRUE";
+            let disallow = foundItems[0].getProperty("X-MICROSOFT-DISALLOW-COUNTER");
+            disallowedCounter = disallow && disallow == "TRUE";
         }
         if (rc == Components.interfaces.calIErrors.CAL_IS_READONLY) {
             // No writable calendars, tell the user about it
             data.label = _gs("imipBarNotWritable");
         } else if (Components.isSuccessCode(rc) && !actionFunc) {
             // This case, they clicked on an old message that has already been
             // added/updated, we want to tell them that.
             data.label = _gs("imipBarAlreadyProcessedText");
@@ -297,17 +297,16 @@ cal.itip = {
                     } else {
                         let comparison;
                         for (let item of itipItem.getItemList({})) {
                             let attendees = cal.getAttendeesBySender(
                                     item.getAttendees({}),
                                     itipItem.sender
                             );
                             if (attendees.length == 1) {
-                                let replyer = foundItems[0].getAttendeeById(attendees[0].id);
                                 comparison = cal.itip.compareSequence(item, foundItems[0]);
                                 if (comparison == 1) {
                                     data.label = _gs("imipBarCounterErrorText");
                                     break;
                                 } else if (comparison == -1) {
                                     data.label = _gs("imipBarCounterPreviousVersionText");
                                 }
                             }
@@ -959,16 +958,17 @@ cal.itip = {
      * @param aMethod iTIP method
      * @param aRecipientsList an array of calIAttendee objects the message should be sent to
      * @param aAutoResponse an inout object whether the transport should ask before sending
      */
     sendDeclineCounterMessage: function(aItem, aMethod, aRecipientsList, aAutoResponse) {
         if (aMethod == "DECLINECOUNTER") {
             return sendMessage(aItem, aMethod, aRecipientsList, aAutoResponse);
         }
+        return false;
     }
 };
 
 /** local to this module file
  * Sets the received info either on the passed attendee or item object.
  *
  * @param item either  calIAttendee or calIItemBase
  * @param itipItemItem received iTIP item
--- a/calendar/base/modules/calRecurrenceUtils.jsm
+++ b/calendar/base/modules/calRecurrenceUtils.jsm
@@ -49,26 +49,22 @@ function recurrenceRule2String(recurrenc
     // Retrieve a valid recurrence rule from the currently
     // set recurrence info. Bail out if there's more
     // than a single rule or something other than a rule.
     recurrenceInfo = recurrenceInfo.clone();
     let rrules = splitRecurrenceRules(recurrenceInfo);
     if (rrules[0].length == 1) {
         let rule = cal.wrapInstance(rrules[0][0], Components.interfaces.calIRecurrenceRule);
         // Currently we allow only for BYDAY, BYMONTHDAY, BYMONTH rules.
-        if (rule &&
-            !checkRecurrenceRule(rule, ["BYSECOND",
-                                        "BYMINUTE",
-                                        // "BYDAY",
-                                        "BYHOUR",
-                                        // "BYMONTHDAY",
-                                        "BYYEARDAY",
-                                        "BYWEEKNO",
-                                        // "BYMONTH",
-                                        "BYSETPOS"])) {
+        let byparts = [
+            "BYSECOND", "BYMINUTE", /* "BYDAY", */ "BYHOUR", /* "BYMONTHDAY", */
+            "BYYEARDAY", "BYWEEKNO", /* "BYMONTH", */ "BYSETPOS"
+        ];
+
+        if (rule && !checkRecurrenceRule(rule, byparts)) {
             let dateFormatter = cal.getDateFormatter();
             let ruleString;
             if (rule.type == "DAILY") {
                 if (checkRecurrenceRule(rule, ["BYDAY"])) {
                     let days = rule.getComponent("BYDAY", {});
                     let weekdays = [2, 3, 4, 5, 6];
                     if (weekdays.length == days.length) {
                         let i;
@@ -312,57 +308,64 @@ function recurrenceRule2String(recurrenc
             }
 
             let kDefaultTimezone = cal.calendarDefaultTimezone();
 
             let detailsString;
             if (!endDate || allDay) {
                 if (rule.isFinite) {
                     if (rule.isByCount) {
-                        let countString = getRString("repeatCountAllDay",
-                            [ruleString,
-                             dateFormatter.formatDateShort(startDate)]);
+                        let countString = getRString("repeatCountAllDay", [
+                            ruleString,
+                            dateFormatter.formatDateShort(startDate)
+                        ]);
+
                         detailsString = PluralForm.get(rule.count, countString)
                                                   .replace("#3", rule.count);
                     } else {
                         let untilDate = rule.untilDate.getInTimezone(kDefaultTimezone);
-                        detailsString = getRString("repeatDetailsUntilAllDay",
-                            [ruleString,
-                             dateFormatter.formatDateShort(startDate),
-                             dateFormatter.formatDateShort(untilDate)]);
+                        detailsString = getRString("repeatDetailsUntilAllDay", [
+                            ruleString,
+                            dateFormatter.formatDateShort(startDate),
+                            dateFormatter.formatDateShort(untilDate)
+                        ]);
                     }
                 } else {
-                    detailsString = getRString("repeatDetailsInfiniteAllDay",
-                                               [ruleString,
-                                                dateFormatter.formatDateShort(startDate)]);
+                    detailsString = getRString("repeatDetailsInfiniteAllDay", [
+                        ruleString,
+                        dateFormatter.formatDateShort(startDate)
+                    ]);
                 }
             } else if (rule.isFinite) {
                 if (rule.isByCount) {
-                    let countString = getRString("repeatCount",
-                        [ruleString,
-                         dateFormatter.formatDateShort(startDate),
-                         dateFormatter.formatTime(startDate),
-                         dateFormatter.formatTime(endDate)]);
+                    let countString = getRString("repeatCount", [
+                        ruleString,
+                        dateFormatter.formatDateShort(startDate),
+                        dateFormatter.formatTime(startDate),
+                        dateFormatter.formatTime(endDate)
+                    ]);
                     detailsString = PluralForm.get(rule.count, countString)
                                               .replace("#5", rule.count);
                 } else {
                     let untilDate = rule.untilDate.getInTimezone(kDefaultTimezone);
-                    detailsString = getRString("repeatDetailsUntil",
-                        [ruleString,
-                         dateFormatter.formatDateShort(startDate),
-                         dateFormatter.formatDateShort(untilDate),
-                         dateFormatter.formatTime(startDate),
-                         dateFormatter.formatTime(endDate)]);
+                    detailsString = getRString("repeatDetailsUntil", [
+                        ruleString,
+                        dateFormatter.formatDateShort(startDate),
+                        dateFormatter.formatDateShort(untilDate),
+                        dateFormatter.formatTime(startDate),
+                        dateFormatter.formatTime(endDate)
+                    ]);
                 }
             } else {
-                detailsString = getRString("repeatDetailsInfinite",
-                    [ruleString,
-                     dateFormatter.formatDateShort(startDate),
-                     dateFormatter.formatTime(startDate),
-                     dateFormatter.formatTime(endDate)]);
+                detailsString = getRString("repeatDetailsInfinite", [
+                    ruleString,
+                    dateFormatter.formatDateShort(startDate),
+                    dateFormatter.formatTime(startDate),
+                    dateFormatter.formatTime(endDate)
+                ]);
             }
             return detailsString;
         }
     }
     return null;
 }
 
 /**
--- a/calendar/base/modules/calUtils.jsm
+++ b/calendar/base/modules/calUtils.jsm
@@ -144,30 +144,36 @@ var cal = {
      *  - calIOperationListener
      *  - calICompositeObserver
      */
     createAdapter: function(iface, template) {
         let methods;
         let adapter = template || {};
         switch (iface.name || iface) {
             case "calIObserver":
-                methods = ["onStartBatch", "onEndBatch", "onLoad", "onAddItem",
-                           "onModifyItem", "onDeleteItem", "onError",
-                           "onPropertyChanged", "onPropertyDeleting"];
+                methods = [
+                    "onStartBatch", "onEndBatch", "onLoad", "onAddItem",
+                    "onModifyItem", "onDeleteItem", "onError",
+                    "onPropertyChanged", "onPropertyDeleting"
+                ];
                 break;
             case "calICalendarManagerObserver":
-                methods = ["onCalendarRegistered", "onCalendarUnregistering",
-                           "onCalendarDeleting"];
+                methods = [
+                    "onCalendarRegistered", "onCalendarUnregistering",
+                    "onCalendarDeleting"
+                ];
                 break;
             case "calIOperationListener":
                 methods = ["onGetResult", "onOperationComplete"];
                 break;
             case "calICompositeObserver":
-                methods = ["onCalendarAdded", "onCalendarRemoved",
-                           "onDefaultCalendarChanged"];
+                methods = [
+                    "onCalendarAdded", "onCalendarRemoved",
+                    "onDefaultCalendarChanged"
+                ];
                 break;
             default:
                 methods = [];
                 break;
         }
 
         for (let method of methods) {
             if (!(method in template)) {
@@ -329,17 +335,17 @@ var cal = {
                 if (parts[2] == " <>") {
                     // CN but no email address - we keep the CN part to prefix the next member's CN
                     prefix = parts[1];
                 } else {
                     // CN with email address
                     let commonName = parts[1].trim();
                     // in case of any special characters in the CN string, we make sure to enclose
                     // it with dquotes - simple spaces don't require dquotes
-                    if (commonName.match(/[\-\[\]{}()*+?.,;\\\^$|#\f\n\r\t\v]/)) {
+                    if (commonName.match(/[-[\]{}()*+?.,;\\^$|#\f\n\r\t\v]/)) {
                         commonName = '"' + commonName.replace(/\\"|"/, "").trim() + '"';
                     }
                     list.push(commonName + parts[2]);
                     prefix = "";
                 }
             } else if (member.length) {
                 // email address only
                 list.push(member);
--- a/calendar/base/src/calAlarm.js
+++ b/calendar/base/src/calAlarm.js
@@ -60,20 +60,22 @@ calAlarm.prototype = {
         return !this.mImmutable;
     },
 
     makeImmutable: function() {
         if (this.mImmutable) {
             return;
         }
 
-        const objectMembers = ["mAbsoluteDate",
-                               "mOffset",
-                               "mDuration",
-                               "mLastAck"];
+        const objectMembers = [
+            "mAbsoluteDate",
+            "mOffset",
+            "mDuration",
+            "mLastAck"
+        ];
         for (let member of objectMembers) {
             if (this[member] && this[member].isMutable) {
                 this[member].makeImmutable();
             }
         }
 
         // Properties
         let e = this.mProperties.enumerator;
@@ -90,29 +92,32 @@ calAlarm.prototype = {
         this.mImmutable = true;
     },
 
     clone: function() {
         let cloned = new calAlarm();
 
         cloned.mImmutable = false;
 
-        const simpleMembers = ["mAction",
-                               "mSummary",
-                               "mDescription",
-                               "mRelated",
-                               "mRepeat"];
+        const simpleMembers = [
+            "mAction",
+            "mSummary",
+            "mDescription",
+            "mRelated",
+            "mRepeat"
+        ];
 
-        const arrayMembers = ["mAttendees",
-                              "mAttachments"];
+        const arrayMembers = ["mAttendees", "mAttachments"];
 
-        const objectMembers = ["mAbsoluteDate",
-                               "mOffset",
-                               "mDuration",
-                               "mLastAck"];
+        const objectMembers = [
+            "mAbsoluteDate",
+            "mOffset",
+            "mDuration",
+            "mLastAck"
+        ];
 
         for (let member of simpleMembers) {
             cloned[member] = this[member];
         }
 
         for (let member of arrayMembers) {
             let newArray = [];
             for (let oldElem of this[member]) {
--- a/calendar/base/src/calAttendee.js
+++ b/calendar/base/src/calAttendee.js
@@ -38,18 +38,20 @@ calAttendee.prototype = {
 
     clone: function() {
         let a = new calAttendee();
 
         if (this.mIsOrganizer) {
             a.isOrganizer = true;
         }
 
-        const allProps = ["id", "commonName", "rsvp", "role",
-                          "participationStatus", "userType"];
+        const allProps = [
+            "id", "commonName", "rsvp", "role",
+            "participationStatus", "userType"
+        ];
         for (let prop of allProps) {
             a[prop] = this[prop];
         }
 
         for (let [key, value] of this.mProperties) {
             a.setProperty(key, value);
         }
 
--- a/calendar/base/src/calCachedCalendar.js
+++ b/calendar/base/src/calCachedCalendar.js
@@ -871,15 +871,14 @@ calCachedCalendar.prototype = {
             };
         }
         functions.forEach(defineForwardFunction);
         getters.forEach(defineForwardGetter);
         gettersAndSetters.forEach(defineForwardGetterAndSetter);
     }
 
     defineForwards(calCachedCalendar.prototype, "mUncachedCalendar",
-                   ["setProperty", "deleteProperty",
-                    "isInvitation", "getInvitedAttendee", "canNotify"],
+                   ["setProperty", "deleteProperty", "isInvitation", "getInvitedAttendee", "canNotify"],
                    ["type", "aclManager", "aclEntry"],
                    ["id", "name", "uri", "readOnly"]);
     defineForwards(calCachedCalendar.prototype, "mCachedCalendar",
                    ["getItem", "getItems", "startBatch", "endBatch"], [], []);
 })();
--- a/calendar/base/src/calFilter.js
+++ b/calendar/base/src/calFilter.js
@@ -176,19 +176,21 @@ calFilter.prototype = {
     mToday: null,
     mTomorrow: null,
     mMaxIterations: 50,
 
     /**
      * Initializes the predefined filters.
      */
     initDefinedFilters: function() {
-        let filters = ["all", "notstarted", "overdue", "open", "completed", "throughcurrent",
-                       "throughtoday", "throughsevendays", "today", "thisCalendarMonth",
-                       "future", "current", "currentview"];
+        let filters = [
+            "all", "notstarted", "overdue", "open", "completed",
+            "throughcurrent", "throughtoday", "throughsevendays", "today",
+            "thisCalendarMonth", "future", "current", "currentview"
+        ];
         filters.forEach(function(filter) {
             if (!(filter in this.mDefinedFilters)) {
                 this.defineFilter(filter, this.getPreDefinedFilterProperties(filter));
             }
         }, this);
     },
 
     /**
--- a/calendar/base/src/calItemBase.js
+++ b/calendar/base/src/calItemBase.js
@@ -76,19 +76,21 @@ calItemBase.prototype = {
     },
 
     // readonly attribute AUTF8String hashId;
     get hashId() {
         if (this.mHashId === null) {
             let rid = this.recurrenceId;
             let calendar = this.calendar;
             // some unused delim character:
-            this.mHashId = [encodeURIComponent(this.id),
-                            rid ? rid.getInTimezone(cal.UTC()).icalString : "",
-                            calendar ? encodeURIComponent(calendar.id) : ""].join("#");
+            this.mHashId = [
+                encodeURIComponent(this.id),
+                rid ? rid.getInTimezone(cal.UTC()).icalString : "",
+                calendar ? encodeURIComponent(calendar.id) : ""
+            ].join("#");
         }
         return this.mHashId;
     },
 
     // attribute AUTF8String id;
     get id() {
         return this.getProperty("UID");
     },
--- a/calendar/base/src/calUtils.js
+++ b/calendar/base/src/calUtils.js
@@ -392,30 +392,32 @@ function setupDefaultCategories() {
  *
  * @param str           The string to hash into a color.
  * @return              The hashed color.
  */
 function 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", "#FFFFCC",
-                          "#99FF99", "#99FFFF", "#CCFFFF", "#CCCCFF", "#FFCCFF",
-                          "#CCCCCC", "#FF6666", "#FF9966", "#FFFF66", "#FFFF33",
-                          "#66FF99", "#33FFFF", "#66FFFF", "#9999FF", "#FF99FF",
-                          "#C0C0C0", "#FF0000", "#FF9900", "#FFCC66", "#FFFF00",
-                          "#33FF33", "#66CCCC", "#33CCFF", "#6666CC", "#CC66CC",
-                          "#999999", "#CC0000", "#FF6600", "#FFCC33", "#FFCC00",
-                          "#33CC00", "#00CCCC", "#3366FF", "#6633FF", "#CC33CC",
-                          "#666666", "#990000", "#CC6600", "#CC9933", "#999900",
-                          "#009900", "#339999", "#3333FF", "#6600CC", "#993399",
-                          "#333333", "#660000", "#993300", "#996633", "#666600",
-                          "#006600", "#336666", "#000099", "#333399", "#663366",
-                          "#000000", "#330000", "#663300", "#663333", "#333300",
-                          "#003300", "#003333", "#000066", "#330099", "#330033"];
+    const colorPalette = [
+        "#FFFFFF", "#FFCCCC", "#FFCC99", "#FFFF99", "#FFFFCC",
+        "#99FF99", "#99FFFF", "#CCFFFF", "#CCCCFF", "#FFCCFF",
+        "#CCCCCC", "#FF6666", "#FF9966", "#FFFF66", "#FFFF33",
+        "#66FF99", "#33FFFF", "#66FFFF", "#9999FF", "#FF99FF",
+        "#C0C0C0", "#FF0000", "#FF9900", "#FFCC66", "#FFFF00",
+        "#33FF33", "#66CCCC", "#33CCFF", "#6666CC", "#CC66CC",
+        "#999999", "#CC0000", "#FF6600", "#FFCC33", "#FFCC00",
+        "#33CC00", "#00CCCC", "#3366FF", "#6633FF", "#CC33CC",
+        "#666666", "#990000", "#CC6600", "#CC9933", "#999900",
+        "#009900", "#339999", "#3333FF", "#6600CC", "#993399",
+        "#333333", "#660000", "#993300", "#996633", "#666600",
+        "#006600", "#336666", "#000099", "#333399", "#663366",
+        "#000000", "#330000", "#663300", "#663333", "#333300",
+        "#003300", "#003333", "#000066", "#330099", "#330033"
+    ];
 
     let sum = Array.from(str || " ", e => e.charCodeAt(0)).reduce((a, b) => a + b);
     return colorPalette[sum % colorPalette.length];
 }
 
 /**
  * Convert categories string to list of category names.
  *
@@ -1420,19 +1422,20 @@ function calIterateEmailIdentities(func)
  * @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.
  */
 function compareItemContent(aFirstItem, aSecondItem, aIgnoreProps, aIgnoreParams) {
-    let ignoreProps = arr2hash(aIgnoreProps ||
-        ["SEQUENCE", "DTSTAMP", "LAST-MODIFIED", "X-MOZ-GENERATION", "X-MICROSOFT-DISALLOW-COUNTER",
-         "X-MOZ-SEND-INVITATIONS", "X-MOZ-SEND-INVITATIONS-UNDISCLOSED"]);
+    let ignoreProps = arr2hash(aIgnoreProps || [
+        "SEQUENCE", "DTSTAMP", "LAST-MODIFIED", "X-MOZ-GENERATION", "X-MICROSOFT-DISALLOW-COUNTER",
+        "X-MOZ-SEND-INVITATIONS", "X-MOZ-SEND-INVITATIONS-UNDISCLOSED"
+    ]);
 
     let ignoreParams = aIgnoreParams ||
         { ATTENDEE: ["CN"], ORGANIZER: ["CN"] };
     for (let x in ignoreParams) {
         ignoreParams[x] = arr2hash(ignoreParams[x]);
     }
 
     function arr2hash(arr) {
--- a/calendar/lightning/content/lightning-item-iframe.js
+++ b/calendar/lightning/content/lightning-item-iframe.js
@@ -4,17 +4,18 @@
 
 /* exported onEventDialogUnload, changeUndiscloseCheckboxStatus,
  *          toggleKeepDuration, dateTimeControls2State, onUpdateAllDay,
  *          openNewEvent, openNewTask, openNewMessage, openNewCardDialog,
  *          deleteAllAttachments, copyAttachment, attachmentLinkKeyPress,
  *          attachmentDblClick, attachmentClick, notifyUser,
  *          removeNotification, chooseRecentTimezone, showTimezonePopup,
  *          attendeeDblClick, attendeeClick, removeAttendee,
- *          removeAllAttendees, sendMailToUndecidedAttendees, checkUntilDate
+ *          removeAllAttendees, sendMailToUndecidedAttendees, checkUntilDate,
+ *          applyValues
  */
 
 Components.utils.import("resource://calendar/modules/calUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
 Components.utils.import("resource:///modules/mailServices.js");
 Components.utils.import("resource://gre/modules/PluralForm.jsm");
 Components.utils.import("resource://gre/modules/Preferences.jsm");
@@ -251,17 +252,17 @@ function receiveMessage(aEvent) {
     }
 }
 
 /**
  * Sets up the event dialog from the window arguments, also setting up all
  * dialog controls from the window's item.
  */
 function onLoad() {
-    window.addEventListener("message", receiveMessage, false);
+    window.addEventListener("message", receiveMessage);
 
     // first of all retrieve the array of
     // arguments this window has been called with.
     let args = window.arguments[0];
 
     intializeTabOrWindowVariables();
 
     // Needed so we can call switchToTab for the prompt about saving
@@ -1253,25 +1254,22 @@ function getRepeatTypeAndUntilDate(aItem
             } else {
                 rules.push(ritem);
             }
         }
         if (rules.length == 1) {
             let rule = cal.wrapInstance(rules[0], Components.interfaces.calIRecurrenceRule);
             if (rule) {
                 switch (rule.type) {
-                    case "DAILY":
-                        if (!checkRecurrenceRule(rule, ["BYSECOND",
-                                                        "BYMINUTE",
-                                                        "BYHOUR",
-                                                        "BYMONTHDAY",
-                                                        "BYYEARDAY",
-                                                        "BYWEEKNO",
-                                                        "BYMONTH",
-                                                        "BYSETPOS"])) {
+                    case "DAILY": {
+                        let byparts = [
+                            "BYSECOND", "BYMINUTE", "BYHOUR", "BYMONTHDAY",
+                            "BYYEARDAY", "BYWEEKNO", "BYMONTH", "BYSETPOS"
+                        ];
+                        if (!checkRecurrenceRule(rule, byparts)) {
                             let ruleComp = rule.getComponent("BYDAY", {});
                             if (rule.interval == 1) {
                                 if (ruleComp.length > 0) {
                                     if (ruleComp.length == 5) {
                                         let found = false;
                                         for (let i = 0; i < 5; i++) {
                                             if (ruleComp[i] != i + 2) {
                                                 found = true;
@@ -1285,66 +1283,61 @@ function getRepeatTypeAndUntilDate(aItem
                                     }
                                 } else if (!rule.isFinite || !rule.isByCount) {
                                     repeatType = "daily";
                                     updateUntilDate(rule);
                                 }
                             }
                         }
                         break;
-                    case "WEEKLY":
-                        if (!checkRecurrenceRule(rule, ["BYSECOND",
-                                                        "BYMINUTE",
-                                                        "BYDAY",
-                                                        "BYHOUR",
-                                                        "BYMONTHDAY",
-                                                        "BYYEARDAY",
-                                                        "BYWEEKNO",
-                                                        "BYMONTH",
-                                                        "BYSETPOS"])) {
-                            let weekType=["weekly", "bi.weekly"];
+                    }
+                    case "WEEKLY": {
+                        let byparts = [
+                            "BYSECOND", "BYMINUTE", "BYDAY", "BYHOUR",
+                            "BYMONTHDAY", "BYYEARDAY", "BYWEEKNO", "BYMONTH",
+                            "BYSETPOS"
+                        ];
+                        if (!checkRecurrenceRule(rule, byparts)) {
+                            let weekType = ["weekly", "bi.weekly"];
                             if ((rule.interval == 1 || rule.interval == 2) &&
                                 (!rule.isFinite || !rule.isByCount)) {
                                 repeatType = weekType[rule.interval - 1];
                                 updateUntilDate(rule);
                             }
                         }
                         break;
-                    case "MONTHLY":
-                        if (!checkRecurrenceRule(rule, ["BYSECOND",
-                                                        "BYMINUTE",
-                                                        "BYDAY",
-                                                        "BYHOUR",
-                                                        "BYMONTHDAY",
-                                                        "BYYEARDAY",
-                                                        "BYWEEKNO",
-                                                        "BYMONTH",
-                                                        "BYSETPOS"])) {
+                    }
+                    case "MONTHLY": {
+                        let byparts = [
+                            "BYSECOND", "BYMINUTE", "BYDAY", "BYHOUR",
+                            "BYMONTHDAY", "BYYEARDAY", "BYWEEKNO", "BYMONTH",
+                            "BYSETPOS"
+                        ];
+                        if (!checkRecurrenceRule(rule, byparts)) {
                             if (rule.interval == 1 && (!rule.isFinite || !rule.isByCount)) {
                                 repeatType = "monthly";
                                 updateUntilDate(rule);
                             }
                         }
                         break;
-                    case "YEARLY":
-                        if (!checkRecurrenceRule(rule, ["BYSECOND",
-                                                        "BYMINUTE",
-                                                        "BYDAY",
-                                                        "BYHOUR",
-                                                        "BYMONTHDAY",
-                                                        "BYYEARDAY",
-                                                        "BYWEEKNO",
-                                                        "BYMONTH",
-                                                        "BYSETPOS"])) {
+                    }
+                    case "YEARLY": {
+                        let byparts = [
+                            "BYSECOND", "BYMINUTE", "BYDAY", "BYHOUR",
+                            "BYMONTHDAY", "BYYEARDAY", "BYWEEKNO", "BYMONTH",
+                            "BYSETPOS"
+                        ];
+                        if (!checkRecurrenceRule(rule, byparts)) {
                             if (rule.interval == 1 && (!rule.isFinite || !rule.isByCount)) {
                                 repeatType = "yearly";
                                 updateUntilDate(rule);
                             }
                         }
                         break;
+                    }
                 }
             }
         }
     }
     return [repeatType, untilDate];
 }
 
 /**
@@ -3644,17 +3637,16 @@ function isAttendeeUndecided(aAttendee) 
  *
  * @param aEvent         The popupshowing event
  */
 function attendeeDblClick(aEvent) {
     // left mouse button
     if (aEvent.button == 0) {
         editAttendees();
     }
-    return;
 }
 
 /**
  * Event handler to set up the attendee-popup. This builds the popup menuitems.
  *
  * @param aEvent         The popupshowing event
  */
 function attendeeClick(aEvent) {
--- a/calendar/lightning/content/lightning-item-panel.js
+++ b/calendar/lightning/content/lightning-item-panel.js
@@ -3,16 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* exported onLoadLightningItemPanel, onAccept, onCancel, onCommandSave,
  *          onCommandDeleteItem, editAttendees, rotatePrivacy, editPrivacy,
  *          rotatePriority, editPriority, rotateStatus, editStatus,
  *          rotateShowTimeAs, editShowTimeAs, updateShowTimeAs, editToDoStatus,
  *          postponeTask, toggleTimezoneLinks, toggleLink, attachURL,
  *          onCommandViewToolbar, onCommandCustomize, attachFileByAccountKey,
+ *          onUnloadLightningItemPanel, openNewEvent, openNewTask,
+ *          openNewMessage, openNewCardDialog
  */
 
 // XXX Need to determine which of these we really need here.
 Components.utils.import("resource://calendar/modules/calUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
 Components.utils.import("resource:///modules/mailServices.js");
 Components.utils.import("resource://gre/modules/PluralForm.jsm");
@@ -146,17 +148,17 @@ function receiveMessage(aEvent) {
             break;
         }
         case "loadCloudProviders":
             loadCloudProviders(aEvent.data.items);
             break;
     }
 }
 
-window.addEventListener("message", receiveMessage, false);
+window.addEventListener("message", receiveMessage);
 
 /**
  * Send an asynchronous message to an iframe.  Additional properties of
  * aMessage are generally arguments that will be passed to the function
  * named in aMessage.command.  If aIframeId is omitted, the message will
  * be sent to the iframe of the current tab.
  *
  * @param {Object} aMessage          Contains the message being sent
@@ -176,24 +178,23 @@ function sendMessage(aMessage, aIframeId
  * window, or not if 'cancel' was clicked.  Requires sending and receiving
  * async messages from the iframes of all open item tabs.
  *
  * @param {boolean} aResponse  The response from the tab's iframe
  */
 function handleWindowClose(aResponse) {
     if (!aResponse) {
         // Cancel was clicked, just leave the window open. We're done.
-        return;
     } else if (gItemTabIdsCopy.length > 0) {
         // There are more unsaved changes in tabs to prompt the user about.
         let nextId = gItemTabIdsCopy.shift();
         sendMessage({ command: "closingWindowWithTabs", id: nextId }, nextId);
     } else {
         // Close the window, there are no more unsaved changes in tabs.
-        window.removeEventListener("close", windowCloseListener, false);
+        window.removeEventListener("close", windowCloseListener);
         window.close();
     }
 }
 
 /**
  * Listener function for window close.  We prevent the window from
  * closing, then for each open tab we prompt the user to save any
  * unsaved changes with handleWindowClose.
@@ -221,17 +222,17 @@ function onLoadLightningItemPanel(aIfram
     }
     if (gTabmail) {
         // tab case
         let iframeId = aIframeId || gTabmail.currentTabInfo.iframe.id;
         iframe = document.getElementById(iframeId);
         iframeSrc = aUrl;
 
         // Add a listener to detect close events, prompt user about saving changes.
-        window.addEventListener("close", windowCloseListener, false);
+        window.addEventListener("close", windowCloseListener);
     } else {
         // window dialog case
         iframe = document.createElement("iframe");
         iframeSrc = window.arguments[0].useNewItemUI
             ? "chrome://lightning/content/html-item-editing/lightning-item-iframe.html"
             : "chrome://lightning/content/lightning-item-iframe.xul";
 
         iframe.setAttribute("id", "lightning-item-panel-iframe");
@@ -730,23 +731,27 @@ function editStatus(aTarget) {
 
 /**
  * Update the dialog controls related to status.
  *
  * @param {Object} aArg         Contains the new status value
  * @param {string} aArg.status  The new status value
  */
 function updateStatus(aArg) {
-    const statusLabels = ["status-status-tentative-label",
-                          "status-status-confirmed-label",
-                          "status-status-cancelled-label"];
-    const commands = ["cmd_status_none",
-                      "cmd_status_tentative",
-                      "cmd_status_confirmed",
-                      "cmd_status_cancelled"];
+    const statusLabels = [
+        "status-status-tentative-label",
+        "status-status-confirmed-label",
+        "status-status-cancelled-label"
+    ];
+    const commands = [
+        "cmd_status_none",
+        "cmd_status_tentative",
+        "cmd_status_confirmed",
+        "cmd_status_cancelled"
+    ];
     let found = false;
     setBooleanAttribute("status-status", "collapsed", true);
     commands.forEach((aElement, aIndex, aArray) => {
         let node = document.getElementById(aElement);
         let matches = (node.getAttribute("value") == aArg.status);
         found = found || matches;
 
         node.setAttribute("checked", matches ? "true" : "false");
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -352,45 +352,44 @@ var calendarItemTabType = {
     }
 };
 
 window.addEventListener("load", (e) => {
     let tabmail = document.getElementById("tabmail");
     tabmail.registerTabType(calendarTabType);
     tabmail.registerTabType(calendarItemTabType);
     tabmail.registerTabMonitor(calendarTabMonitor);
-}, false);
+});
 
 
 function ltnOnLoad(event) {
     // Check if the binary component was loaded
     checkCalendarBinaryComponent();
 
     document.getElementById("calendarDisplayDeck")
             .addEventListener("select", LtnObserveDisplayDeckChange, true);
 
     // Take care of common initialization
     commonInitCalendar();
 
     // Add an unload function to the window so we don't leak any listeners
-    window.addEventListener("unload", ltnFinish, false);
+    window.addEventListener("unload", ltnFinish);
 
     // Set up invitations manager
     scheduleInvitationsUpdate(FIRST_DELAY_STARTUP);
     cal.getCalendarManager().addObserver(gInvitationsCalendarManagerObserver);
 
     let filter = document.getElementById("task-tree-filtergroup");
     filter.value = filter.value || "all";
     document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
     document.getElementById("modeBroadcaster").setAttribute("checked", "true");
 
     let mailContextPopup = document.getElementById("mailContext");
     if (mailContextPopup) {
-        mailContextPopup.addEventListener("popupshowing",
-                                          gCalSetupMailContext.popup, false);
+        mailContextPopup.addEventListener("popupshowing", gCalSetupMailContext.popup);
     }
 
     // Setup customizeDone handlers for our toolbars
     let toolbox = document.getElementById("calendar-toolbox");
     toolbox.customizeDone = function(aEvent) {
         MailToolboxCustomizeDone(aEvent, "CustomizeCalendarToolbar");
     };
     toolbox = document.getElementById("task-toolbox");
@@ -538,24 +537,27 @@ function ltnIntegrationCheck() {
 function refreshUIBits() {
     try {
         getMinimonth().refreshDisplay();
 
         // Refresh the current view and just allow the refresh for the others
         // views when will be displayed.
         let currView = currentView();
         currView.goToDay();
-        ["day-view",
-         "week-view",
-         "multiweek-view",
-         "month-view"].forEach((view) => {
-             if (view != currView.id) {
-                 document.getElementById(view).mToggleStatus = -1;
-             }
-         });
+        let views = [
+            "day-view",
+            "week-view",
+            "multiweek-view",
+            "month-view"
+        ];
+        for (let view of views) {
+            if (view != currView.id) {
+                document.getElementById(view).mToggleStatus = -1;
+            }
+        }
 
         if (!TodayPane.showsToday()) {
             TodayPane.setDay(cal.now());
         }
 
         // update the unifinder
         refreshEventTree();
 
@@ -625,18 +627,17 @@ function LtnObserveDisplayDeckChange(eve
 }
 
 function ltnFinish() {
     cal.getCalendarManager().removeObserver(gInvitationsCalendarManagerObserver);
 
     // Remove listener for mailContext.
     let mailContextPopup = document.getElementById("mailContext");
     if (mailContextPopup) {
-        mailContextPopup.removeEventListener("popupshowing",
-                                             gCalSetupMailContext.popup, false);
+        mailContextPopup.removeEventListener("popupshowing", gCalSetupMailContext.popup);
     }
 
     // Common finish steps
     commonFinishCalendar();
 }
 
 // == invitations link
 var FIRST_DELAY_STARTUP = 100;
--- a/calendar/lightning/modules/ltnInvitationUtils.jsm
+++ b/calendar/lightning/modules/ltnInvitationUtils.jsm
@@ -34,17 +34,17 @@ ltn.invitation = {
                     break;
                 case "CANCEL":
                     header = ltn.getString("lightning",
                                            "itipCancelBody",
                                            [organizerString, summary]);
                     break;
                 case "COUNTER":
                     // falls through
-                case "REPLY":
+                case "REPLY": {
                     let attendees = item.getAttendees({});
                     let sender = cal.getAttendeesBySender(attendees, aItipItem.sender);
                     if (sender.length == 1) {
                         if (aItipItem.responseMethod == "COUNTER") {
                             header = cal.calGetString("lightning",
                                                       "itipCounterBody",
                                                       [sender[0].toString(), summary],
                                                       "lightning");
@@ -55,16 +55,17 @@ ltn.invitation = {
                                                       statusString,
                                                       [sender[0].toString()],
                                                       "lightning");
                         }
                     } else {
                         header = "";
                     }
                     break;
+                }
                 case "DECLINECOUNTER":
                     header = ltn.getString("lightning",
                                            "itipDeclineCounterBody",
                                            [organizerString, summary]);
                     break;
             }
         }
 
@@ -406,18 +407,21 @@ ltn.invitation = {
                     }
                 }
             }
         }
         aOldDoc = cal.xml.parseString(aOldDoc);
         aNewDoc = cal.xml.parseString(aNewDoc);
         let doc = aNewDoc.cloneNode(true);
         // elements to consider for comparison
-        ["summary", "location", "when", "canceledOccurrences",
-         "modifiedOccurrences", "organizer", "attendee"].forEach(_compareElement);
+        let elements = [
+            "summary", "location", "when", "canceledOccurrences",
+            "modifiedOccurrences", "organizer", "attendee"
+        ];
+        elements.forEach(_compareElement);
         return cal.xml.serializeDOM(doc);
     },
 
     /**
      * Returns the header section for an invitation email.
      * @param   {String}         aMessageId  the message id to use for that email
      * @param   {nsIMsgIdentity} aIdentity   the identity to use for that email
      * @returns {String}                     the source code of the header section of the email
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.js
@@ -187,21 +187,23 @@ calDavCalendar.prototype = {
                 }
             } finally {
                 this.mOfflineStorage.endBatch();
             }
         }
     },
 
     get offlineCachedProperties() {
-        return ["mAuthScheme", "mAuthRealm", "mHasWebdavSyncSupport",
-                "mCtag", "mWebdavSyncToken", "mSupportedItemTypes",
-                "mPrincipalUrl", "mCalHomeSet",
-                "mShouldPollInbox", "hasAutoScheduling", "mHaveScheduling",
-                "mCalendarUserAddress", "mOutboxUrl", "hasFreeBusy"];
+        return [
+            "mAuthScheme", "mAuthRealm", "mHasWebdavSyncSupport", "mCtag",
+            "mWebdavSyncToken", "mSupportedItemTypes", "mPrincipalUrl",
+            "mCalHomeSet", "mShouldPollInbox", "hasAutoScheduling",
+            "mHaveScheduling", "mCalendarUserAddress", "mOutboxUrl",
+            "hasFreeBusy"
+        ];
     },
 
     get checkedServerInfo() {
         if (Services.io.offline) {
             return true;
         } else {
             return this.mCheckedServerInfo;
         }
@@ -2157,17 +2159,17 @@ calDavCalendar.prototype = {
                         "<C:schedule-outbox-URL/>" +
                     "</D:prop>" +
                 "</D:principal-property-search>";
             queryMethod = "REPORT";
             queryDepth = 1;
         }
 
         // We want a trailing slash, ensure it.
-        let nextNS = aNameSpaceList.pop().replace(/([^\/])$/, "$1/");
+        let nextNS = aNameSpaceList.pop().replace(/([^\/])$/, "$1/"); // eslint-disable-line no-useless-escape
         let requestUri = Services.io.newURI(this.calendarUri.prePath + this.ensureEncodedPath(nextNS));
 
         if (this.verboseLogging()) {
             cal.LOG("CalDAV: send: " + queryMethod + " " + requestUri.spec + "\n" + queryXml);
         }
 
         let streamListener = {};
         streamListener.onStreamComplete = function(aLoader, aContext, aStatus, aResultLength, aResult) {
@@ -2194,17 +2196,17 @@ calDavCalendar.prototype = {
             } catch (ex) {
                 cal.LOG("CalDAV: Could not parse multistatus response: " + ex + "\n" + str);
                 doesntSupportScheduling();
                 return;
             }
 
             let homeSets = caldavXPath(multistatus, "/D:multistatus/D:response/D:propstat/D:prop/C:calendar-home-set/D:href/text()");
             function homeSetMatches(homeSet) {
-                let normalized = homeSet.replace(/([^\/])$/, "$1/");
+                let normalized = homeSet.replace(/([^\/])$/, "$1/"); // eslint-disable-line no-useless-escape
                 let chs = self.mCalHomeSet;
                 return normalized == chs.path || normalized == chs.spec;
             }
             function createBoxUrl(path) {
                 let url = self.mUri.clone();
                 url.pathQueryRef = self.ensureDecodedPath(path);
                 // Make sure the uri has a / at the end, as we do with the calendarUri.
                 if (url.pathQueryRef.charAt(url.pathQueryRef.length - 1) != "/") {
--- a/calendar/providers/ics/calICSCalendar.js
+++ b/calendar/providers/ics/calICSCalendar.js
@@ -681,17 +681,16 @@ calICSCalendar.prototype = {
                 try {
                     file.remove(false);
                 } catch (ex) {
                     // This can fail because of some crappy code in
                     // nsIFile.  That's not the end of the world.  We can
                     // try to remove the file the next time around.
                 }
             }
-            return;
         }
 
         function purgeOldBackups() {
             // Enumerate files in the backupdir for expiry of old backups
             let dirEnum = backupDir.directoryEntries;
             let files = [];
             while (dirEnum.hasMoreElements()) {
                 let file = dirEnum.getNext().QueryInterface(Ci.nsIFile);
@@ -700,18 +699,16 @@ calICSCalendar.prototype = {
                 }
             }
 
             if (doDailyBackup) {
                 purgeBackupsByType(files, "day");
             } else {
                 purgeBackupsByType(files, "edit");
             }
-
-            return;
         }
 
         function copyToOverwriting(oldFile, newParentDir, newName) {
             try {
                 let newFile = newParentDir.clone();
                 newFile.append(newName);
 
                 if (newFile.exists()) {
@@ -815,20 +812,17 @@ calICSCalendar.prototype = {
         downloader.init(listener, backupFile);
         try {
             channel.asyncOpen(downloader, null);
         } catch (e) {
             // For local files, asyncOpen throws on new (calendar) files
             // No problem, go and upload something
             cal.ERROR("[calICSCalendar] Backup failed in asyncOpen:" + e);
             aCallback.call(this);
-            return;
         }
-
-        return;
     }
 };
 
 function calICSObserver(aCalendar) {
     this.mCalendar = aCalendar;
 }
 
 calICSObserver.prototype = {
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.js
@@ -277,21 +277,22 @@ calStorageCalendar.prototype = {
                 /**
                  * Helper function to migrate all tables from one id to the next
                  *
                  * @param db        The database to use
                  * @param newCalId  The new calendar id to set
                  * @param oldCalId  The old calendar id to look for
                  */
                 let migrateTables = function(db, newCalId, oldCalId) {
-                    for (let tbl of ["cal_alarms", "cal_attachments",
-                                     "cal_attendees", "cal_events",
-                                     "cal_metadata", "cal_properties",
-                                     "cal_recurrence", "cal_relations",
-                                     "cal_todos"]) {
+                    let tables = [
+                        "cal_alarms", "cal_attachments", "cal_attendees",
+                        "cal_events", "cal_metadata", "cal_properties",
+                        "cal_recurrence", "cal_relations", "cal_todos"
+                    ];
+                    for (let tbl of tables) {
                         let stmt;
                         try {
                             stmt = db.createStatement("UPDATE " + tbl +
                                                       "   SET cal_id = :cal_id" +
                                                       " WHERE cal_id = :old_cal_id");
                             stmt.params.cal_id = newCalId;
                             stmt.params.old_cal_id = oldCalId;
                             stmt.executeStep();
@@ -1384,20 +1385,21 @@ calStorageCalendar.prototype = {
             this.mDeleteMetaData = this.mDB.createStatement(
                 "DELETE FROM cal_metadata WHERE item_id = :item_id AND cal_id = :cal_id"
                 );
             this.mDeleteAlarms = this.mDB.createStatement(
                 "DELETE FROM cal_alarms WHERE item_id = :item_id AND cal_id = :cal_id"
                 );
 
             // These are only used when deleting an entire calendar
-            let extrasTables = ["cal_attendees", "cal_properties",
-                                "cal_recurrence", "cal_attachments",
-                                "cal_metadata", "cal_relations",
-                                "cal_alarms"];
+            let extrasTables = [
+                "cal_attendees", "cal_properties", "cal_recurrence",
+                "cal_attachments", "cal_metadata", "cal_relations",
+                "cal_alarms"
+            ];
 
             this.mDeleteEventExtras = [];
             this.mDeleteTodoExtras = [];
 
             for (let table in extrasTables) {
                 this.mDeleteEventExtras[table] = this.mDB.createStatement(
                     "DELETE FROM " + extrasTables[table] + " WHERE item_id IN" +
                     "  (SELECT id FROM cal_events WHERE cal_id = :cal_id)" +
--- a/calendar/providers/storage/calStorageUpgrade.jsm
+++ b/calendar/providers/storage/calStorageUpgrade.jsm
@@ -744,35 +744,39 @@ upgrade.v3 = function(db, version) { // 
 
     beginTransaction(db);
     try {
         copyTable(tbl, "cal_items", "cal_events", db, "item_type = 0");
         copyTable(tbl, "cal_items", "cal_todos", db, "item_type = 1");
 
         dropTable(tbl, "cal_items", db);
 
-        let removeEventCols = ["item_type",
-                               "item_type",
-                               "todo_entry",
-                               "todo_due",
-                               "todo_completed",
-                               "todo_complete",
-                               "alarm_id"];
+        let removeEventCols = [
+            "item_type",
+            "item_type",
+            "todo_entry",
+            "todo_due",
+            "todo_completed",
+            "todo_complete",
+            "alarm_id"
+        ];
         deleteColumns(tbl, "cal_events", removeEventCols, db);
 
         addColumn(tbl, "cal_events", "event_start_tz", "VARCHAR", db);
         addColumn(tbl, "cal_events", "event_end_tz", "VARCHAR", db);
         addColumn(tbl, "cal_events", "alarm_time", "INTEGER", db);
         addColumn(tbl, "cal_events", "alarm_time_tz", "VARCHAR", db);
 
-        let removeTodoCols = ["item_type",
-                              "event_start",
-                              "event_end",
-                              "event_stamp",
-                              "alarm_id"];
+        let removeTodoCols = [
+            "item_type",
+            "event_start",
+            "event_end",
+            "event_stamp",
+            "alarm_id"
+        ];
         deleteColumns(tbl, "cal_todos", removeTodoCols, db);
 
         addColumn(tbl, "cal_todos", "todo_entry_tz", "VARCHAR", db);
         addColumn(tbl, "cal_todos", "todo_due_tz", "VARCHAR", db);
         addColumn(tbl, "cal_todos", "todo_completed_tz", "VARCHAR", db);
         addColumn(tbl, "cal_todos", "alarm_time", "INTEGER", db);
         addColumn(tbl, "cal_todos", "alarm_time_tz", "VARCHAR", db);
 
@@ -851,34 +855,39 @@ upgrade.v5 = function(db, version) { // 
  * r=ctalbert,jminta p=lilmatt
  */
 upgrade.v6 = function(db, version) { // eslint-disable-line id-length
     let tbl = upgrade.v5(version < 5 && db, version);
     LOGdb(db, "Storage: Upgrading to v6");
 
     beginTransaction(db);
     try {
-        let eventCols = ["id", "title", "privacy", "ical_status",
-                         "recurrence_id_tz", "event_start_tz",
-                         "event_end_tz", "alarm_time_tz"];
+        let eventCols = [
+            "id", "title", "privacy", "ical_status", "recurrence_id_tz",
+            "event_start_tz", "event_end_tz", "alarm_time_tz"
+        ];
         alterTypes(tbl, "cal_events", eventCols, "TEXT", db);
 
-        let todoCols = ["id", "title", "privacy", "ical_status",
-                         "recurrence_id_tz", "todo_entry_tz",
-                         "todo_due_tz", "todo_completed_tz",
-                         "alarm_time_tz"];
+        let todoCols = [
+            "id", "title", "privacy", "ical_status", "recurrence_id_tz",
+            "todo_entry_tz", "todo_due_tz", "todo_completed_tz",
+            "alarm_time_tz"
+        ];
         alterTypes(tbl, "cal_todos", todoCols, "TEXT", db);
 
-        let attendeeCols = ["item_id", "recurrence_id_tz", "attendee_id",
-                            "common_name", "role", "status", "type"];
+        let attendeeCols = [
+            "item_id", "recurrence_id_tz", "attendee_id", "common_name",
+            "role", "status", "type"
+        ];
         alterTypes(tbl, "cal_attendees", attendeeCols, "TEXT", db);
 
-        let recurrenceCols = ["item_id", "recur_type", "dates", "second",
-                              "minute", "hour", "day", "monthday", "yearday",
-                              "weekno", "month", "setpos"];
+        let recurrenceCols = [
+            "item_id", "recur_type", "dates", "second", "minute", "hour",
+            "day", "monthday", "yearday", "weekno", "month", "setpos"
+        ];
         alterTypes(tbl, "cal_recurrence", recurrenceCols, "TEXT", db);
 
         let propertyCols = ["item_id", "recurrence_id_tz", "key"];
         alterTypes(tbl, "cal_properties", propertyCols, "TEXT", db);
         setDbVersionAndCommit(db, 6);
     } catch (e) {
         throw reportErrorAndRollback(db, e);
     }
@@ -1010,19 +1019,18 @@ upgrade.v13 = function(db, version) {
                     while (stmt.executeStep()) {
                         calIds[stmt.row.id] = stmt.row.cal_id;
                     }
                 } finally {
                     stmt.finalize();
                 }
             }
         }
-
-        for (let tblid of ["attendees", "recurrence", "properties",
-                           "attachments"]) {
+        let tables = ["attendees", "recurrence", "properties", "attachments"];
+        for (let tblid of tables) {
             addColumn(tbl, "cal_" + tblid, "cal_id", "INTEGER", db);
 
             for (let itemId in calIds) {
                 executeSimpleSQL(db, "UPDATE cal_" + tblid +
                                      "   SET cal_id = " + calIds[itemId] +
                                      " WHERE item_id = '" + itemId + "'");
             }
         }
@@ -1174,20 +1182,22 @@ upgrade.v16 = function(db, version) {
         executeSimpleSQL(db, "UPDATE cal_todos " +
                              "   SET flags = flags | " + CAL_ITEM_FLAG.HAS_ALARMS +
                              " WHERE id IN" +
                              "  (SELECT item_id " +
                              "     FROM cal_alarms " +
                              "     WHERE cal_alarms.cal_id = cal_todos.cal_id)");
 
         // Remote obsolete columns
-        let cols = ["alarm_time",
-                    "alarm_time_tz",
-                    "alarm_offset",
-                    "alarm_related"];
+        let cols = [
+            "alarm_time",
+            "alarm_time_tz",
+            "alarm_offset",
+            "alarm_related"
+        ];
         for (let tblid of ["events", "todos"]) {
             deleteColumns(tbl, "cal_" + tblid, cols, db);
         }
 
         setDbVersionAndCommit(db, 16);
     } catch (e) {
         throw reportErrorAndRollback(db, e);
     }
@@ -1314,22 +1324,23 @@ upgrade.v18 = function(db, version) {
  * events to be shown for multiple cached calendars
  * r=simon.at.orcl, p=philipp,dbo
  */
 upgrade.v19 = function(db, version) {
     let tbl = upgrade.v18(version < 18 && db, version);
     LOGdb(db, "Storage: Upgrading to v19");
     beginTransaction(db);
     try {
+        let tables = [
+            "cal_alarms", "cal_attachments", "cal_attendees", "cal_events",
+            "cal_metadata", "cal_properties", "cal_recurrence",
+            "cal_relations", "cal_todos"
+        ];
         // Change types of column to TEXT.
-        for (let tblName of ["cal_alarms", "cal_attachments",
-                             "cal_attendees", "cal_events",
-                             "cal_metadata", "cal_properties",
-                             "cal_recurrence", "cal_relations",
-                             "cal_todos"]) {
+        for (let tblName of tables) {
             alterTypes(tbl, tblName, ["cal_id"], "TEXT", db);
         }
         setDbVersionAndCommit(db, 19);
     } catch (e) {
         throw reportErrorAndRollback(db, e);
     }
 
     return tbl;
@@ -1512,19 +1523,20 @@ upgrade.v22 = function(db, version) {
                 } catch (e) {
                     // There are some attendees with a null ID. We are taking
                     // the opportunity to remove them here.
                     cal.ERROR("Error converting attendee, removing: " + e);
                     return null;
                 }
             }
         });
-        migrateToIcalString(tbl, "cal_attendees", "translateAttendee",
-                            ["attendee_id", "common_name", "rsvp", "role",
-                             "status", "type", "is_organizer", "properties"], db);
+        migrateToIcalString(tbl, "cal_attendees", "translateAttendee", [
+            "attendee_id", "common_name", "rsvp", "role", "status", "type",
+            "is_organizer", "properties"
+        ], db);
 
         // Update recurrence table to using icalString directly
         createFunction(db, "translateRecurrence", 17, {
             onFunctionCall: function(storArgs) {
                 function parseInt10(x) { return parseInt(x, 10); }
                 try {
                     // eslint-disable-next-line no-unused-vars
                     let [aIndex, aType, aIsNegative, aDates, aCount,
@@ -1605,20 +1617,20 @@ upgrade.v22 = function(db, version) {
                                  "WHERE e.id = cal_recurrence.item_id " +
                                    "AND e.cal_id = cal_recurrence.cal_id " +
                                  "UNION " +
                                 "SELECT t.flags " +
                                   "FROM cal_todos AS t " +
                                  "WHERE t.id = cal_recurrence.item_id " +
                                    "AND t.cal_id = cal_recurrence.cal_id)");
 
-        migrateToIcalString(tbl, "cal_recurrence", "translateRecurrence",
-                            ["recur_index", "recur_type", "is_negative",
-                             "dates", "count", "end_date", "interval", "second",
-                             "minute", "hour", "day", "monthday", "yearday",
-                             "weekno", "month", "setpos", "tmp_date_tz"], db);
+        migrateToIcalString(tbl, "cal_recurrence", "translateRecurrence", [
+            "recur_index", "recur_type", "is_negative", "dates", "count",
+            "end_date", "interval", "second", "minute", "hour", "day",
+            "monthday", "yearday", "weekno", "month", "setpos", "tmp_date_tz"
+        ], db);
 
         setDbVersionAndCommit(db, 22);
     } catch (e) {
         throw reportErrorAndRollback(db, e);
     }
     return tbl;
 };
--- a/calendar/providers/wcap/calWcapSession.js
+++ b/calendar/providers/wcap/calWcapSession.js
@@ -834,17 +834,17 @@ calWcapSession.prototype = {
         return alarmStart;
     },
 
     getDefaultAlarmEmails: function(out_count) {
         let ret = [];
         let alarmEmails = this.getUserPreferences("X-NSCP-WCAP-PREF-ceDefaultAlarmEmail");
         if (alarmEmails.length > 0 && alarmEmails[0].length > 0) {
             for (let email of alarmEmails) {
-                ret = ret.concat(email.split(/[;,]/).map(email => email.trim()));
+                ret = ret.concat(email.split(/[;,]/).map(mail => mail.trim()));
             }
         }
         out_count.value = ret.length;
         return ret;
     },
 
     // calICalendarSearchProvider:
     searchForCalendars: function(searchString, hints, maxResults, listener) {
@@ -1037,29 +1037,31 @@ calWcapSession.prototype = {
         }
 
         try {
             // make sure the calendar belongs to this session:
             if (this.belongsTo(aCalendar)) {
                 assureDefault("shared_context", this.m_contextId);
                 assureDefault("name", aCalendar.name);
 
-                const s_colors = ["#FFCCCC", "#FFCC99", "#FFFF99", "#FFFFCC", "#99FF99",
-                                  "#99FFFF", "#CCFFFF", "#CCCCFF", "#FFCCFF", "#FF6666",
-                                  "#FF9966", "#FFFF66", "#FFFF33", "#66FF99", "#33FFFF",
-                                  "#66FFFF", "#9999FF", "#FF99FF", "#FF0000", "#FF9900",
-                                  "#FFCC66", "#FFFF00", "#33FF33", "#66CCCC", "#33CCFF",
-                                  "#6666CC", "#CC66CC", "#CC0000", "#FF6600", "#FFCC33",
-                                  "#FFCC00", "#33CC00", "#00CCCC", "#3366FF", "#6633FF",
-                                  "#CC33CC", "#990000", "#CC6600", "#CC9933", "#999900",
-                                  "#009900", "#339999", "#3333FF", "#6600CC", "#993399",
-                                  "#660000", "#993300", "#996633", "#666600", "#006600",
-                                  "#336666", "#000099", "#333399", "#663366", "#330000",
-                                  "#663300", "#663333", "#333300", "#003300", "#003333",
-                                  "#000066", "#330099", "#330033"];
+                const s_colors = [
+                    "#FFCCCC", "#FFCC99", "#FFFF99", "#FFFFCC", "#99FF99",
+                    "#99FFFF", "#CCFFFF", "#CCCCFF", "#FFCCFF", "#FF6666",
+                    "#FF9966", "#FFFF66", "#FFFF33", "#66FF99", "#33FFFF",
+                    "#66FFFF", "#9999FF", "#FF99FF", "#FF0000", "#FF9900",
+                    "#FFCC66", "#FFFF00", "#33FF33", "#66CCCC", "#33CCFF",
+                    "#6666CC", "#CC66CC", "#CC0000", "#FF6600", "#FFCC33",
+                    "#FFCC00", "#33CC00", "#00CCCC", "#3366FF", "#6633FF",
+                    "#CC33CC", "#990000", "#CC6600", "#CC9933", "#999900",
+                    "#009900", "#339999", "#3333FF", "#6600CC", "#993399",
+                    "#660000", "#993300", "#996633", "#666600", "#006600",
+                    "#336666", "#000099", "#333399", "#663366", "#330000",
+                    "#663300", "#663333", "#333300", "#003300", "#003333",
+                    "#000066", "#330099", "#330033"
+                ];
                 assureDefault("color", s_colors[(new Date()).getUTCMilliseconds() % s_colors.length]);
             }
         } catch (exc) { // never break the listener chain
             this.notifyError(exc);
         }
     },
 
     // called before the unregister actually takes place
--- a/calendar/resources/content/datetimepickers/datetimepickers.xml
+++ b/calendar/resources/content/datetimepickers/datetimepickers.xml
@@ -119,17 +119,16 @@
               } catch (ex) {
                   // Don't fail if date formatting fails.
               }
           }
           if (date && prettyDate) {
               this.mValue = date;
               text.value = prettyDate;
               this.fireEvent("command", date);
-              return;
           }
         ]]></body>
       </method>
 
       <!-- This function will take written (with words) dates and, if
          - possible, return a Date() object described by the words.  Note
          - that this function will not parse explicit dates, like 1/1/06,
          - you should use parseDateTime for that.
@@ -279,21 +278,21 @@
         } else {
             this.value = new Date();
         }
 
         this.kTextBox.kDatePicker = this; // enable call back to method in Moz1.7
         this.kTextBox.firstChild.kDatePicker = this;
         this.kMinimonth = this.kTextBox.firstChild.firstChild;
         this.mInPopup = false;
-        this.kMinimonth.addEventListener("select", this.clickDate, false);
+        this.kMinimonth.addEventListener("select", this.clickDate);
       ]]></constructor>
 
       <destructor><![CDATA[
-          this.kMinimonth.removeEventListener("select", this.clickDate, false);
+          this.kMinimonth.removeEventListener("select", this.clickDate);
       ]]></destructor>
 
       <!-- This property will be overlayed in some extended binding -->
       <property name="valueValid" readonly="true">
         <getter><![CDATA[
             return (this.mValue != null);
         ]]></getter>
       </property>
--- a/calendar/resources/content/publish.js
+++ b/calendar/resources/content/publish.js
@@ -73,18 +73,16 @@ function publishEntireCalendar(aCalendar
     let remotePath = aCalendar.getProperty("remote-ics-path");
     if (remotePath && remotePath.length && remotePath.length > 0) {
         publishObject.remotePath = remotePath;
     }
 
     args.publishObject = publishObject;
     openDialog("chrome://calendar/content/publishDialog.xul", "caPublishEvents",
                "chrome,titlebar,modal,resizable", args);
-
-    return;
 }
 
 /**
  * publishEntireCalendarDialogResponse
  * Callback method for publishEntireCalendar() that is called when the user
  * presses the OK button in the publish dialog.
  */
 function publishEntireCalendarDialogResponse(CalendarPublishObject, aProgressDialog) {
--- a/calendar/test/mozmill/.eslintrc.js
+++ b/calendar/test/mozmill/.eslintrc.js
@@ -10,12 +10,12 @@ module.exports = {
         exports: true,
         module: true
     },
     rules: {
         // Allow mozmill test methods to be used without warning
         "no-unused-vars": [2, {
             vars: "all",
             args: "none",
-            varsIgnorePattern: "(MODULE_NAME|MODULE_REQUIRES|RELATIVE_ROOT|setupModule|installInto|teardownTest|^test[A-Z].*)"
+            varsIgnorePattern: "(MODULE_NAME|MODULE_REQUIRES|RELATIVE_ROOT|setupModule|installInto|teardownTest|^test[A-Z_].*)"
         }]
     }
 };
--- a/calendar/test/mozmill/eventDialog/testEventDialog.js
+++ b/calendar/test/mozmill/eventDialog/testEventDialog.js
@@ -169,17 +169,17 @@ function testEventDialog() {
         event.click(eventid("button-attendees"));
         wait_for_modal_dialog("Calendar:EventDialog:Recurrence", TIMEOUT_MODAL_DIALOG);
         event.assertValue(eventid("attendee-list"), eventAttendee);
 
         // make it private and verify label visible
         event.click(eventid("button-privacy"));
         event.click(eventid("event-privacy-private-menuitem"));
         let label = eventid("status-privacy-private-box");
-        event.assertJS(event.window.getComputedStyle(label.getNode(), null).getPropertyValue("visibility") == "visible");
+        event.assertJS(event.window.getComputedStyle(label.getNode()).getPropertyValue("visibility") == "visible");
 
         // add attachment and verify added
         handleAddingAttachment(event, eventUrl);
         event.click(eventid("button-url"));
         event.assertNode(eventlookup(`
             ${eventDialog}/id("event-grid-attachment-row")/
             id("attachment-link")/{"label":"mozilla.org"}
         `));
--- a/calendar/test/mozmill/invitations/test-imip-bar-eml.js
+++ b/calendar/test/mozmill/invitations/test-imip-bar-eml.js
@@ -13,17 +13,17 @@ var MODULE_NAME = "invitations";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = [
     "folder-display-helpers",
     "window-helpers",
     "notificationbox-helpers"
 ];
 
 var os = {};
-Components.utils.import('resource://mozmill/stdlib/os.js', os);
+Components.utils.import("resource://mozmill/stdlib/os.js", os);
 
 function setupModule(module) {
     for (let dep of MODULE_REQUIRES) {
         collector.getModule(dep).installInto(module);
     }
 }
 
 /**
@@ -31,18 +31,17 @@ function setupModule(module) {
  */
 function test_event_from_eml() {
     let thisFilePath = os.getFileForPath(__file__);
     let file = os.getFileForPath(os.abspath("./message-containing-event.eml", thisFilePath));
 
     let msgc = open_message_from_file(file);
 
     msgc.waitFor(() => {
-        let nb = msgc.window.document.getElementById("imip-bar");
-        if (!nb) {
+        let bar = msgc.window.document.getElementById("imip-bar");
+        if (!bar) {
             throw new Error("Couldn't find imip-bar in DOM.");
         }
-        return (nb.collapsed === false);
+        return (bar.collapsed === false);
     }, "Timed out waiting for IMIP bar to show");
 
     close_window(msgc);
 }
-
--- a/calendar/test/mozmill/shared-modules/test-calendar-utils.js
+++ b/calendar/test/mozmill/shared-modules/test-calendar-utils.js
@@ -430,18 +430,18 @@ function viewBack(controller, n) {
  * Deletes all calendars with given name
  *
  * @param controller    Mozmill window controller
  * @param name          calendar name
  */
 function deleteCalendars(controller, name) {
     let { eid } = helpersForController(controller);
 
-    let defaultView = eid("messengerWindow").getNode().ownerDocument.defaultView;
-    let manager = defaultView.cal.getCalendarManager();
+    let win = eid("messengerWindow").getNode().ownerGlobal;
+    let manager = win.cal.getCalendarManager();
 
     for (let calendar of manager.getCalendars({})) {
         if (calendar.name == name) {
             manager.removeCalendar(calendar);
         }
     }
 }
 
@@ -449,18 +449,18 @@ function deleteCalendars(controller, nam
  * Creates local calendar with given name and select it in calendars list
  *
  * @param controller    Mozmill window controller
  * @param name          calendar name
  */
 function createCalendar(controller, name) {
     let { lookup, eid } = helpersForController(controller);
 
-    let defaultView = eid("messengerWindow").getNode().ownerDocument.defaultView;
-    let manager = defaultView.cal.getCalendarManager();
+    let win = eid("messengerWindow").getNode().ownerGlobal;
+    let manager = win.cal.getCalendarManager();
 
     let url = Services.io.newURI("moz-storage-calendar://");
     let calendar = manager.createCalendar("storage", url);
     calendar.name = name;
     manager.registerCalendar(calendar);
 
     let calendarTree = lookup(`
         /id("messengerWindow")/id("tabmail-container")/id("tabmail")/
--- a/calendar/test/mozmill/views/testTaskView.js
+++ b/calendar/test/mozmill/views/testTaskView.js
@@ -144,17 +144,17 @@ function testTaskView() {
     sleep();
     controller.click(eid("priority-1-menuitem"));
     sleep();
     let priorityNode = eid("calendar-task-details-priority-high");
     controller.assertNotDOMProperty(priorityNode, "hidden");
 
     // verify that tooltip shows status, priority and percent complete
     let toolTipNode = lookup(toolTip).getNode();
-    toolTipNode.ownerDocument.defaultView.showToolTip(toolTipNode, taskTreeNode.getTaskAtRow(0));
+    toolTipNode.ownerGlobal.showToolTip(toolTipNode, taskTreeNode.getTaskAtRow(0));
 
     let toolTipName = lookup(toolTipGrid + "[1]/[0]/[1]");
     let toolTipCalendar = lookup(toolTipGrid + "[1]/[1]/[1]");
     let toolTipPriority = lookup(toolTipGrid + "[1]/[2]/[1]");
     let toolTipStatus = lookup(toolTipGrid + "[1]/[3]/[1]");
     let toolTipComplete = lookup(toolTipGrid + "[1]/[4]/[1]");
     let priority = utils.getProperty("chrome://calendar/locale/calendar.properties", "highPriority");
 
@@ -164,17 +164,17 @@ function testTaskView() {
     controller.assertJS(toolTipStatus.getNode().textContent.toLowerCase() == status.toLowerCase());
     controller.assertJSProperty(toolTipComplete, "textContent", percentComplete + "%");
 
     // mark completed, verify
     controller.click(eid("task-actions-markcompleted"));
     sleep();
 
     status = utils.getProperty("chrome://calendar/locale/calendar.properties", "taskDetailsStatusCompleted");
-    toolTipNode.ownerDocument.defaultView.showToolTip(toolTipNode, taskTreeNode.getTaskAtRow(0));
+    toolTipNode.ownerGlobal.showToolTip(toolTipNode, taskTreeNode.getTaskAtRow(0));
     controller.assertJS(toolTipStatus.getNode().textContent.toLowerCase() == status.toLowerCase());
 
     // delete task, verify
     controller.click(eid("task-context-menu-delete"));
     controller.click(eid("calendar-delete-task-button"));
     let countAfterDelete = taskTreeNode.mTaskArray.length;
     controller.assertJS(countAfter - 1 == countAfterDelete);
 }
--- a/calendar/test/unit/head_consts.js
+++ b/calendar/test/unit/head_consts.js
@@ -159,20 +159,20 @@ function getProps(aItem, aProp) {
         return null;
     }
 }
 
 function compareItemsSpecific(aLeftItem, aRightItem, aPropArray) {
     if (!aPropArray) {
         // left out:  "id", "calendar", "lastModifiedTime", "generation",
         // "stampTime" as these are expected to change
-        aPropArray = ["start", "end", "duration",
-                      "title", "priority", "privacy", "creationDate",
-                      "status", "alarmLastAck",
-                      "recurrenceStartDate"];
+        aPropArray = [
+            "start", "end", "duration", "title", "priority", "privacy",
+            "creationDate", "status", "alarmLastAck", "recurrenceStartDate"
+        ];
     }
     for (let i = 0; i < aPropArray.length; i++) {
         equal(getProps(aLeftItem, aPropArray[i]),
               getProps(aRightItem, aPropArray[i]),
               Components.stack.caller);
     }
 }
 
--- a/calendar/test/unit/test_alarmservice.js
+++ b/calendar/test/unit/test_alarmservice.js
@@ -246,19 +246,19 @@ function addTestItems(aCalendar) {
 
 
     // daily repeating event starting almost 2 full days ago. The alarms on the first 2 occurrences
     // should fire, and a timer should be set for the next occurrence only
     date = cal.now();
     date.hour -= 47;
     [item, alarm] = createEventWithAlarm(aCalendar, date, date, "-PT15M", "RRULE:FREQ=DAILY");
     item.title="addTestItems Test 7";
-    alarmObserver.expectOccurrences(aCalendar, item, alarm,
-                                   [EXPECT_FIRED, EXPECT_FIRED, EXPECT_TIMER,
-                                    EXPECT_NONE, EXPECT_NONE]);
+    alarmObserver.expectOccurrences(aCalendar, item, alarm, [
+        EXPECT_FIRED, EXPECT_FIRED, EXPECT_TIMER, EXPECT_NONE, EXPECT_NONE
+    ]);
     aCalendar.addItem(item, null);
 
     // monthly repeating event starting 2 months and a day ago. The alarms on the first 2 occurrences
     // should be ignored, the alarm on the next occurrence only should fire.
     // Missing recurrences of the event in particular days of the year generate exceptions to the
     // regular sequence of alarms.
     date = cal.now();
     let statusAlarmSequences = {
--- a/calendar/test/unit/test_attendee.js
+++ b/calendar/test/unit/test_attendee.js
@@ -45,18 +45,19 @@ function test_values() {
 
             equal(a[properties[i]], old);
         }
     }
 
     // Create Attendee
     let attendee1 = cal.createAttendee();
     // Testing attendee set/get.
-    let properties = ["id", "commonName", "rsvp", "role", "participationStatus",
-                      "userType"];
+    let properties = [
+        "id", "commonName", "rsvp", "role", "participationStatus", "userType"
+    ];
     let values = ["myid", "mycn", "TRUE", "CHAIR", "DECLINED", "RESOURCE"];
     // Make sure test is valid
     equal(properties.length, values.length);
 
     for (let i = 0; i < properties.length; i++) {
         attendee1[properties[i]] = values[i];
         equal(attendee1[properties[i]], values[i]);
     }
--- a/calendar/test/unit/test_bug1199942.js
+++ b/calendar/test/unit/test_bug1199942.js
@@ -41,20 +41,20 @@ function serializeEvent_test() {
               "ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:user4@example.net\n" +
               "ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:urn:uuid:user5\n" +
               "DTSTART:20150729T103000Z\n" +
               "DTEND:20150729T113000Z\n" +
               "TRANSP:OPAQUE\n" +
               "END:VEVENT\n" +
               "END:VCALENDAR\n";
 
-    let expectedIds = ["mailto:user2@example.net",
-                       "mailto:user3@example.net",
-                       "mailto:user4@example.net",
-                       "urn:uuid:user5"];
+    let expectedIds = [
+        "mailto:user2@example.net", "mailto:user3@example.net",
+        "mailto:user4@example.net", "urn:uuid:user5"
+    ];
     let event = createEventFromIcalString(ics);
     let attendees = event.getAttendees({});
 
     // check whether all attendees get returned with expected id
     for (let attendee of attendees) {
         ok(expectedIds.includes(attendee.id));
     }
 
--- a/calendar/test/unit/test_bug759324.js
+++ b/calendar/test/unit/test_bug759324.js
@@ -6,22 +6,24 @@
  * Checks if the capabilities.propagate-sequence feature of the storage calendar
  * still works
  */
 function run_test() {
     let storage = getStorageCal();
 
     storage.setProperty("capabilities.propagate-sequence", "true");
 
-    let str = ["BEGIN:VEVENT",
-               "UID:recItem",
-               "SEQUENCE:3",
-               "RRULE:FREQ=WEEKLY",
-               "DTSTART:20120101T010101Z",
-               "END:VEVENT"].join("\r\n");
+    let str = [
+        "BEGIN:VEVENT",
+        "UID:recItem",
+        "SEQUENCE:3",
+        "RRULE:FREQ=WEEKLY",
+        "DTSTART:20120101T010101Z",
+        "END:VEVENT"
+    ].join("\r\n");
 
     let item = createEventFromIcalString(str);
     let rid = cal.createDateTime("20120101T010101Z");
     let rec = item.recurrenceInfo.getOccurrenceFor(rid);
     rec.title = "changed";
     item.recurrenceInfo.modifyException(rec, true);
 
     do_test_pending();
--- a/calendar/test/unit/test_calitiputils.js
+++ b/calendar/test/unit/test_calitiputils.js
@@ -112,18 +112,20 @@ function getSeqStampTestItems(aTest) {
             if ("xMozReceivedStamp" in input.item && input.item.xMozReceivedStamp.length) {
                 xMozReceivedStamp = "X-MOZ-RECEIVED-DTSTAMP:" + input.item.xMozReceivedStamp;
             }
             let xMsAptSeq = "";
             if ("xMsAptSeq" in input.item && input.item.xMsAptSeq.length) {
                 xMsAptSeq = "X-MICROSOFT-CDO-APPT-SEQUENCE:" + input.item.xMsAptSeq;
             }
             let testItem = cal.createEvent();
-            testItem.icalString = getSeqStampTestIcs([attendee, sequence, dtStamp, xMozReceivedSeq,
-                                                      xMozReceivedStamp, xMsAptSeq]);
+            testItem.icalString = getSeqStampTestIcs([
+                attendee, sequence, dtStamp, xMozReceivedSeq,
+                xMozReceivedStamp, xMsAptSeq
+            ]);
             items.push(testItem);
         } else {
             // in this case, we need to return an attendee
             let att = cal.createAttendee();
             att.id = input.attendee.id || "mailto:otherattendee@example.net";
             if (input.attendee.receivedSeq && input.attendee.receivedSeq.length) {
                 att.setProperty("RECEIVED-SEQUENCE", input.attendee.receivedSeq);
             }
--- a/calendar/test/unit/test_ltninvitationutils.js
+++ b/calendar/test/unit/test_ltninvitationutils.js
@@ -108,20 +108,22 @@ add_task(function* getItipHeader_test() 
             method: "METHOD:REPLY\r\n",
             attendees: ["ATTENDEE;RSVP=TRUE;CN=Attendee1;PARTSTAT=DECLINED;" +
                         "ROLE=REQ-PARTICIPANT:mailto:attendee1@example.net"]
         },
         expected: "Attendee1 <attendee1@example.net> has declined your event invitation."
     }, {
         input: {
             method: "METHOD:REPLY\r\n",
-            attendees: ["ATTENDEE;RSVP=TRUE;CN=Attendee1;PARTSTAT=ACCEPTED;" +
-                        "ROLE=REQ-PARTICIPANT:mailto:attendee1@example.net",
-                        "ATTENDEE;RSVP=TRUE;CN=Attendee2;PARTSTAT=DECLINED;" +
-                        "ROLE=REQ-PARTICIPANT:mailto:attendee2@example.net"]
+            attendees: [
+                "ATTENDEE;RSVP=TRUE;CN=Attendee1;PARTSTAT=ACCEPTED;" +
+                "ROLE=REQ-PARTICIPANT:mailto:attendee1@example.net",
+                "ATTENDEE;RSVP=TRUE;CN=Attendee2;PARTSTAT=DECLINED;" +
+                "ROLE=REQ-PARTICIPANT:mailto:attendee2@example.net"
+            ]
         },
         expected: "Attendee1 <attendee1@example.net> has accepted your event invitation."
     }, {
         input: {
             method: "METHOD:UNSUPPORTED\r\n",
             attendees: [null]
         },
         expected: "Event Invitation"
@@ -210,22 +212,22 @@ add_task(function* createInvitationOverl
             node: "imipHtml-description-content",
             value: "Let's see how evil we can be: &lt;script language=\"JavaScript\"&gt;document." +
                    "getElementById(\"imipHtml-description-content\").write(\"Script embedded!\")&" +
                    "lt;/script&gt;"
         }
     }, {
         input: {
             description: "DESCRIPTION:Or we can try: <img src=\"document.getElementById(\"imipHtm" +
-                         "l-description-descr\").innerText\" \>\r\n"
+                         "l-description-descr\").innerText\" >\r\n"
         },
         expected: {
             node: "imipHtml-description-content",
             value: "Or we can try: &lt;img src=\"document.getElementById(\"imipHtml-description-d" +
-                   "escr\").innerText\" \&gt;"
+                   "escr\").innerText\" &gt;"
         }
     }, {
         input: { url: "URL:http://www.example.org/event.ics\r\n" },
         expected: {
             node: "imipHtml-url-content",
             value: "<a xmlns=\"http://www.w3.org/1999/xhtml\" class=\"moz-txt-link-freetext\" hre" +
                    "f=\"http://www.example.org/event.ics\">http://www.example.org/event.ics</a>"
         }
@@ -468,18 +470,20 @@ add_task(function* compareInvitationOver
     }, {
         input: {
             previous: { organizer: "ORGANIZER:mailto:organizer1@example.net\r\n" },
             current: { organizer: "ORGANIZER:mailto:organizer2@example.net\r\n" },
             ignore: ""
         },
         expected: {
             node: "organizer-table",
-            each: ["<span xmlns=\"\" class=\"added\">organizer2@example.net</span>",
-                   "<span xmlns=\"\" class=\"removed\">organizer1@example.net</span>"]
+            each: [
+                "<span xmlns=\"\" class=\"added\">organizer2@example.net</span>",
+                "<span xmlns=\"\" class=\"removed\">organizer1@example.net</span>"
+            ]
         }
     }, {
         input: {
             previous: {
                 attendee: "ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;PARTSTAT=NEEDS-ACTION:" +
                           "mailto:attendee1@example.net\r\n" +
                           "ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;PARTSTAT=NEEDS-ACTION:" +
                           "mailto:attendee2@example.net\r\n" +
@@ -493,20 +497,22 @@ add_task(function* compareInvitationOver
                           "mailto:attendee3@example.net\r\n" +
                           "ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;PARTSTAT=NEEDS-ACTION:" +
                           "mailto:attendee4@example.net\r\n"
             },
             ignore: ""
         },
         expected: {
             node: "attendee-table",
-            each: ["<span xmlns=\"\" class=\"modified\">attendee2@example.net</span>",
-                   "attendee3@example.net",
-                   "<span xmlns=\"\" class=\"added\">attendee4@example.net</span>",
-                   "<span xmlns=\"\" class=\"removed\">attendee1@example.net</span>"]
+            each: [
+                "<span xmlns=\"\" class=\"modified\">attendee2@example.net</span>",
+                "attendee3@example.net",
+                "<span xmlns=\"\" class=\"added\">attendee4@example.net</span>",
+                "<span xmlns=\"\" class=\"removed\">attendee1@example.net</span>"
+            ]
         }
     }];
     // we make sure that the Europe/Berlin timezone and long datetime format is set
     let dateformat = Preferences.get("calendar.date.format", 0);
     let tzlocal = Preferences.get("calendar.timezone.local", "Europe/Berlin");
     Preferences.set("calendar.date.format", 0);
     Preferences.set("calendar.timezone.local", "Europe/Berlin");
     let i = 0;
@@ -783,16 +789,18 @@ add_task(function* getRfc5322FormattedDa
         let date = test.date ? new Date(test.date) : null;
         let re = new RegExp(data.expected);
         ok(re.test(ltn.invitation.getRfc5322FormattedDate(date)), "(test #" + i + ")");
     }
     Preferences.set("calendar.timezone.local", timezone);
 });
 
 add_task(function* parseCounter_test() {
+    // We are disabling this rule for a more consistent display of this data
+    /* eslint-disable object-curly-newline */
     let data = [{
         // #1: basic test to check all currently supported properties
         input: {
             existing: [],
             proposed: [
                 {
                     method: "METHOD:COUNTER"
                 }, {
@@ -804,17 +812,17 @@ add_task(function* parseCounter_test() {
                 }, {
                     summary: "SUMMARY:Test Event 2"
                 }, {
                     attendee: "ATTENDEE;CN=Attendee;PARTSTAT=DECLINED;ROLE=REQ-PARTICIPANT:" +
                               "mailto:attendee@example.net"
                 }, {
                     dtStamp: "DTSTAMP:20150909T182048Z"
                 }, {
-                    attach: "COMMENT:Sorry\, I cannot make it that time."
+                    attach: "COMMENT:Sorry, I cannot make it that time."
                 }
             ]
         },
         expected: {
             // Time format is platform dependent, so we use alternative result sets here.
             // The first two are configurations running for automated tests.
             // If you get a failure for this test, add your pattern here.
             result: { descr: "", type: "OK" },
@@ -839,17 +847,17 @@ add_task(function* parseCounter_test() {
                 proposed: ["Thursday, September 10, 2015 10:00 PM Europe/Berlin",
                            "Thursday, September 10, 2015 22:00 Europe/Berlin"],
                 original: ["Wednesday, September 09, 2015 10:00 PM Europe/Berlin", // Windows
                            "Wednesday, September 09, 2015 22:00 Europe/Berlin",
                            "Wednesday, September 9, 2015 10:00 PM Europe/Berlin",  // Linux and Mac
                            "Wednesday, September 9, 2015 22:00 Europe/Berlin"]
             }, {
                 property: "COMMENT",
-                proposed: "Sorry\, I cannot make it that time.",
+                proposed: "Sorry, I cannot make it that time.",
                 original: null
             }]
         }
     }, {
         // #2: test with an unsupported property has been changed
         input: {
             existing: [],
             proposed: [
@@ -857,19 +865,20 @@ add_task(function* parseCounter_test() {
                     method: "METHOD:COUNTER"
                 }, {
                     attendee: "ATTENDEE;CN=Attendee;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:" +
                               "mailto:attendee@example.net"
                 }, {
                     location: "LOCATION:Room 2"
                 }, {
                     attach: "ATTACH:http://www.example2.com"
-                } ,{
+                }, {
                     dtStamp: "DTSTAMP:20150909T182048Z"
-                }]
+                }
+            ]
         },
         expected: {
             result: { descr: "", type: "OK" },
             differences: [{ property: "LOCATION", proposed: "Room 2", original: "Room 1" }]
         }
     }, {
         // #3: proposed change not based on the latest update of the invitation
         input: {
@@ -996,25 +1005,27 @@ add_task(function* parseCounter_test() {
                 type: "ERROR"
             },
             differences: []
         }
     }, {
         // #8:counterproposal without any difference
         input: {
             existing: [],
-            proposed: [{ method: "METHOD:COUNTER" }] },
+            proposed: [{ method: "METHOD:COUNTER" }]
+        },
         expected: {
             result: {
                 descr: "No difference in counterproposal detected.",
                 type: "NODIFF"
             },
             differences: []
         }
     }];
+    /* eslint-enable object-curly-newline */
 
     let getItem = function(aProperties) {
         let item = getIcs(true);
 
         let modifyProperty = function(aRegex, aReplacement, aInVevent) {
             let inVevent = false;
             let i = 0;
             item.forEach(aProp => {
@@ -1058,17 +1069,17 @@ add_task(function* parseCounter_test() {
             });
         }
         item = item.join("\r\n");
         return createEventFromIcalString(item);
     };
 
     let formatDt = function (aDateTime) {
         let datetime = cal.getDateFormatter().formatDateTime(aDateTime);
-        return datetime += " " + aDateTime.timezone.displayName;
+        return datetime + " " + aDateTime.timezone.displayName;
     };
 
     for (let i = 1; i <= data.length; i++) {
         let test = data[i - 1];
         let existingItem = getItem(test.input.existing);
         let proposedItem = getItem(test.input.proposed);
         let parsed = ltn.invitation.parseCounter(proposedItem, existingItem);
 
@@ -1081,17 +1092,17 @@ add_task(function* parseCounter_test() {
             let expected = test.expected.differences.filter(bDiff => bDiff.property == aDiff.property);
             if (expected.length == 1) {
                 if (["DTSTART", "DTEND"].includes(aDiff.property)) {
                     let prop = aDiff.proposed ? formatDt(aDiff.proposed) : null;
                     ok(
                         prop && expected[0].proposed.includes(prop),
                         "(test #" + i + ": difference " + aDiff.property + ": proposed '" + prop + "')"
                     );
-                    prop = aDiff.original ? formatDt(aDiff.original) : null
+                    prop = aDiff.original ? formatDt(aDiff.original) : null;
                     ok(
                         prop && expected[0].original.includes(prop),
                         "(test #" + i + ": difference " + aDiff.property + ": original '" + prop + "')"
                     );
                 } else {
                     equal(
                         aDiff.proposed,
                         expected[0].proposed,
--- a/calendar/test/unit/test_recur.js
+++ b/calendar/test/unit/test_recur.js
@@ -81,39 +81,43 @@ function test_rules() {
         test_clone(event);
     }
 
     // Test specific items/rules
     check_recur(makeEvent("DESCRIPTION:Repeat every tuesday and wednesday starting " +
                                      "Tue 2nd April 2002\n" +
                          "RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=6;BYDAY=TU,WE\n" +
                          "DTSTART:20020402T114500\n" +
-                         "DTEND:20020402T124500\n"),
-                         ["20020402T114500", "20020403T114500", "20020409T114500",
-                          "20020410T114500", "20020416T114500", "20020417T114500"]);
+                         "DTEND:20020402T124500\n"), [
+                             "20020402T114500", "20020403T114500",
+                             "20020409T114500", "20020410T114500",
+                             "20020416T114500", "20020417T114500"]);
+
     check_recur(makeEvent("DESCRIPTION:Repeat every thursday starting Tue 2nd April 2002\n" +
                          "RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=6;BYDAY=TH\n" +
                          "DTSTART:20020402T114500\n" +
-                         "DTEND:20020402T124500\n"),
-                         ["20020402T114500", // DTSTART part of the resulting set
-                          "20020404T114500", "20020411T114500", "20020418T114500",
-                          "20020425T114500", "20020502T114500", "20020509T114500"]);
+                         "DTEND:20020402T124500\n"), [
+                             "20020402T114500", // DTSTART part of the resulting set
+                             "20020404T114500", "20020411T114500", "20020418T114500",
+                             "20020425T114500", "20020502T114500", "20020509T114500"]);
+
     // Bug 469840 -  Recurring Sundays incorrect
     check_recur(makeEvent("DESCRIPTION:RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=6;BYDAY=WE,SA,SU with DTSTART:20081217T133000\n" +
                          "RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=6;BYDAY=WE,SA,SU\n" +
                          "DTSTART:20081217T133000\n" +
-                         "DTEND:20081217T143000\n"),
-               ["20081217T133000", "20081220T133000", "20081221T133000",
-                "20081231T133000", "20090103T133000", "20090104T133000"]);
+                         "DTEND:20081217T143000\n"), [
+                             "20081217T133000", "20081220T133000", "20081221T133000",
+                             "20081231T133000", "20090103T133000", "20090104T133000"]);
+
     check_recur(makeEvent("DESCRIPTION:RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=6;WKST=SU;BYDAY=WE,SA,SU with DTSTART:20081217T133000\n" +
                          "RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=6;WKST=SU;BYDAY=WE,SA,SU\n" +
                          "DTSTART:20081217T133000\n" +
-                         "DTEND:20081217T143000\n"),
-               ["20081217T133000", "20081220T133000", "20081228T133000",
-                "20081231T133000", "20090103T133000", "20090111T133000"]);
+                         "DTEND:20081217T143000\n"), [
+                             "20081217T133000", "20081220T133000", "20081228T133000",
+                             "20081231T133000", "20090103T133000", "20090111T133000"]);
 
     // bug 353797: occurrences for repeating all day events should stay "all-day"
     check_recur(makeEvent("DESCRIPTION:Allday repeat every thursday starting Tue 2nd April 2002\n" +
                          "RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=3;BYDAY=TH\n" +
                          "DTSTART;VALUE=DATE:20020404\n" +
                          "DTEND;VALUE=DATE:20020405\n"),
                          ["20020404", "20020411", "20020418"]);
 
@@ -124,27 +128,27 @@ function test_rules() {
                          ["19970512T090000", "19980511T090000", "19990517T090000" +
                           "20000515T090000", "20010514T090000", "20020513T090000"]);
     */
 
     // bug 899326: Recurrences with BYMONTHDAY=X,X,31 don't show at all in months with less than 31 days
     check_recur(makeEvent("DESCRIPTION:Every 11th & 31st of every Month\n" +
                 "RRULE:FREQ=MONTHLY;COUNT=6;BYMONTHDAY=11,31\n" +
                 "DTSTART:20130731T160000\n" +
-                "DTEND:20130731T170000)\n"),
-                ["20130731T160000", "20130811T160000", "20130831T160000",
-                 "20130911T160000", "20131011T160000", "20131031T160000"]);
+                "DTEND:20130731T170000)\n"), [
+                    "20130731T160000", "20130811T160000", "20130831T160000",
+                    "20130911T160000", "20131011T160000", "20131031T160000"]);
 
     // bug 899770: Monthly Recurrences with BYDAY and BYMONTHDAY with more than 2 dates are not working
     check_recur(makeEvent("DESCRIPTION:Every WE & SA the 6th, 20th & 31st\n" +
                 "RRULE:FREQ=MONTHLY;COUNT=6;BYDAY=WE,SA;BYMONTHDAY=6,20,31\n" +
                 "DTSTART:20130706T160000\n" +
-                "DTEND:20130706T170000)\n"),
-                ["20130706T160000", "20130720T160000", "20130731T160000",
-                 "20130831T160000", "20131106T160000", "20131120T160000"]);
+                "DTEND:20130706T170000)\n"), [
+                    "20130706T160000", "20130720T160000", "20130731T160000",
+                    "20130831T160000", "20131106T160000", "20131120T160000"]);
 
     check_recur(makeEvent("DESCRIPTION:Every day, use exdate to exclude the second day\n" +
                          "RRULE:FREQ=DAILY;COUNT=3\n" +
                          "DTSTART:20020402T114500Z\n" +
                          "EXDATE:20020403T114500Z\n"),
                          ["20020402T114500Z", "20020404T114500Z"]);
 
     // test for issue 734245
@@ -171,87 +175,114 @@ function test_rules() {
                                          "DTSTART:20020403T114500Z\n" +
                                          "UID:123\n" +
                                          "RECURRENCE-ID:20020404T114500Z\n" +
                                          "END:VEVENT\nEND:VCALENDAR\n"),
                ["20020402T114500Z", "20020403T114500Z"],
                true); // ignore next occ check, bug 455490
 
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
-                                         "UID:123\n" +
-                                         "DESCRIPTION:Every day, exception put on exdated start day\n" +
-                                         "RRULE:FREQ=DAILY;COUNT=3\n" +
-                                         "DTSTART:20020402T114500Z\n" +
-                                         "EXDATE:20020402T114500Z\n" +
-                                         "END:VEVENT\n" +
-                                         "BEGIN:VEVENT\n" +
-                                         "DTSTART:20020402T114500Z\n" +
-                                         "UID:123\n" +
-                                         "RECURRENCE-ID:20020404T114500Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
+                                          "UID:123\n" +
+                                          "DESCRIPTION:Every day, exception put on exdated start day\n" +
+                                          "RRULE:FREQ=DAILY;COUNT=3\n" +
+                                          "DTSTART:20020402T114500Z\n" +
+                                          "EXDATE:20020402T114500Z\n" +
+                                          "END:VEVENT\n" +
+                                          "BEGIN:VEVENT\n" +
+                                          "DTSTART:20020402T114500Z\n" +
+                                          "UID:123\n" +
+                                          "RECURRENCE-ID:20020404T114500Z\n" +
+                                          "END:VEVENT\nEND:VCALENDAR\n"),
                ["20020402T114500Z", "20020403T114500Z"],
                true /* ignore next occ check, bug 455490 */);
 
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
-                                         "DESCRIPTION:Repeat Daily on weekdays with UNTIL\n" +
-                                         "RRULE:FREQ=DAILY;UNTIL=20111217T220000Z;BYDAY=MO,TU,WE,TH,FR\n" +
-                                         "DTSTART:20111212T220000Z\n" +
-                                         "DTEND:20111212T230000Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20111212T220000Z", "20111213T220000Z", "20111214T220000Z", "20111215T220000Z",
-                "20111216T220000Z"],
-               false);
+                                          "DESCRIPTION:Repeat Daily on weekdays with UNTIL\n" +
+                                          "RRULE:FREQ=DAILY;UNTIL=20111217T220000Z;BYDAY=MO,TU,WE,TH,FR\n" +
+                                          "DTSTART:20111212T220000Z\n" +
+                                          "DTEND:20111212T230000Z\n" +
+                                          "END:VEVENT\nEND:VCALENDAR\n"), [
+                                              "20111212T220000Z",
+                                              "20111213T220000Z",
+                                              "20111214T220000Z",
+                                              "20111215T220000Z",
+                                              "20111216T220000Z"
+                                          ], false);
 
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                          "DESCRIPTION:Repeat Daily on weekdays with UNTIL and exception\n" +
                                          "RRULE:FREQ=DAILY;UNTIL=20111217T220000Z;BYDAY=MO,TU,WE,TH,FR\n" +
                                          "EXDATE:20111214T220000Z\n" +
                                          "DTSTART:20111212T220000Z\n" +
                                          "DTEND:20111212T230000Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20111212T220000Z", "20111213T220000Z", "20111215T220000Z", "20111216T220000Z"],
-               false);
+                                         "END:VEVENT\nEND:VCALENDAR\n"), [
+                                             "20111212T220000Z",
+                                             "20111213T220000Z",
+                                             "20111215T220000Z",
+                                             "20111216T220000Z"
+                                         ], false);
 
     // Bug 958978: Yearly recurrence, the last day of a specified month.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                           "DESCRIPTION:Repeat Yearly the last day of February\n" +
                                           "RRULE:FREQ=YEARLY;COUNT=6;BYMONTHDAY=-1;BYMONTH=2\n" +
                                           "DTSTART:20140228T220000Z\n" +
                                           "DTEND:20140228T230000Z\n" +
-                                          "END:VEVENT\nEND:VCALENDAR\n"),
-                ["20140228T220000Z", "20150228T220000Z", "20160229T220000Z",
-                 "20170228T220000Z", "20180228T220000Z", "20190228T220000Z"],
-                false);
+                                          "END:VEVENT\nEND:VCALENDAR\n"), [
+                                              "20140228T220000Z",
+                                              "20150228T220000Z",
+                                              "20160229T220000Z",
+                                              "20170228T220000Z",
+                                              "20180228T220000Z",
+                                              "20190228T220000Z"
+                                          ], false);
 
     // Bug 958978: Yearly recurrence, the last day of a not specified month.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                           "DESCRIPTION:Repeat Yearly the last day of April without BYMONTH=4 in the rule\n" +
                                           "RRULE:FREQ=YEARLY;COUNT=6;BYMONTHDAY=-1\n" +
                                           "DTSTART:20140430T220000Z\n" +
                                           "DTEND:20140430T230000Z\n" +
-                                          "END:VEVENT\nEND:VCALENDAR\n"),
-                ["20140430T220000Z", "20150430T220000Z", "20160430T220000Z",
-                 "20170430T220000Z", "20180430T220000Z", "20190430T220000Z"],
-                false);
+                                          "END:VEVENT\nEND:VCALENDAR\n"), [
+                                              "20140430T220000Z",
+                                              "20150430T220000Z",
+                                              "20160430T220000Z",
+                                              "20170430T220000Z",
+                                              "20180430T220000Z",
+                                              "20190430T220000Z"
+                                          ], false);
 
     // Bug 958978 - Check a yearly recurrence on every WE and FR of January and March
     //              (more BYMONTH and more BYDAY).
     // Check for the occurrences in the first year.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                          "DESCRIPTION:Repeat Yearly every WE and FR of January and March (more BYMONTH and more BYDAY)\n" +
                                          "RRULE:FREQ=YEARLY;COUNT=18;BYMONTH=1,3;BYDAY=WE,FR\n" +
                                          "DTSTART:20140101T150000Z\n" +
                                          "DTEND:20140101T160000Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20140101T150000Z", "20140103T150000Z", "20140108T150000Z", "20140110T150000Z",
-                "20140115T150000Z", "20140117T150000Z", "20140122T150000Z", "20140124T150000Z",
-                "20140129T150000Z", "20140131T150000Z",
-                "20140305T150000Z", "20140307T150000Z", "20140312T150000Z", "20140314T150000Z",
-                "20140319T150000Z", "20140321T150000Z", "20140326T150000Z", "20140328T150000Z"],
-               false);
+                                         "END:VEVENT\nEND:VCALENDAR\n"), [
+                                             "20140101T150000Z",
+                                             "20140103T150000Z",
+                                             "20140108T150000Z",
+                                             "20140110T150000Z",
+                                             "20140115T150000Z",
+                                             "20140117T150000Z",
+                                             "20140122T150000Z",
+                                             "20140124T150000Z",
+                                             "20140129T150000Z",
+                                             "20140131T150000Z",
+                                             "20140305T150000Z",
+                                             "20140307T150000Z",
+                                             "20140312T150000Z",
+                                             "20140314T150000Z",
+                                             "20140319T150000Z",
+                                             "20140321T150000Z",
+                                             "20140326T150000Z",
+                                             "20140328T150000Z"
+                                         ], false);
 
     // Bug 958978 - Check a yearly recurrence every day of January (BYMONTH and more BYDAY).
     // Check for all the occurrences in the first year.
     let expectedDates = [];
     for (let i = 1; i < 32; i++) {
         expectedDates.push("201401" + (i < 10 ? "0" + i : i) + "T150000Z");
     }
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
@@ -265,148 +296,154 @@ function test_rules() {
 
     // Bug 958974 - Monthly recurrence every WE, FR and the third MO (monthly with more bydays).
     // Check the occurrences in the first month until the week with the first monday of the rule.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                          "DESCRIPTION:Repeat Monthly every Wednesday, Friday and the third Monday\n" +
                                          "RRULE:FREQ=MONTHLY;COUNT=8;BYDAY=3MO,WE,FR\n" +
                                          "DTSTART:20150102T080000Z\n" +
                                          "DTEND:20150102T090000Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20150102T080000Z", "20150107T080000Z", "20150109T080000Z",
-                "20150114T080000Z", "20150116T080000Z", "20150119T080000Z",
-                "20150121T080000Z", "20150123T080000Z"],
-               false);
+                                         "END:VEVENT\nEND:VCALENDAR\n"), [
+                                             "20150102T080000Z",
+                                             "20150107T080000Z",
+                                             "20150109T080000Z",
+                                             "20150114T080000Z",
+                                             "20150116T080000Z",
+                                             "20150119T080000Z",
+                                             "20150121T080000Z",
+                                             "20150123T080000Z"
+                                         ], false);
 
     // Bug 419490 - Monthly recurrence, the fifth Saturday starting from February.
     // Check a monthly rule that specifies a day that is not part of the month
     // the events starts in.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                          "DESCRIPTION:Repeat Monthly the fifth Saturday\n" +
                                          "RRULE:FREQ=MONTHLY;COUNT=6;BYDAY=5SA\n" +
                                          "DTSTART:20150202T080000Z\n" +
                                          "DTEND:20150202T090000Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20150202T080000Z",
-                "20150530T080000Z", "20150829T080000Z", "20151031T080000Z",
-                "20160130T080000Z", "20160430T080000Z", "20160730T080000Z"],
-               false);
+                                         "END:VEVENT\nEND:VCALENDAR\n"), [
+                                             "20150202T080000Z", "20150530T080000Z", "20150829T080000Z",
+                                             "20151031T080000Z", "20160130T080000Z", "20160430T080000Z",
+                                             "20160730T080000Z"
+                                         ], false);
 
     // Bug 419490 - Monthly recurrence, the fifth Wednesday every two months starting from February.
     // Check a monthly rule that specifies a day that is not part of the month
     // the events starts in.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                          "DESCRIPTION:Repeat Monthly the fifth Friday every two months\n" +
                                          "RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=6;BYDAY=5FR\n" +
                                          "DTSTART:20150202T080000Z\n" +
                                          "DTEND:20150202T090000Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20150202T080000Z",
-                "20151030T080000Z", "20160429T080000Z", "20161230T080000Z",
-                "20170630T080000Z", "20171229T080000Z", "20180629T080000Z"],
-               false);
+                                         "END:VEVENT\nEND:VCALENDAR\n"), [
+                                             "20150202T080000Z", "20151030T080000Z", "20160429T080000Z",
+                                             "20161230T080000Z", "20170630T080000Z", "20171229T080000Z",
+                                             "20180629T080000Z"
+                                         ], false);
 
     // Bugs 419490, 958974 - Monthly recurrence, the 2nd Monday, 5th Wednesday and the 5th to last Saturday every month starting from February.
     // Check a monthly rule that specifies a day that is not part of the month
     // the events starts in with positive and negative position along with other byday.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                          "DESCRIPTION:Repeat Monthly the 2nd Monday, 5th Wednesday and the 5th to last Saturday every month\n" +
                                          "RRULE:FREQ=MONTHLY;COUNT=7;BYDAY=2MO,-5WE,5SA\n" +
                                          "DTSTART:20150401T080000Z\n" +
                                          "DTEND:20150401T090000Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20150401T080000Z",
-                "20150413T080000Z", "20150511T080000Z", "20150530T080000Z",
-                "20150608T080000Z", "20150701T080000Z", "20150713T080000Z"],
-               false);
+                                         "END:VEVENT\nEND:VCALENDAR\n"), [
+                                             "20150401T080000Z", "20150413T080000Z", "20150511T080000Z",
+                                             "20150530T080000Z", "20150608T080000Z", "20150701T080000Z",
+                                             "20150713T080000Z"
+                                         ], false);
 
     // Bug 1146500 - Monthly recurrence, every MO and FR when are odd days starting from the 1st of March.
     // Check the first occurrence when we have BYDAY along with BYMONTHDAY.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                          "DESCRIPTION:Monthly recurrence, every MO and FR when are odd days starting from the 1st of March\n" +
                                          "RRULE:FREQ=MONTHLY;BYDAY=MO,FR;BYMONTHDAY=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31;COUNT=4\n" +
                                          "DTSTART:20150301T080000Z\n" +
                                          "DTEND:20150301T090000Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20150301T080000Z",
-                "20150309T080000Z", "20150313T080000Z", "20150323T080000Z", "20150327T080000Z"],
-               false);
+                                         "END:VEVENT\nEND:VCALENDAR\n"), [
+                                             "20150301T080000Z", "20150309T080000Z", "20150313T080000Z",
+                                             "20150323T080000Z", "20150327T080000Z"
+                                         ], false);
 
     // Bug 1146500 - Monthly recurrence, every MO and FR when are odd days starting from the 1st of April.
     // Check the first occurrence when we have BYDAY along with BYMONTHDAY.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                          "DESCRIPTION:Monthly recurrence, every MO and FR when are odd days starting from the 1st of March\n" +
                                          "RRULE:FREQ=MONTHLY;BYDAY=MO,FR;BYMONTHDAY=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31;COUNT=4\n" +
                                          "DTSTART:20150401T080000Z\n" +
                                          "DTEND:20150401T090000Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20150401T080000Z",
-                "20150403T080000Z", "20150413T080000Z", "20150417T080000Z", "20150427T080000Z"],
-               false);
+                                         "END:VEVENT\nEND:VCALENDAR\n"), [
+                                             "20150401T080000Z", "20150403T080000Z", "20150413T080000Z",
+                                             "20150417T080000Z", "20150427T080000Z"
+                                         ], false);
 
     // Bug 1146500 - Monthly recurrence, every MO and FR when are odd days starting from the 1st of April.
     // Check the first occurrence when we have BYDAY along with BYMONTHDAY.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                          "DESCRIPTION:Monthly recurrence, every MO and FR when are odd days starting from the 1st of March\n" +
                                          "RRULE:FREQ=MONTHLY;BYDAY=MO,SA;BYMONTHDAY=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31;COUNT=4\n" +
                                          "DTSTART:20150401T080000Z\n" +
                                          "DTEND:20150401T090000Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20150401T080000Z",
-                "20150411T080000Z", "20150413T080000Z", "20150425T080000Z", "20150427T080000Z"],
-               false);
+                                         "END:VEVENT\nEND:VCALENDAR\n"), [
+                                             "20150401T080000Z", "20150411T080000Z", "20150413T080000Z",
+                                             "20150425T080000Z", "20150427T080000Z"
+                                         ], false);
 
     // Bug 1146500 - Monthly every SU and FR when are odd days starting from 28 of February (BYDAY and BYMONTHDAY).
     // Check the first occurrence when we have BYDAY along with BYMONTHDAY.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                          "DESCRIPTION:Monthly recurrence, every SU and FR when are odd days starting from the 1st of March\n" +
                                          "RRULE:FREQ=MONTHLY;BYDAY=SU,FR;BYMONTHDAY=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31;COUNT=9\n" +
                                          "DTSTART:20150228T080000Z\n" +
                                          "DTEND:20150228T090000Z\n" +
-                                         "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20150228T080000Z",
-                "20150301T080000Z", "20150313T080000Z", "20150315T080000Z", "20150327T080000Z",
-                "20150329T080000Z", "20150403T080000Z", "20150405T080000Z", "20150417T080000Z",
-                "20150419T080000Z"],
-               false);
+                                         "END:VEVENT\nEND:VCALENDAR\n"), [
+                                             "20150228T080000Z", "20150301T080000Z", "20150313T080000Z",
+                                             "20150315T080000Z", "20150327T080000Z", "20150329T080000Z",
+                                             "20150403T080000Z", "20150405T080000Z", "20150417T080000Z",
+                                             "20150419T080000Z"
+                                         ], false);
 
     // Bug 1103187 - Monthly recurrence with only MONTHLY tag in the rule. Recurrence day taken
     // from the start date. Check four occurrences.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                           "DESCRIPTION:Only Monthly recurrence\n" +
                                           "RRULE:FREQ=MONTHLY;COUNT=4\n" +
                                           "DTSTART:20160404T080000Z\n" +
                                           "DTEND:20160404T090000Z\n" +
-                                          "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20160404T080000Z", "20160504T080000Z", "20160604T080000Z", "20160704T080000Z"],
-               false);
+                                          "END:VEVENT\nEND:VCALENDAR\n"), [
+                                              "20160404T080000Z", "20160504T080000Z", "20160604T080000Z",
+                                              "20160704T080000Z"
+                                          ], false);
 
     // Bug 1265554 - Monthly recurrence with only MONTHLY tag in the rule. Recurrence on the 31st
     // of the month. Check for 6 occurrences.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                           "DESCRIPTION:Only Monthly recurrence, the 31st\n" +
                                           "RRULE:FREQ=MONTHLY;COUNT=6\n" +
                                           "DTSTART:20160131T150000Z\n" +
                                           "DTEND:20160131T160000Z\n" +
-                                          "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20160131T150000Z", "20160331T150000Z", "20160531T150000Z",
-                "20160731T150000Z", "20160831T150000Z", "20161031T150000Z"],
-               false);
+                                          "END:VEVENT\nEND:VCALENDAR\n"), [
+                                              "20160131T150000Z", "20160331T150000Z", "20160531T150000Z",
+                                              "20160731T150000Z", "20160831T150000Z", "20161031T150000Z"
+                                          ], false);
 
     // Bug 1265554 - Monthly recurrence with only MONTHLY tag in the rule. Recurrence on the 31st
     // of the month every two months. Check for 6 occurrences.
     check_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" +
                                           "DESCRIPTION:Only Monthly recurrence, the 31st every 2 months\n" +
                                           "RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=6\n" +
                                           "DTSTART:20151231T150000Z\n" +
                                           "DTEND:20151231T160000Z\n" +
-                                          "END:VEVENT\nEND:VCALENDAR\n"),
-               ["20151231T150000Z", "20160831T150000Z", "20161031T150000Z",
-                "20161231T150000Z", "20170831T150000Z", "20171031T150000Z"],
-               false);
+                                          "END:VEVENT\nEND:VCALENDAR\n"), [
+                                              "20151231T150000Z", "20160831T150000Z", "20161031T150000Z",
+                                              "20161231T150000Z", "20170831T150000Z", "20171031T150000Z"
+                                          ], false);
 
     let item, occ1;
     item = makeEvent("DESCRIPTION:occurrence on day 1 moved between the occurrences " +
                                      "on days 2 and 3\n" +
                          "RRULE:FREQ=DAILY;COUNT=3\n" +
                          "DTSTART:20020402T114500Z\n");
     occ1 = item.recurrenceInfo.getOccurrenceFor(createDate(2002, 3, 2, true, 11, 45, 0));
     occ1.startDate = createDate(2002, 3, 3, true, 12, 0, 0);
--- a/calendar/test/unit/test_storage.js
+++ b/calendar/test/unit/test_storage.js
@@ -3,26 +3,28 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 function run_test() {
     do_calendar_startup(testAttachRoundtrip);
 }
 
 function testAttachRoundtrip() {
     let storage = getStorageCal();
-    let str = ["BEGIN:VEVENT",
-               "UID:attachItem",
-               "DTSTART:20120101T010101Z",
-               "ATTACH;FMTTYPE=text/calendar;ENCODING=BASE64;FILENAME=test.ics:http://example.com/test.ics",
-               "ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Name;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT;X-THING=BAR:mailto:test@example.com",
-               "RELATED-TO;RELTYPE=SIBLING;FOO=BAR:VALUE",
-               "RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=5;BYDAY=MO",
-               "RDATE:20120201T010101Z",
-               "EXDATE:20120301T010101Z",
-               "END:VEVENT"].join("\r\n");
+    let str = [
+        "BEGIN:VEVENT",
+        "UID:attachItem",
+        "DTSTART:20120101T010101Z",
+        "ATTACH;FMTTYPE=text/calendar;ENCODING=BASE64;FILENAME=test.ics:http://example.com/test.ics",
+        "ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Name;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT;X-THING=BAR:mailto:test@example.com",
+        "RELATED-TO;RELTYPE=SIBLING;FOO=BAR:VALUE",
+        "RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=5;BYDAY=MO",
+        "RDATE:20120201T010101Z",
+        "EXDATE:20120301T010101Z",
+        "END:VEVENT"
+    ].join("\r\n");
 
     let storageItem = createEventFromIcalString(str);
 
     do_test_pending();
     storage.addItem(storageItem, {
         onOperationComplete: function(calendar, status, opType, id, addedItem) {
             do_execute_soon(() => {
                 // Make sure the cache is cleared, otherwise we'll get the cached item.
--- a/calendar/test/unit/test_timezone.js
+++ b/calendar/test/unit/test_timezone.js
@@ -10,70 +10,72 @@ function run_test() {
             do_test_finished();
         }
     });
 }
 
 function really_run_test() {
     let event = cal.createEvent();
 
-    let str =
-         ["BEGIN:VCALENDAR",
-          "PRODID:-//RDU Software//NONSGML HandCal//EN",
-          "VERSION:2.0",
-          "BEGIN:VTIMEZONE",
-          "TZID:America/New_York",
-          "BEGIN:STANDARD",
-          "DTSTART:19981025T020000",
-          "TZOFFSETFROM:-0400",
-          "TZOFFSETTO:-0500",
-          "TZNAME:EST",
-          "END:STANDARD",
-          "BEGIN:DAYLIGHT",
-          "DTSTART:19990404T020000",
-          "TZOFFSETFROM:-0500",
-          "TZOFFSETTO:-0400",
-          "TZNAME:EDT",
-          "END:DAYLIGHT",
-          "END:VTIMEZONE",
-          "BEGIN:VEVENT",
-          "DTSTAMP:19980309T231000Z",
-          "UID:guid-1.example.com",
-          "ORGANIZER:mailto:mrbig@example.com",
-          "ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:",
-          " mailto:employee-A@example.com",
-          "DESCRIPTION:Project XYZ Review Meeting",
-          "CATEGORIES:MEETING",
-          "CLASS:PUBLIC",
-          "CREATED:19980309T130000Z",
-          "SUMMARY:XYZ Project Review",
-          "DTSTART;TZID=America/New_York:19980312T083000",
-          "DTEND;TZID=America/New_York:19980312T093000",
-          "LOCATION:1CP Conference Room 4350",
-          "END:VEVENT",
-          "END:VCALENDAR",
-          ""].join("\r\n");
+    let str = [
+        "BEGIN:VCALENDAR",
+        "PRODID:-//RDU Software//NONSGML HandCal//EN",
+        "VERSION:2.0",
+        "BEGIN:VTIMEZONE",
+        "TZID:America/New_York",
+        "BEGIN:STANDARD",
+        "DTSTART:19981025T020000",
+        "TZOFFSETFROM:-0400",
+        "TZOFFSETTO:-0500",
+        "TZNAME:EST",
+        "END:STANDARD",
+        "BEGIN:DAYLIGHT",
+        "DTSTART:19990404T020000",
+        "TZOFFSETFROM:-0500",
+        "TZOFFSETTO:-0400",
+        "TZNAME:EDT",
+        "END:DAYLIGHT",
+        "END:VTIMEZONE",
+        "BEGIN:VEVENT",
+        "DTSTAMP:19980309T231000Z",
+        "UID:guid-1.example.com",
+        "ORGANIZER:mailto:mrbig@example.com",
+        "ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:",
+        " mailto:employee-A@example.com",
+        "DESCRIPTION:Project XYZ Review Meeting",
+        "CATEGORIES:MEETING",
+        "CLASS:PUBLIC",
+        "CREATED:19980309T130000Z",
+        "SUMMARY:XYZ Project Review",
+        "DTSTART;TZID=America/New_York:19980312T083000",
+        "DTEND;TZID=America/New_York:19980312T093000",
+        "LOCATION:1CP Conference Room 4350",
+        "END:VEVENT",
+        "END:VCALENDAR",
+        ""
+    ].join("\r\n");
 
-    let strTz =
-         ["BEGIN:VTIMEZONE",
-          "TZID:America/New_York",
-          "BEGIN:STANDARD",
-          "DTSTART:19981025T020000",
-          "TZOFFSETFROM:-0400",
-          "TZOFFSETTO:-0500",
-          "TZNAME:EST",
-          "END:STANDARD",
-          "BEGIN:DAYLIGHT",
-          "DTSTART:19990404T020000",
-          "TZOFFSETFROM:-0500",
-          "TZOFFSETTO:-0400",
-          "TZNAME:EDT",
-          "END:DAYLIGHT",
-          "END:VTIMEZONE",
-          ""].join("\r\n");
+    let strTz = [
+        "BEGIN:VTIMEZONE",
+        "TZID:America/New_York",
+        "BEGIN:STANDARD",
+        "DTSTART:19981025T020000",
+        "TZOFFSETFROM:-0400",
+        "TZOFFSETTO:-0500",
+        "TZNAME:EST",
+        "END:STANDARD",
+        "BEGIN:DAYLIGHT",
+        "DTSTART:19990404T020000",
+        "TZOFFSETFROM:-0500",
+        "TZOFFSETTO:-0400",
+        "TZNAME:EDT",
+        "END:DAYLIGHT",
+        "END:VTIMEZONE",
+        ""
+    ].join("\r\n");
 
     let tzs = cal.getTimezoneService();
 
     event.icalString = str;
 
     let startDate = event.startDate;
     let endDate = event.endDate;