Bug 1280898 - Set up eslint for calendar files - enable padded-blocks rule. r=MakeMyDay
authoreslint <eslint@bugzilla.kewis.ch>
Fri, 08 Jul 2016 11:19:16 +0200
changeset 25965 a7312b12f00f6b39084b768a6252669ed641d0b4
parent 25964 830d0c78b66315d9a78a687da644559dc748bb95
child 25966 332b96ae958ea1363628fb66362bd7533e2b613c
push id1771
push userclokep@gmail.com
push dateMon, 14 Nov 2016 17:47:53 +0000
treeherdercomm-beta@399ae9d71595 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMakeMyDay
bugs1280898
Bug 1280898 - Set up eslint for calendar files - enable padded-blocks rule. r=MakeMyDay MozReview-Commit-ID: 5lyblIK0it5
calendar/.eslintrc
calendar/base/content/agenda-listbox.js
calendar/base/content/calendar-base-view.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-view.js
calendar/base/content/calendar-ui-utils.js
calendar/base/content/calendar-views.js
calendar/base/content/dialogs/calendar-alarm-dialog.js
calendar/base/content/dialogs/calendar-dialog-utils.js
calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
calendar/base/content/dialogs/calendar-event-dialog-recurrence-preview.xml
calendar/base/content/dialogs/calendar-print-dialog.js
calendar/base/content/dialogs/calendar-summary-dialog.js
calendar/base/content/import-export.js
calendar/base/content/widgets/calendar-list-tree.xml
calendar/base/modules/calAuthUtils.jsm
calendar/base/modules/calExtract.jsm
calendar/base/modules/calItipUtils.jsm
calendar/base/modules/calProviderUtils.jsm
calendar/base/modules/calRecurrenceUtils.jsm
calendar/base/src/calAlarm.js
calendar/base/src/calAlarmService.js
calendar/base/src/calCalendarManager.js
calendar/base/src/calTransactionManager.js
calendar/base/src/calUtils.js
calendar/import-export/calOutlookCSVImportExport.js
calendar/import-export/calWeekPrinter.js
calendar/lightning/content/imip-bar.js
calendar/lightning/content/lightning-item-iframe.js
calendar/lightning/content/lightning-item-panel.js
calendar/lightning/content/messenger-overlay-sidebar.js
calendar/lightning/content/suite-overlay-sidebar.js
calendar/providers/caldav/calDavCalendar.js
calendar/providers/caldav/calDavRequestHandlers.js
calendar/providers/ics/calICSCalendar.js
calendar/providers/storage/calStorageCalendar.js
calendar/providers/storage/calStorageUpgrade.jsm
calendar/providers/wcap/calWcapCalendar.js
calendar/providers/wcap/calWcapCalendarItems.js
calendar/providers/wcap/calWcapSession.js
calendar/resources/content/publish.js
calendar/test/unit/test_alarm.js
calendar/test/unit/test_alarmutils.js
calendar/test/unit/test_attendee.js
calendar/test/unit/test_bug759324.js
calendar/test/unit/test_datetime_before_1970.js
calendar/test/unit/test_freebusy_service.js
calendar/test/unit/test_ics_parser.js
calendar/test/unit/test_ics_service.js
calendar/test/unit/test_items.js
calendar/test/unit/test_recur.js
calendar/test/unit/test_search_service.js
calendar/test/unit/test_weekinfo_service.js
--- a/calendar/.eslintrc
+++ b/calendar/.eslintrc
@@ -157,16 +157,19 @@
 
     // Disallow use of comma operator.
     "no-sequences": 2,
 
     // Disallow use of assignment in return statement. It is preferable for a
     // single line of code to have only one easily predictable effect.
     "no-return-assign": 2,
 
+    // Disallow padding within blocks.
+    "padded-blocks": [2, "never"],
+
     // Will enable these rules later
     "block-spacing": 0,
     "no-lonely-if": 0,
     "space-before-blocks": 0,
     "computed-property-spacing": 0,
     "consistent-return": 0,
     "no-redeclare": 0,
     "no-empty": 0,
--- a/calendar/base/content/agenda-listbox.js
+++ b/calendar/base/content/agenda-listbox.js
@@ -1125,17 +1125,16 @@ var gEventTimer;
  *  Pass in a function as aRefreshCallback that should be called at that time.
  *
  * @param aRefreshCallback      The function to call when the next event is
  *                                current.
  * @param aMsUntil              The number of milliseconds until the next event
  *                                is current.
  */
 function scheduleNextCurrentEventUpdate(aRefreshCallback, aMsUntil) {
-
     // Is an nsITimer/callback extreme overkill here? Yes, but it's necessary to
     // workaround bug 291386.  If we don't, we stand a decent chance of getting
     // stuck in an infinite loop.
     var udCallback = {
         notify: function(timer) {
             aRefreshCallback();
         }
     };
--- a/calendar/base/content/calendar-base-view.xml
+++ b/calendar/base/content/calendar-base-view.xml
@@ -74,17 +74,16 @@
             onEndBatch: function onEndBatch() {
             },
 
             onLoad: function onLoad() {
                 this.calView.refresh();
             },
 
             onAddItem: function onAddItem(aItem) {
-
                 if (cal.isToDo(aItem)) {
                     if (!aItem.entryDate && !aItem.dueDate) {
                         return;
                     }
                     if (!this.calView.mTasksInView){
                         return;
                     }
                     if (aItem.isCompleted && !this.calView.mShowCompleted) {
@@ -97,17 +96,16 @@
                                                        {});
                 for (let occ of occs) {
                     this.calView.doAddItem(occ);
                 }
                 return;
             },
 
             onModifyItem: function onModifyItem(aNewItem, aOldItem) {
-
                 if (cal.isToDo(aNewItem) && cal.isToDo(aOldItem) &&
                     !this.calView.mTasksInView) {
                     return;
                 }
                 let occs;
 
                 if (!cal.isToDo(aOldItem) || aOldItem.entryDate || aOldItem.dueDate) {
                     occs = aOldItem.getOccurrencesBetween(this.calView.startDate,
@@ -130,17 +128,16 @@
                                                       this.calView.queryEndDate,
                                                       {});
                 for (let occ of occs) {
                     this.calView.doAddItem(occ);
                 }
             },
 
             onDeleteItem: function onDeleteItem(aItem) {
-
                 if (cal.isToDo(aItem)) {
                     if (!this.calView.mTasksInView) {
                         return;
                     }
                     if (!aItem.entryDate && !aItem.dueDate) {
                         return;
                     }
                     if (aItem.isCompleted && !this.calView.mShowCompleted) {
--- a/calendar/base/content/calendar-item-editing.js
+++ b/calendar/base/content/calendar-item-editing.js
@@ -87,17 +87,16 @@ function setDefaultItemValues(aItem, aCa
             } else {
                 // All day events need to go to the beginning of the next day.
                 aItem.endDate.day++;
             }
         }
 
         // Free/busy status is only valid for events, must not be set for tasks.
         aItem.setProperty("TRANSP", cal.getEventDefaultTransparency(aForceAllday));
-
     } else if (cal.isToDo(aItem)) {
         let now = cal.now();
         let initDate = initialDate ? initialDate.clone() : now;
         initDate.isDate = false;
         initDate.hour = now.hour;
         initDate.minute = now.minute;
         initDate.second = now.second;
 
--- a/calendar/base/content/calendar-management.js
+++ b/calendar/base/content/calendar-management.js
@@ -408,17 +408,16 @@ var calendarOfflineManager = {
             throw Components.results.NS_ERROR_NOT_INITIALIZED;
         }
         Services.obs.removeObserver(this, "network:offline-status-changed", false);
         this.initialized = false;
     },
 
     isOnline: function cOM_isOnline() {
         return (!Services.io.offline);
-
     },
 
     updateOfflineUI: function cOM_updateOfflineUI(aIsOffline) {
         // Refresh the current view
         currentView().goToDay(currentView().selectedDay);
 
         // Set up disabled locks for offline
         document.commandDispatcher.updateCommands("calendar_commands");
--- a/calendar/base/content/calendar-month-view.xml
+++ b/calendar/base/content/calendar-month-view.xml
@@ -679,17 +679,16 @@
           }
 
           // Check whether view range has been changed since last call to
           // relayout()
           if (!this.mViewStart || !this.mViewEnd ||
               this.mViewEnd.compare(viewEnd) != 0 ||
               this.mViewStart.compare(viewStart) != 0 ||
               this.mToggleStatus != toggleStatus) {
-
               this.refresh();
           }
 
         ]]></body>
       </method>
 
       <method name="getDateList">
         <parameter name="aCount"/>
--- a/calendar/base/content/calendar-multiday-view.xml
+++ b/calendar/base/content/calendar-multiday-view.xml
@@ -721,17 +721,16 @@
           stack.setAttribute("flex", "1");
           this.topbox.appendChild(stack);
 
           let boxToEdit;
           let columnCount = 1;
           let spanTotal = 0;
 
           for (let layer of this.mEventMap) {
-
               // The event-map (this.mEventMap) contains an array of layers.
               // For each layer we create a box below the stack just created above.
               // So each different layer lives in a box that's contained in the stack.
               let xulColumn = createXULElement("box");
               xulColumn.setAttribute("orient", otherorient);
               xulColumn.setAttribute("flex", "1");
               xulColumn.setAttribute("style", "min-width: 1px; min-height: 1px;");
               stack.appendChild(xulColumn);
@@ -781,17 +780,16 @@
                                                 this.getAttribute("item-context") ||
                                                   this.getAttribute("context"));
                           chunkBox.setAttribute("orient", orient);
 
                           // Set the gripBars visibility in the chunk. Keep it
                           // hidden for tasks with only entry date OR due date.
                           if ((chunk.event.entryDate || !chunk.event.dueDate) &&
                               (!chunk.event.entryDate || chunk.event.dueDate)) {
-
                               let startGripVisible = (chunk.event.startDate || chunk.event.entryDate)
                                                          .compare(chunk.startDate) == 0;
                               let endGripVisible = (chunk.event.endDate || chunk.event.dueDate)
                                                        .compare(chunk.endDate) <= 0;
                               if (startGripVisible && endGripVisible) {
                                   chunkBox.setAttribute("gripBars", "both");
                               } else if (endGripVisible) {
                                   chunkBox.setAttribute("gripBars", "end");
@@ -1117,22 +1115,20 @@
           //   columns won't actually have the same size, but will only all
           //   be multiples of a common size.  See the note in the relayout
           //   function for more info on this (fairly rare) case.
           var layers = [];
 
           // When we start a new blob, move to a new set of layers
           var layerOffset = 0;
           for (var glob of aBlobs) {
-
               var layerArray = [];
               var layerCounter = 1;
 
               for (var data of glob.blob) {
-
                   // from the item at hand we need to figure out on which
                   // layer and on which column it should go.
                   var layerIndex;
                   var specialSpan = null;
 
                   // each blob receives its own layer, that's the first part of the story. within
                   // a given blob we need to distribute the items on different layers depending on
                   // the number of columns each item spans. if each item just spans a single column
@@ -1446,17 +1442,16 @@
 
           // If we leave the view, then stop our internal sweeping and start a
           // real drag session. Someday we need to fix the sweep to soely be a
           // drag session, no sweeping.
           if (event.clientX < (event.target.boxObject.x) ||
               event.clientX > (event.target.boxObject.x + event.target.boxObject.width) ||
               event.clientY < (event.target.boxObject.y) ||
               event.clientY > (event.target.boxObject.y + event.target.boxObject.height)) {
-
               // 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");
               }
 
@@ -1860,17 +1855,16 @@
               this.mDragState.offset = shadowElements.offset;
               this.updateShadowsBoxes(this.mDragState.origMin, this.mDragState.endMin,
                                       0, this.mDragState.shadows,
                                       sizeattr);
 
               // update drag labels
               let lastCol = this.firstLastShadowColumns().lastCol;
               this.updateDragLabels(this, lastCol);
-
           } else if (aGrabbedElement == "end") {
               this.mDragState.dragType = "modify-end";
               // we have to use "realStart" as fixed end value
               this.mDragState.limitStartMin = mins.realStart;
 
               // snap end
               this.mDragState.origMin = Math.floor(mins.end / snapIntMin) * snapIntMin;
 
@@ -1883,17 +1877,16 @@
               this.mDragState.offset = shadowElements.offset;
               this.updateShadowsBoxes(this.mDragState.startMin, this.mDragState.endMin,
                                       shadowElements.offset, this.mDragState.shadows,
                                       sizeattr);
 
               // update drag labels
               let firstCol = this.firstLastShadowColumns().firstCol;
               this.updateDragLabels(firstCol, this);
-
           } else if (aGrabbedElement == "middle") {
               this.mDragState.dragType = "move";
               // in a move, origMin will be the start minute of the element where
               // the drag occurs. Along with mouseOffset, it allows to track the
               // shadow position. origMinStart and origMinEnd allow to figure out
               // the real shadow size.
               // We snap to the start and add the real duration to find the end
               let limitDurationMin = mins.realEnd - mins.realStart;
@@ -1993,18 +1986,17 @@
         <parameter name="aDayStartMin"/>
         <parameter name="aDayEndMin"/>
         <body><![CDATA[
           if (aDayStartMin < this.mStartMin || aDayStartMin > aDayEndMin ||
             aDayEndMin > this.mEndMin) {
             throw Components.results.NS_ERROR_INVALID_ARG;
           }
           if (this.mDayStartMin != aDayStartMin ||
-            this.mDayEndMin != aDayEndMin) {
-
+              this.mDayEndMin != aDayEndMin) {
             this.mDayStartMin = aDayStartMin;
             this.mDayEndMin = aDayEndMin;
           }
         ]]></body>
       </method>
 
       <method name="getClickedDateTime">
         <parameter name="event"/>
@@ -2192,17 +2184,16 @@
 
       <method name="selectOccurrence">
         <parameter name="aItem"/>
         <body><![CDATA[
           for (let itemBox of this.mItemBoxes) {
             if (aItem && (itemBox.occurrence.hashId == aItem.hashId)) {
               itemBox.selected = true;
             }
-
           }
         ]]></body>
       </method>
       <method name="unselectOccurrence">
         <parameter name="aItem"/>
         <body><![CDATA[
           for (let itemBox of this.mItemBoxes) {
             if (aItem && (itemBox.occurrence.hashId == aItem.hashId)) {
@@ -2911,20 +2902,18 @@
           }
 
           // Check whether view range has been changed since last call to
           // relayout()
           if (!this.mViewStart || !this.mViewEnd ||
               this.mViewEnd.compare(viewEnd) != 0 ||
               this.mViewStart.compare(viewStart) != 0 ||
               this.mToggleStatus != toggleStatus) {
-
               this.refresh();
           }
-
         ]]></body>
       </method>
 
       <method name="getDateList">
         <parameter name="aCount"/>
         <body><![CDATA[
            let dates = [];
            if (this.mStartDate && this.mEndDate) {
@@ -3795,18 +3784,17 @@
         <parameter name="aDayStartMin"/>
         <parameter name="aDayEndMin"/>
         <body><![CDATA[
           if (aDayStartMin < this.mStartMin || aDayStartMin > aDayEndMin ||
             aDayEndMin > this.mEndMin) {
             throw Components.results.NS_ERROR_INVALID_ARG;
           }
           if (this.mDayStartMin != aDayStartMin ||
-            this.mDayEndMin != aDayEndMin) {
-
+              this.mDayEndMin != aDayEndMin) {
             this.mDayStartMin = aDayStartMin;
             this.mDayEndMin = aDayEndMin;
 
             // Also update on the time-bar
             document.getAnonymousElementByAttribute(this, "anonid", "timebar")
                     .setDayStartEndHours(this.mDayStartMin / 60,
                                          this.mDayEndMin / 60);
           }
--- a/calendar/base/content/calendar-task-view.js
+++ b/calendar/base/content/calendar-task-view.js
@@ -10,30 +10,28 @@ var taskDetailsView = {
 
     /**
      * Task Details Events
      *
      * XXXberend Please document this function, possibly also consolidate since
      * its the only function in taskDetailsView.
      */
     onSelect: function tDV_onSelect(event) {
-
         var dateFormatter =
             Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
             .getService(Components.interfaces.calIDateTimeFormatter);
 
         function displayElement(id, flag) {
             setBooleanAttribute(id, "hidden", !flag);
             return flag;
         }
 
         var item = document.getElementById("calendar-task-tree").currentTask;
         if (displayElement("calendar-task-details-container", item != null) &&
             displayElement("calendar-task-view-splitter", item != null)) {
-
             displayElement("calendar-task-details-title-row", true);
             document.getElementById("calendar-task-details-title").textContent =
                 (item.title ? item.title.replace(/\n/g, ' ') : "");
 
             var organizer = item.organizer;
             if (displayElement("calendar-task-details-organizer-row", organizer != null)) {
                 var name = organizer.commonName;
                 if (!name || name.length <= 0) {
--- a/calendar/base/content/calendar-ui-utils.js
+++ b/calendar/base/content/calendar-ui-utils.js
@@ -142,17 +142,16 @@ function disableElement(aElement) {
  * the given key (lockId). In case the control should be
  * enabled again the lock gets removed, but the control only
  * gets enabled if *all* possibly held locks have been removed.
  *
  * @param elementId     The element ID of the element to disable.
  * @param lockId        The ID of the lock to set.
  */
 function disableElementWithLock(elementId, lockId) {
-
     // unconditionally disable the element.
     disableElement(elementId);
 
     // remember that this element has been locked with
     // the key passed as argument. we keep a primitive
     // form of ref-count in the attribute 'lock'.
     var element = document.getElementById(elementId);
     if (element) {
@@ -169,17 +168,16 @@ function disableElementWithLock(elementI
  * above defined function 'disableElementWithLock()'.
  * See the respective comment for further details.
  *
  * @see disableElementWithLock
  * @param elementId     The element ID of the element to enable.
  * @param lockId        The ID of the lock to set.
  */
 function enableElementWithLock(elementId, lockId) {
-
     var element = document.getElementById(elementId);
     if (!element) {
         dump("unable to find " + elementId + "\n");
         return;
     }
 
     if (element.hasAttribute(lockId)) {
         element.removeAttribute(lockId);
--- a/calendar/base/content/calendar-views.js
+++ b/calendar/base/content/calendar-views.js
@@ -22,17 +22,16 @@ var calendarViewController = {
         return this;
     },
 
     /**
      * Creates a new event
      * @see calICalendarViewController
      */
     createNewEvent: function (aCalendar, aStartTime, aEndTime, aForceAllday) {
-
         // if we're given both times, skip the dialog
         if (aStartTime && aEndTime && !aStartTime.isDate && !aEndTime.isDate) {
             let item = cal.createEvent();
             setDefaultItemValues(item, aCalendar, aStartTime, aEndTime);
             item.title = calGetString("calendar", "newEvent");
             doTransaction('add', item, item.calendar, null, null);
         } else {
             createEventWithDialog(aCalendar, aStartTime, null, null, null, aForceAllday);
--- a/calendar/base/content/dialogs/calendar-alarm-dialog.js
+++ b/calendar/base/content/dialogs/calendar-alarm-dialog.js
@@ -296,17 +296,16 @@ function removeWidgetFor(aItem, aAlarm) 
     let hashId = aItem.hashId;
     let alarmRichlist = document.getElementById("alarm-richlist");
     let nodes = alarmRichlist.childNodes;
     let notfound = true;
     for (let i = nodes.length - 1; notfound && i >= 0; --i) {
         let widget = nodes[i];
         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);
--- a/calendar/base/content/dialogs/calendar-dialog-utils.js
+++ b/calendar/base/content/dialogs/calendar-dialog-utils.js
@@ -549,21 +549,20 @@ function updateLink() {
         }, 0);
     }
 }
 
 /*
  * setup attendees in event and summary dialog
  */
 function setupAttendees() {
-
     let attBox = document.getElementById("item-attendees-box");
     let attBoxRows = attBox.getElementsByClassName("item-attendees-row");
+
     if (window.attendees && window.attendees.length > 0) {
-
         // cloning of the template nodes
         let selector = "#item-attendees-box-template .item-attendees-row";
         let clonedRow = document.querySelector(selector).cloneNode(false);
         selector = "#item-attendees-box-template .item-attendees-row box:nth-of-type(1)";
         let clonedCell = document.querySelector(selector).cloneNode(true);
         selector = "#item-attendees-box-template .item-attendees-row box:nth-of-type(2)";
         let clonedSpacer = document.querySelector(selector).cloneNode(false);
 
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
@@ -477,17 +477,16 @@
               try {
                 abDir = allAddressBooks.getNext()
                                   .QueryInterface(Components.interfaces.nsIAbDirectory);
               } catch (ex) {
                 cal.WARN("[eventDialog] Error Encountered" + ex);
               }
 
               if (abDir != null && abDir.supportsMailingLists) {
-
                 let childNodes = abDir.childNodes;
                 while (childNodes.hasMoreElements()) {
                   let dir = null;
                   try {
                     dir = childNodes.getNext().QueryInterface(Components.interfaces.nsIAbDirectory);
                   } catch (ex) {
                     cal.WARN("[eventDialog] Error Encountered" + ex);
                   }
--- a/calendar/base/content/dialogs/calendar-event-dialog-recurrence-preview.xml
+++ b/calendar/base/content/dialogs/calendar-event-dialog-recurrence-preview.xml
@@ -179,28 +179,25 @@
           start.second = 0;
           var end = start.clone();
           end.month++;
 
           // the 'minimonth' controls are arranged in a
           // grid, sorted by rows first -> iterate the rows that may exist.
           var row = document.getAnonymousElementByAttribute(this, "anonid", "row");
           while (row) {
-
               // now iterater all the child nodes of this row
               // in order to visit each minimonth in turn.
               var numChilds = row.childNodes.length - 1;
               for (var i = 0; i < numChilds; i++) {
-
                   // we now have one of the minimonth controls while 'start'
                   // and 'end' are set to the interval this minimonth shows.
                   var minimonth = row.childNodes[i];
                   minimonth.showMonth(cal.dateTimeToJsDate(start));
                   if (aRecurrenceInfo) {
-
                       // retrieve an array of dates that represents all occurrences
                       // that fall into this time interval [start,end[.
                       // note: the following loop assumes that this array conains
                       // dates that are strictly monotonically increasing.
                       // should getOccurrenceDates() not enforce this assumption we
                       // need to fall back to some different algorithm.
                       var dates = aRecurrenceInfo.getOccurrenceDates(start, end, 0, {});
 
--- a/calendar/base/content/dialogs/calendar-print-dialog.js
+++ b/calendar/base/content/dialogs/calendar-print-dialog.js
@@ -244,17 +244,16 @@ function refreshHtml(finishFunc) {
 }
 
 /**
  * This is a nsIWebProgressListener that closes the dialog on completion, makes
  * sure printing works without issues
  */
 var closeOnComplete = {
     onStateChange: function onStateChange(aProgress, aRequest, aStateFlags, aStatus) {
-
         if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) {
             // The request is complete, close the window.
             document.documentElement.cancelDialog();
         }
     },
 
     onProgressChange: function() {},
     onLocationChange: function() {},
--- a/calendar/base/content/dialogs/calendar-summary-dialog.js
+++ b/calendar/base/content/dialogs/calendar-summary-dialog.js
@@ -19,23 +19,21 @@ function onLoad() {
 
     // the calling entity provides us with an object that is responsible
     // for recording details about the initiated modification. the 'finalize'-property
     // is our hook in order to receive a notification in case the operation needs
     // to be terminated prematurely. this function will be called if the calling
     // entity needs to immediately terminate the pending modification. in this
     // case we serialize the item and close the window.
     if (args.job) {
-
         // keep this context...
         var self = this;
 
         // store the 'finalize'-functor in the provided job-object.
         args.job.finalize = function finalize() {
-
             // store any pending modifications...
             self.onAccept();
 
             let item = window.calendarItem;
 
             // ...and close the window.
             window.close();
 
--- a/calendar/base/content/import-export.js
+++ b/calendar/base/content/import-export.js
@@ -60,17 +60,16 @@ function loadEventsFromFile(aCalendar) {
             currentListLength++;
         }
     }
 
     let rv = fp.show();
 
     if (rv != nsIFilePicker.returnCancel &&
         fp.file && fp.file.path && fp.file.path.length > 0) {
-
         let filterIndex = fp.filterIndex;
         if (fp.filterIndex < 0 || fp.filterIndex > contractids.length) {
             // For some reason the wrong filter was selected, assume default extension
             filterIndex = defaultCIDIndex;
         }
 
         let filePath = fp.file.path;
         let importer = Components.classes[contractids[filterIndex]]
--- a/calendar/base/content/widgets/calendar-list-tree.xml
+++ b/calendar/base/content/widgets/calendar-list-tree.xml
@@ -598,17 +598,16 @@
               // If we have a client point, get the row directly from the client
               // point.
               aRow = aRow || {};
               this.treebox.getCellAt(event.clientX,
                                      event.clientY,
                                      aRow,
                                      aCol || {},
                                      {});
-
           } else {
               // Otherwise, we can try to get the context calendar from the popupNode.
               if (document.popupNode && document.popupNode.contextCalendar) {
                   return document.popupNode.contextCalendar;
               }
           }
           return aRow && aRow.value > -1 && this.mCalendarList[aRow.value];
         ]]></body>
--- a/calendar/base/modules/calAuthUtils.jsm
+++ b/calendar/base/modules/calAuthUtils.jsm
@@ -33,17 +33,16 @@ cal.auth = {
      * @return  Could a password be retrieved?
      */
     getCredentials: function calGetCredentials(aTitle,
                                                aCalendarName,
                                                aUsername,
                                                aPassword,
                                                aSavePassword,
                                                aFixedUsername) {
-
         if (typeof aUsername != "object" ||
             typeof aPassword != "object" ||
             typeof aSavePassword != "object") {
             throw new Components.Exception("", Components.results.NS_ERROR_XPC_NEED_OUT_OBJECT);
         }
 
         let prompter = Services.ww.getNewPrompter(null);
 
--- a/calendar/base/modules/calExtract.jsm
+++ b/calendar/base/modules/calExtract.jsm
@@ -370,17 +370,16 @@ Extractor.prototype = {
             while ((res = re.exec(this.email)) != null) {
                 if (!this.limitNums(res, this.email) && !this.limitChars(res, this.email)) {
                     let day = parseInt(res[positions[1]], 10);
                     let month = parseInt(res[positions[2]], 10);
                     let year = parseInt(this.normalizeYear(res[positions[3]]), 10);
 
                     if (this.isValidDay(day) && this.isValidMonth(month) &&
                         this.isValidYear(year)) {
-
                         let rev = this.prefixSuffixStartEnd(res, relation, this.email);
                         this.guess(year, month, day, null, null,
                                    rev.start, rev.end, rev.pattern, rev.relation, pattern);
                     }
                 }
             }
         }
     },
@@ -706,17 +705,16 @@ Extractor.prototype = {
                 // included but not exactly the same
                 if (outer != inner &&
                     this.collected[outer].start && this.collected[outer].end &&
                     this.collected[inner].start && this.collected[inner].end &&
                     this.collected[inner].start >= this.collected[outer].start &&
                     this.collected[inner].end <= this.collected[outer].end &&
                     !(this.collected[inner].start == this.collected[outer].start &&
                         this.collected[inner].end == this.collected[outer].end)) {
-
                         cal.LOG("[calExtract] " + this.collected[outer].str + " found as well, disgarding " + this.collected[inner].str);
                         this.collected[inner].relation = "notadatetime";
                 }
             }
         }
     },
 
     markSelected: function markSelected(sel, title) {
--- a/calendar/base/modules/calItipUtils.jsm
+++ b/calendar/base/modules/calItipUtils.jsm
@@ -264,17 +264,16 @@ cal.itip = {
                 }
                 if (delTime) {
                     data.label = _gs("imipBarReplyToRecentlyRemovedItem", [delTime.toString()]);
                 } else {
                     data.label = _gs("imipBarReplyToNotExistingItem");
                 }
             }
         } else if (Components.isSuccessCode(rc)) {
-
             cal.LOG("iTIP options on: " + actionFunc.method);
             switch (actionFunc.method) {
                 case "REPLY":
                     // fall-thru intended
                 case "PUBLISH:UPDATE":
                 case "REQUEST:UPDATE-MINOR":
                     data.label = _gs("imipBarUpdateText");
                     data.buttons.push("imipUpdateButton");
@@ -541,17 +540,16 @@ cal.itip = {
 
     /**
      * Scope: iTIP message sender
      *
      * Checks to see if e.g. attendees were added/removed or an item has been
      * deleted and sends out appropriate iTIP messages.
      */
     checkAndSend: function cal_itip_checkAndSend(aOpType, aItem, aOriginalItem) {
-
         // balance out parts of the modification vs delete confusion, deletion of occurrences
         // are notified as parent modifications and modifications of occurrences are notified
         // as mixed new-occurrence, old-parent (IIRC).
         if (aOriginalItem && aItem.recurrenceInfo) {
             if (aOriginalItem.recurrenceId && !aItem.recurrenceId) {
                 // sanity check: assure aItem doesn't refer to the master
                 aItem = aItem.recurrenceInfo.getOccurrenceFor(aOriginalItem.recurrenceId);
                 cal.ASSERT(aItem, "unexpected!");
@@ -560,17 +558,16 @@ cal.itip = {
                 }
             }
 
             if (aOriginalItem.recurrenceInfo && aItem.recurrenceInfo) {
                 // check whether the two differ only in EXDATEs
                 let clonedItem = aItem.clone();
                 let exdates = [];
                 for (let ritem of clonedItem.recurrenceInfo.getRecurrenceItems({})) {
-
                     let wrappedRItem = cal.wrapInstance(ritem, Components.interfaces.calIRecurrenceDate);
                     if (ritem.isNegative &&
                         wrappedRItem &&
                         !aOriginalItem.recurrenceInfo.getRecurrenceItems({}).some(
                             function(r) {
                                 let wrappedR = cal.wrapInstance(r, Components.interfaces.calIRecurrenceDate);
                                 return (r.isNegative &&
                                         wrappedR &&
@@ -669,17 +666,16 @@ cal.itip = {
         if (aItem.getProperty("X-MOZ-SEND-INVITATIONS") != "TRUE") { // Only send invitations/cancellations
                                                                      // if the user checked the checkbox
             return;
         }
 
         // special handling for invitation with event status cancelled
         if (aItem.getAttendees({}).length > 0 &&
             aItem.getProperty("STATUS") == "CANCELLED") {
-
             if (cal.itip.getSequence(aItem) > 0) {
                 // make sure we send a cancellation and not an request
                 aOpType = Components.interfaces.calIOperationListener.DELETE;
             } else {
                 // don't send an invitation, if the event was newly created and has status cancelled
                 return;
             }
         }
@@ -716,23 +712,21 @@ cal.itip = {
             }
         }
 
         // setting default value to control for sending (cancellation) messages
         // this will be set to false, once the user cancels sending manually
         let sendOut = true;
         // Check to see if some part of the item was updated, if so, re-send REQUEST
         if (!aOriginalItem || (cal.itip.compare(aItem, aOriginalItem) > 0)) { // REQUEST
-
             // check whether it's a simple UPDATE (no SEQUENCE change) or real (RE)REQUEST,
             // in case of time or location/description change.
             let isMinorUpdate = (aOriginalItem && (cal.itip.getSequence(aItem) == cal.itip.getSequence(aOriginalItem)));
 
             if (!isMinorUpdate || !cal.compareItemContent(stripUserData(aItem), stripUserData(aOriginalItem))) {
-
                 let requestItem = aItem.clone();
                 if (!requestItem.organizer) {
                     requestItem.organizer = createOrganizer(requestItem.calendar);
                 }
 
                 // Fix up our attendees for invitations using some good defaults
                 let recipients = [];
                 let itemAtt = requestItem.getAttendees({});
@@ -761,17 +755,16 @@ cal.itip = {
                     addedAttendees.length > 0 &&
                     Preferences.get("calendar.itip.updateInvitationForNewAttendeesOnly", false)) {
                     recipients = addedAttendees;
                 }
 
                 if (recipients.length > 0) {
                     sendOut = sendMessage(requestItem, "REQUEST", recipients, autoResponse);
                 }
-
             }
         }
 
         // Cancel the event for all canceled attendees
         if (canceledAttendees.length > 0) {
             let cancelItem = aOriginalItem.clone();
             cancelItem.removeAllAttendees();
             for (let att of canceledAttendees) {
@@ -843,17 +836,16 @@ cal.itip = {
      * Returns a copy of an itipItem with modified properties and items build from scratch
      * Use itipItem.clone() instead if only a simple copy is required
      *
      * @param aItipItem     ItipItem to derive a new one from
      * @param aItems        List of items to be contained in the new itipItem
      * @param aProps        List of properties to be different in the new itipItem
      */
     getModifiedItipItem: function cal_getModifiedItipItem(aItipItem, aItems, aProps) {
-
         let itipItem = Components.classes["@mozilla.org/calendar/itip-item;1"]
                                  .createInstance(Components.interfaces.calIItipItem);
         let serializedItems = "";
         for (let item of (aItems || [])) {
             serializedItems += cal.getSerializedItem(item)
         }
         itipItem.init(serializedItems);
 
@@ -872,17 +864,16 @@ cal.itip = {
 
 /** 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
  */
 function setReceivedInfo(item, itipItemItem) {
-
     let wrappedItem = cal.wrapInstance(item, Components.interfaces.calIAttendee);
     item.setProperty(wrappedItem ? "RECEIVED-SEQUENCE"
                                  : "X-MOZ-RECEIVED-SEQUENCE",
                                  String(cal.itip.getSequence(itipItemItem)));
     let dtstamp = cal.itip.getStamp(itipItemItem);
     if (dtstamp) {
         item.setProperty(wrappedItem ? "RECEIVED-DTSTAMP"
                                      : "X-MOZ-RECEIVED-DTSTAMP",
@@ -1354,33 +1345,31 @@ ItipItemFinder.prototype = {
                                             // If the the user hasn't responded to the invitation yet and we
                                             // are viewing the current representation of the item, show the
                                             // accept/decline buttons. This means newer events will show the
                                             // "Update" button and older events will show the "already
                                             // processed" text.
                                             if (foundAttendee.participationStatus == "NEEDS-ACTION" &&
                                                 (item.calendar.getProperty("itip.disableRevisionChecks") ||
                                                  cal.itip.compare(itipItemItem, item) == 0)) {
-
                                                 actionMethod = "REQUEST:NEEDS-ACTION";
                                                 operations.push(function(opListener, partStat) {
                                                     let changedItem = firstFoundItem.clone();
                                                     changedItem.removeAttendee(foundAttendee);
                                                     foundAttendee = foundAttendee.clone();
                                                     if (partStat) {
                                                         foundAttendee.participationStatus = partStat;
                                                     }
                                                     changedItem.addAttendee(foundAttendee);
 
                                                     return changedItem.calendar.modifyItem(
                                                         changedItem, firstFoundItem, new ItipOpListener(opListener, firstFoundItem));
                                                 });
                                             } else if (item.calendar.getProperty("itip.disableRevisionChecks") ||
                                                        cal.itip.compare(itipItemItem, item) > 0) {
-
                                                 addScheduleAgentClient(newItem, item.calendar);
 
                                                 let isMinorUpdate = (cal.itip.getSequence(newItem) ==
                                                                      cal.itip.getSequence(item));
                                                 actionMethod = (isMinorUpdate ? method + ":UPDATE-MINOR"
                                                                               : method + ":UPDATE");
                                                 operations.push(function(opListener, partStat) {
                                                     if (!partStat) { // keep PARTSTAT
--- a/calendar/base/modules/calProviderUtils.jsm
+++ b/calendar/base/modules/calProviderUtils.jsm
@@ -250,17 +250,16 @@ cal.getEmailIdentityOfCalendar = functio
             });
         if (!identity) {
             // dangling identity:
             cal.WARN("Calendar " + (aCalendar.uri ? aCalendar.uri.spec : aCalendar.id) +
                      " has a dangling E-Mail identity configured.");
         }
         return identity;
     } else { // take default account/identity:
-
         let accounts = MailServices.accounts.accounts;
         let account = null;
         let identity = null;
         try {
             account = MailServices.accounts.defaultAccount;
         } catch (exc) {}
 
         for (let i = 0; accounts && (i < accounts.length) && (!account || !identity); ++i) {
@@ -299,17 +298,16 @@ cal.getEmailIdentityOfCalendar = functio
  * fromRFC3339
  * Convert a RFC3339 compliant Date string to a calIDateTime.
  *
  * @param aStr          The RFC3339 compliant Date String
  * @param aTimezone     The timezone this date string is most likely in
  * @return              A calIDateTime object
  */
 cal.fromRFC3339 = function fromRFC3339(aStr, aTimezone) {
-
     // XXX I have not covered leapseconds (matches[8]), this might need to
     // be done. The only reference to leap seconds I found is bug 227329.
     //
 
     // Create a DateTime instance (calUtils.js)
     let dateTime = cal.createDateTime();
 
     // Killer regex to parse RFC3339 dates
@@ -336,24 +334,22 @@ cal.fromRFC3339 = function fromRFC3339(a
         dateTime.second = matches[7];
     }
 
     // Timezone handling
     if (matches[9] == "Z" || matches[9] == "z") {
         // If the dates timezone is "Z" or "z", then this is UTC, no matter
         // what timezone was passed
         dateTime.timezone = cal.UTC();
-
     } else if (matches[9] == null) {
         // We have no timezone info, only a date. We have no way to
         // know what timezone we are in, so lets assume we are in the
         // timezone of our local calendar, or whatever was passed.
 
         dateTime.timezone = aTimezone;
-
     } else {
         let offset_in_s = (matches[11] == "-" ? -1 : 1) *
             ( (matches[12] * 3600) + (matches[13] * 60) );
 
         // try local timezone first
         dateTime.timezone = aTimezone;
 
         // If offset does not match, go through timezones. This will
@@ -387,17 +383,16 @@ cal.fromRFC3339 = function fromRFC3339(a
 /**
  * toRFC3339
  * Convert a calIDateTime to a RFC3339 compliant Date string
  *
  * @param aDateTime     The calIDateTime object
  * @return              The RFC3339 compliant date string
  */
 cal.toRFC3339 = function toRFC3339(aDateTime) {
-
     if (!aDateTime) {
         return "";
     }
 
     var full_tzoffset = aDateTime.timezoneOffset;
     var tzoffset_hr = Math.floor(Math.abs(full_tzoffset) / 3600);
 
     var tzoffset_mn = ((Math.abs(full_tzoffset) / 3600).toFixed(2) -
@@ -636,17 +631,16 @@ cal.ProviderBase.prototype = {
                                                                           aDetail) {
         if (aListener) {
             try {
                 aListener.onOperationComplete(this.superCalendar, aStatus, aOperationType, aId, aDetail);
             } catch (exc) {
                 cal.ERROR(exc);
             }
         }
-
     },
 
     notifyOperationComplete: function cPB_notifyOperationComplete(aListener,
                                                                   aStatus,
                                                                   aOperationType,
                                                                   aId,
                                                                   aDetail,
                                                                   aExtraMessage) {
--- a/calendar/base/modules/calRecurrenceUtils.jsm
+++ b/calendar/base/modules/calRecurrenceUtils.jsm
@@ -106,17 +106,16 @@ function recurrenceRule2String(recurrenc
                         } else if (i < days.length - 1) {
                             weekdays += ', ';
                         }
                     }
 
                     weeklyString = getRString(weeklyString, [weekdays]);
                     ruleString = PluralForm.get(rule.interval, weeklyString)
                                            .replace("#2", rule.interval);
-
                 } else {
                     let weeklyString = getRString("weeklyEveryNth");
                     ruleString = PluralForm.get(rule.interval, weeklyString)
                                            .replace("#1", rule.interval);
                 }
             } else if (rule.type == 'MONTHLY') {
                 if (checkRecurrenceRule(rule, ['BYDAY'])) {
                     let byday = rule.getComponent("BYDAY", {});
--- a/calendar/base/src/calAlarm.js
+++ b/calendar/base/src/calAlarm.js
@@ -633,17 +633,16 @@ calAlarm.prototype = {
 
         if (this.related == ALARM_RELATED_ABSOLUTE && this.mAbsoluteDate) {
             // this is an absolute alarm. Use the calendar default timezone and
             // format it.
             let formatter = cal.getDateFormatter();
             let formatDate = this.mAbsoluteDate.getInTimezone(cal.calendarDefaultTimezone());
             return formatter.formatDateTime(formatDate);
         } else if (this.related != ALARM_RELATED_ABSOLUTE && this.mOffset) {
-
             // Relative alarm length
             let alarmlen = Math.abs(this.mOffset.inSeconds / 60);
             if (alarmlen == 0) {
                 // No need to get the other information if the alarm is at the start
                 // of the event/task.
                 if (this.related == ALARM_RELATED_START) {
                     return calGetString("calendar-alarms",
                                         getItemBundleStringName("reminderTitleAtStart"));
--- a/calendar/base/src/calAlarmService.js
+++ b/calendar/base/src/calAlarmService.js
@@ -333,17 +333,16 @@ calAlarmService.prototype = {
                 alarmDate.isDate = false;
             }
             alarmDate = alarmDate.getInTimezone(UTC());
 
             // Check for snooze
             let snoozeDate;
             if (aItem.parentItem != aItem) {
                 snoozeDate = aItem.parentItem.getProperty("X-MOZ-SNOOZE-TIME-" + aItem.recurrenceId.nativeTime)
-
             } else {
                 snoozeDate = aItem.getProperty("X-MOZ-SNOOZE-TIME");
             }
 
             if (snoozeDate && !(snoozeDate instanceof Components.interfaces.calIDateTime)) {
                 snoozeDate = cal.createDateTime(snoozeDate);
             }
 
@@ -442,17 +441,17 @@ calAlarmService.prototype = {
 
     removeTimer: function cAS_removeTimers(aItem, aAlarm) {
             /* Is the calendar in the timer map */
         if (aItem.calendar.id in this.mTimerMap &&
             /* ...and is the item in the calendar map */
             aItem.hashId in this.mTimerMap[aItem.calendar.id] &&
             /* ...and is the alarm in the item map ? */
             aAlarm.icalString in this.mTimerMap[aItem.calendar.id][aItem.hashId]) {
-
+            // First cancel the existing timer
             let timer = this.mTimerMap[aItem.calendar.id][aItem.hashId][aAlarm.icalString];
             timer.cancel();
 
             // Remove the alarm from the item map
             delete this.mTimerMap[aItem.calendar.id][aItem.hashId][aAlarm.icalString];
 
             // If the item map is empty, remove it from the calendar map
             if (this.mTimerMap[aItem.calendar.id][aItem.hashId].toSource() == "({})") {
--- a/calendar/base/src/calCalendarManager.js
+++ b/calendar/base/src/calCalendarManager.js
@@ -310,17 +310,16 @@ calCalendarManager.prototype = {
 
             let sortOrderAr = [];
             for (let id in sortOrder) {
                 let s = sortOrder[id];
                 sortOrderAr.push(s);
             }
             Preferences.set("calendar.list.sortOrder", sortOrderAr.join(" "));
             flushPrefs();
-
         } finally {
             selectPrefs.reset();
             selectCalendars.reset();
         }
     },
 
     checkAndMigrateDB: function calmgr_checkAndMigrateDB() {
         let storageSdb = Services.dirsvc.get("ProfD", Components.interfaces.nsILocalFile);
@@ -906,17 +905,16 @@ calMgrCalendarObserver.prototype = {
     },
 
     onPropertyDeleting: function(aCalendar, aName) {
         this.onPropertyChanged(aCalendar, aName, false, true);
     },
 
     // Error announcer specific functions
     announceError: function(aCalendar, aErrNo, aMessage) {
-
         var paramBlock = Components.classes["@mozilla.org/embedcomp/dialogparam;1"]
                                    .createInstance(Components.interfaces.nsIDialogParamBlock);
         var props = Services.strings.createBundle("chrome://calendar/locale/calendar.properties");
         var errMsg;
         paramBlock.SetNumberStrings(3);
         if (!this.storedReadOnly && this.calendar.readOnly) {
             // Major errors change the calendar to readOnly
             errMsg = props.formatStringFromName("readOnlyMode", [this.calendar.name], 1);
--- a/calendar/base/src/calTransactionManager.js
+++ b/calendar/base/src/calTransactionManager.js
@@ -113,17 +113,16 @@ calTransaction.prototype = {
     mIsDoTransaction: false,
 
     onOperationComplete: function cT_onOperationComplete(aCalendar,
                                                          aStatus,
                                                          aOperationType,
                                                          aId,
                                                          aDetail) {
         if (Components.isSuccessCode(aStatus)) {
-
             cal.itip.checkAndSend(aOperationType,
                                   aDetail,
                                   this.mIsDoTransaction ? this.mOldItem : this.mItem);
 
             if (aOperationType == Components.interfaces.calIOperationListener.ADD ||
                 aOperationType == Components.interfaces.calIOperationListener.MODIFY) {
                 if (this.mIsDoTransaction) {
                     this.mItem = aDetail;
--- a/calendar/base/src/calUtils.js
+++ b/calendar/base/src/calUtils.js
@@ -1799,17 +1799,16 @@ function binaryInsertNode(parentNode, in
     // Get the index of the node before which the inserNode will be inserted
     let newIndex = binarySearch(Array.map(parentNode.childNodes, accessor), aItem, comptor);
 
     if (newIndex < 0) {
         parentNode.appendChild(insertNode);
         newIndex = 0;
     } else if (!discardDuplicates ||
         comptor(accessor(parentNode.childNodes[Math.min(newIndex, parentNode.childNodes.length - 1)]), aItem) >= 0) {
-
         // Only add the node if duplicates should not be discarded, or if
         // they should and the childNode[newIndex] == node.
         let node = parentNode.childNodes[newIndex];
         parentNode.insertBefore(insertNode, node);
     }
     return newIndex;
 }
 binaryInsertNode.defaultAccessor = n => n.item;
--- a/calendar/import-export/calOutlookCSVImportExport.js
+++ b/calendar/import-export/calOutlookCSVImportExport.js
@@ -358,17 +358,16 @@ calOutlookCSVImporter.prototype = {
                 }
 
                 // save the event into return array
                 eventArray.push(event);
             }
 
             // get next events fields
             eventFields = eventRegExp.exec(str);
-
         } while (eventRegExp.lastIndex != 0);
 
         // return results
         aCount.value = eventArray.length;
         return eventArray;
     },
 
     parseDateTime: function parseDateTime(aDate, aTime, aLocale) {
--- a/calendar/import-export/calWeekPrinter.js
+++ b/calendar/import-export/calWeekPrinter.js
@@ -58,17 +58,16 @@ calWeekPrinter.prototype = {
                 continue;
             }
             itemStartDate = itemStartDate.getInTimezone(defaultTimezone);
             itemEndDate = itemEndDate.getInTimezone(defaultTimezone);
 
             let boxDate = itemStartDate.clone();
             boxDate.isDate = true;
             for (boxDate; boxDate.compare(itemEndDate) < (itemEndDate.isDate ? 0 : 1); boxDate.day++) {
-
                 // Ignore items outside of the range, i.e tasks without start date
                 // where the end date is somewhere else.
                 if (aStart && aEnd && boxDate &&
                     (boxDate.compare(aStart) < 0 || boxDate.compare(aEnd) >= 0)) {
                     continue;
                 }
 
                 let boxDateKey = cal.print.getDateKey(boxDate);
--- a/calendar/lightning/content/imip-bar.js
+++ b/calendar/lightning/content/imip-bar.js
@@ -275,17 +275,16 @@ var ltnImipBar = {
                 msgOverlay = ltn.invitation.compareInvitationOverlay(msgOverlay, serializedOverlay,
                                                                      organizerId);
             }
         }
         msgWindow.displayHTMLInMessagePane('', msgOverlay, false);
     },
 
     executeAction: function ltnExecAction(partStat, extendResponse) {
-
         function _execAction(aActionFunc, aItipItem, aWindow, aPartStat) {
             if (cal.itip.promptCalendar(aActionFunc.method, aItipItem, aWindow)) {
                 // filter out fake partstats
                 if (aPartStat.startsWith("X-")) {
                     partstat = "";
                 }
                 // hide the buttons now, to disable pressing them twice...
                 if (aPartStat == partStat) {
--- a/calendar/lightning/content/lightning-item-iframe.js
+++ b/calendar/lightning/content/lightning-item-iframe.js
@@ -602,17 +602,16 @@ function loadDialog(aItem) {
     if (hasAttachments && attachments && attachments.length > 0) {
         for (let attachment of attachments) {
             if (gNewItemUI) {
                 if (attachment &&
                     attachment.hashId &&
                     !(attachment.hashId in gAttachMap) &&
                     // We currently only support uri attachments.
                     attachment.uri) {
-
                     itemProps.initialAttachments[attachment.hashId] = attachment;
 
                     // XXX eventually we probably need to call addAttachment(attachment)
                     // here, until this works we just call updateAttachment()
                     updateAttachment();
                 }
             } else {
                 addAttachment(attachment);
@@ -1913,17 +1912,16 @@ function loadCloudProviders() {
     let isHidden = cloudFileAccounts.accounts.length == 0;
     cmd.hidden = isHidden;
     message.argument.value = isHidden;
     sendMessage(message);
 
     let itemObjects = [];
 
     for (let [, cloudProvider] in Iterator(cloudFileAccounts.accounts)) {
-
         // Create a serializable object to pass in a message outside the iframe
         let itemObject = {};
         itemObject.displayName = cloudFileAccounts.getDisplayName(cloudProvider);
         itemObject.label = cal.calGetString("calendar-event-dialog", "attachViaFilelink", [itemObject.displayName]);
         itemObject.cloudProviderAccountKey = cloudProvider.accountKey;
         if (cloudProvider.iconClass) {
             itemObject.class = "menuitem-iconic";
             itemObject.image = cloudProvider.iconClass;
@@ -1961,17 +1959,16 @@ function attachURL() {
         if (Services.prompt.prompt(window,
                                    calGetString("calendar-event-dialog",
                                                 "specifyLinkLocation"),
                                    calGetString("calendar-event-dialog",
                                                 "enterLinkLocation"),
                                    result,
                                    null,
                                    { value: 0 })) {
-
             try {
                 // If something bogus was entered, makeURL may fail.
                 var attachment = createAttachment();
                 attachment.uri = makeURL(result.value);
                 addAttachment(attachment);
             } catch (e) {
                 // TODO We might want to show a warning instead of just not
                 // adding the file
@@ -3013,17 +3010,16 @@ function onCommandSave(aIsClosing) {
         },
         onGetResult: function() {}
     };
 
     // Let the caller decide how to handle the modified/added item. Only pass
     // the above item if we are not closing, otherwise the listener will be
     // missing its window afterwards.
     window.onAcceptCallback(item, calendar, originalItem, !aIsClosing && listener);
-
 }
 
 /**
  * This function is called when the user chooses to delete an Item
  * from the Event/Task dialog
  *
  */
 function onCommandDeleteItem() {
@@ -3483,32 +3479,30 @@ function showOrHideItemURL(aShow, aUrl) 
             // No protocol handler for the given protocol, or invalid uri
             // hideOrShow(false);
             return false;
         }
         // Only show if its either an internal protcol handler, or its external
         // and there is an external app for the scheme
         handler = cal.wrapInstance(handler, Components.interfaces.nsIExternalProtocolHandler);
         return !handler || handler.externalAppExistsForScheme(uri.scheme);
-
     } else {
         // Hide if there is no url, or the menuitem was chosen so that the url
         // should be hidden.
         return false;
     }
 }
 
 /**
  * Updates the related link on the dialog (rfc2445 URL property).
  *
  * @param {boolean} aShow  Show the link (true) or not (false)
  * @param {string} aUrl    The url
  */
 function updateItemURL(aShow, aUrl) {
-
     // Hide or show the link
     setElementValue("event-grid-link-row", !aShow && "true", "hidden");
     // The separator is not there in the summary dialog
     let separator = document.getElementById("event-grid-link-separator");
     if (separator) {
         setElementValue("event-grid-link-separator", !aShow && "true", "hidden");
     }
 
--- a/calendar/lightning/content/lightning-item-panel.js
+++ b/calendar/lightning/content/lightning-item-panel.js
@@ -213,17 +213,16 @@ 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);
-
     } 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");
@@ -905,17 +904,16 @@ function onCommandViewToolbar(aToolbarId
 /**
  * Called after the customize toolbar dialog has been closed by the
  * user. We need to restore the state of all buttons and commands of
  * all customizable toolbars.
  *
  * @param {boolean} aToolboxChanged  When true the toolbox has changed
  */
 function dialogToolboxCustomizeDone(aToolboxChanged) {
-
     // Re-enable menu items (disabled during toolbar customization).
     let menubarId = gTabmail ? "mail-menubar" : "event-menubar";
     let menubar = document.getElementById(menubarId);
     for (let menuitem of menubar.childNodes) {
         menuitem.removeAttribute("disabled");
     }
 
     // make sure our toolbar buttons have the correct enabled state restored to them...
@@ -964,17 +962,16 @@ function onCommandCustomize() {
 
 /**
  * Add menu items to the UI for attaching files using a cloud provider.
  *
  * @param {Object[]} aItemObjects  Array of objects that each contain
  *                                 data to create a menuitem
  */
 function loadCloudProviders(aItemObjects) {
-
     /**
      * Deletes any existing menu items in aParentNode that have a
      * cloudProviderAccountKey attribute.
      *
      * @param {nsIDOMNode} aParentNode  A menupopup containing menu items
      */
     function deleteAlreadyExisting(aParentNode) {
         for (let node of aParentNode.childNodes) {
@@ -992,17 +989,16 @@ function loadCloudProviders(aItemObjects
         deleteAlreadyExisting(toolbarPopup);
     }
     let optionsPopup = document.getElementById("options-attachments-menupopup");
     if (optionsPopup) {
         deleteAlreadyExisting(optionsPopup);
     }
 
     for (let itemObject of aItemObjects) {
-
         // Create a menu item.
         let item = createXULElement("menuitem");
         item.setAttribute("label", itemObject.label);
         item.setAttribute("observes", "cmd_attach_cloud");
         item.setAttribute("oncommand", "attachFileByAccountKey(event.target.cloudProviderAccountKey); event.stopPropagation();");
 
         if (itemObject.class) {
             item.setAttribute("class", itemObject.class);
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -289,17 +289,16 @@ var calendarItemTabType = {
     persistTab: function(aTab) {
         let args = aTab.iframe.contentWindow.arguments[0];
         // Serialize args, with manual handling of some properties.
         // persistTab is called even for new events/tasks in tabs that
         // were closed and never saved (for 'undo close tab'
         // functionality), thus we confirm we have the expected values.
         if (args && args.calendar && args.calendar.id &&
             args.calendarEvent && args.calendarEvent.id) {
-
             let calendarId = args.calendar.id;
             let itemId = args.calendarEvent.id;
             // Handle null args.initialStartDateValue, just for good measure.
             // Note that this is not the start date for the event or task.
             let hasDateValue = args.initialStartDateValue &&
                                args.initialStartDateValue.icalString;
             let initialStartDate = hasDateValue
                 ? args.initialStartDateValue.icalString : null;
@@ -350,17 +349,16 @@ window.addEventListener("load", function
     let tabmail = document.getElementById('tabmail');
     tabmail.registerTabType(calendarTabType);
     tabmail.registerTabType(calendarItemTabType);
     tabmail.registerTabMonitor(calendarTabMonitor);
 }, false);
 
 
 function ltnOnLoad(event) {
-
     // nuke the onload, or we get called every time there's
     // any load that occurs
     window.removeEventListener("load", ltnOnLoad, false);
 
     // Check if the binary component was loaded
     checkCalendarBinaryComponent();
 
     document.getElementById("calendarDisplayDeck").
@@ -553,17 +551,16 @@ function refreshUIBits() {
             TodayPane.setDay(now());
         }
 
         // update the unifinder
         refreshEventTree();
 
         // update today's date on todaypane button
         document.getElementById("calendar-status-todaypane-button").setUpTodayDate();
-
     } catch (exc) {
         ASSERT(false, exc);
     }
 
     // schedule our next update...
     scheduleMidnightUpdate(refreshUIBits);
 }
 
--- a/calendar/lightning/content/suite-overlay-sidebar.js
+++ b/calendar/lightning/content/suite-overlay-sidebar.js
@@ -5,17 +5,16 @@
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 var ltnSuiteUtils = {
 
   addStartupObserver: function lSU_addStartupObserver() {
     Services.obs.addObserver(this.startupObserver, "lightning-startup-done", false);
     Services.obs.addObserver(this.startupObserver, "calendar-taskview-startup-done",
                     false);
-
   },
 
   startupObserver: {
     observe: function lSU_observe(subject, topic, state) {
       if (topic != "lightning-startup-done" &&
           topic != "calendar-taskview-startup-done") {
         return;
       }
@@ -35,12 +34,11 @@ var ltnSuiteUtils = {
           toolboxCustomizeDone("mail-menubar", toolbox, aToolboxChanged);
         };
         toolbox.customizeChange = function(aEvent) {
           toolboxCustomizeChange(toolbox, aEvent);
         };
       });
     }
   }
-
 }
 
 ltnSuiteUtils.addStartupObserver();
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.js
@@ -1157,17 +1157,16 @@ calDavCalendar.prototype = {
      */
     deleteTargetCalendarItem: Task.async(function* (path) {
         let pcal = cal.async.promisifyCalendar(this.mOfflineStorage);
 
         let foundItem = (yield pcal.getItem(this.mHrefIndex[path]))[0];
         let wasInboxItem = this.mItemInfoCache[foundItem.id].isInboxItem;
         if ((wasInboxItem && this.isInbox(path)) ||
             (wasInboxItem === false && !this.isInbox(path))) {
-
             cal.LOG("CalDAV: deleting item: " + path + ", uid: " + foundItem.id);
             delete this.mHrefIndex[path];
             delete this.mItemInfoCache[foundItem.id];
             if (this.isCached) {
                 this.mOfflineStorage.deleteMetaData(foundItem.id);
             }
             yield pcal.deleteItem(foundItem);
         }
@@ -1253,17 +1252,16 @@ calDavCalendar.prototype = {
     /**
      * Retrieves a specific item from the CalDAV store.
      * Use when an outdated copy of the item is in hand.
      *
      * @param aItem       item to fetch
      * @param aListener   listener for method completion
      */
     getUpdatedItem: function caldav_getUpdatedItem(aItem, aListener, aChangeLogListener) {
-
         if (aItem == null) {
             this.notifyOperationComplete(aListener,
                                          Components.results.NS_ERROR_FAILURE,
                                          cIOL.GET,
                                          null,
                                          "passed in null item");
             return;
         }
@@ -1444,17 +1442,16 @@ calDavCalendar.prototype = {
             if (!ctag || ctag != thisCalendar.mCtag) {
                 // ctag mismatch, need to fetch calendar-data
                 thisCalendar.mProposedCtag = ctag;
                 thisCalendar.getUpdatedItems(thisCalendar.calendarUri,
                                              aChangeLogListener);
                 if (thisCalendar.verboseLogging()) {
                     cal.LOG("CalDAV: ctag mismatch on refresh, fetching data for " +
                             "calendar " + thisCalendar.name);
-
                 }
             } else {
                 if (thisCalendar.verboseLogging()) {
                     cal.LOG("CalDAV: ctag matches, no need to fetch data for " +
                             "calendar " + thisCalendar.name);
                 }
 
                 // Notify the listener, but don't return just yet...
@@ -1967,17 +1964,16 @@ calDavCalendar.prototype = {
                 dav = request.getResponseHeader("DAV");
                 if (thisCalendar.verboseLogging()) {
                     cal.LOG("CalDAV: DAV header: " + dav);
                 }
             } catch (ex) {
                 cal.LOG("CalDAV: Error getting DAV header for " + thisCalendar.name +
                         ", status " + request.responseStatus +
                         ", data: " + cal.convertByteArray(aResult, aResultLength));
-
             }
             // Google does not yet support OPTIONS but does support scheduling
             // so we'll spoof the DAV header until Google gets fixed
             if (thisCalendar.calendarUri.host == "www.google.com") {
                 dav = "calendar-schedule";
                 // Google also reports an inbox URL distinct from the calendar
                 // URL but a) doesn't use it and b) 405s on etag queries to it
                 thisCalendar.mShouldPollInbox = false;
@@ -2377,26 +2373,24 @@ calDavCalendar.prototype = {
             statusString = props.GetStringFromName("caldavRequestStatusCodeString" + status);
         } catch (e) {
             // Fallback on generic string if no string is defined for the status code
             statusString = props.GetStringFromName("caldavRequestStatusCodeStringGeneric");
         }
         return props.formatStringFromName("caldavRequestStatusCode", [ status ], 1) + ", " +
                statusString + "\n\n" +
                (extraInfo ? extraInfo : "");
-
     },
 
     //
     // calIFreeBusyProvider interface
     //
 
     getFreeBusyIntervals: function caldav_getFreeBusyIntervals(
-        aCalId, aRangeStart, aRangeEnd, aBusyTypes, aListener) {
-
+                             aCalId, aRangeStart, aRangeEnd, aBusyTypes, aListener) {
         // We explicitly don't check for hasScheduling here to allow free-busy queries
         // even in case sched is turned off.
         if (!this.outboxUrl || !this.calendarUserAddress) {
             cal.LOG("CalDAV: Calendar " + this.name + " doen't support scheduling;" +
                     " freebusy query not possible");
             aListener.onResult(null, null);
             return;
         }
@@ -2736,17 +2730,16 @@ calDavCalendar.prototype = {
     get senderAddress() {
         return this.mSenderAddress || this.calendarUserAddress;
     },
     set senderAddress(aString) {
         return (this.mSenderAddress = aString);
     },
 
     sendItems: function caldav_sendItems(aCount, aRecipients, aItipItem) {
-
         if (this.hasAutoScheduling) {
             // If auto scheduling is supported by the server we still need
             // to send out REPLIES for meetings where the ORGANIZER has the
             // parameter SCHEDULE-AGENT set to CLIENT, this property is
             // checked in in canNotify()
             if (aItipItem.responseMethod == "REPLY") {
                 let imipTransport = cal.getImipTransport(this);
                 if (imipTransport) {
@@ -2768,17 +2761,16 @@ calDavCalendar.prototype = {
             if (!attendee) {
                 return false;
             }
             // work around BUG 351589, the below just removes RSVP:
             aItipItem.setAttendeeStatus(attendee.id, attendee.participationStatus);
         }
 
         for (var item of aItipItem.getItemList({})) {
-
             var serializer = Components.classes["@mozilla.org/calendar/ics-serializer;1"]
                                        .createInstance(Components.interfaces.calIIcsSerializer);
             serializer.addItems([item], 1);
             var methodProp = getIcsService().createIcalProperty("METHOD");
             methodProp.value = aItipItem.responseMethod;
             serializer.addProperty(methodProp);
 
             var thisCalendar = this;
@@ -2894,17 +2886,16 @@ calDavCalendar.prototype = {
         if (this.verboseLogging()) {
             cal.LOG("CalDAV: send: " + serializedItem);
         }
         return serializedItem;
     },
 
     // nsIChannelEventSink implementation
     asyncOnChannelRedirect: function caldav_asyncOonChannelRedirect(aOldChannel, aNewChannel, aFlags, aCallback) {
-
         let uploadData;
         let uploadContent;
         if (aOldChannel instanceof Components.interfaces.nsIUploadChannel &&
             aOldChannel instanceof Components.interfaces.nsIHttpChannel &&
             aOldChannel.uploadStream) {
             uploadData = aOldChannel.uploadStream;
             uploadContent = aOldChannel.getRequestHeader("Content-Type");
         }
--- a/calendar/providers/caldav/calDavRequestHandlers.js
+++ b/calendar/providers/caldav/calDavRequestHandlers.js
@@ -210,29 +210,27 @@ etagsHandler.prototype = {
             case "getcontenttype":
                 this.tag = aLocalName;
                 this.currentResponse[aLocalName] = "";
                 break;
         }
         if (this.calendar.verboseLogging()) {
             this.logXML += "<" + aQName + ">";
         }
-
     },
 
     endElement: function eH_endElement(aUri, aLocalName, aQName) {
         switch (aLocalName) {
             case "response":
                 this.tag = null;
                 let r = this.currentResponse;
                 if (r.getetag && r.getetag.length &&
                     r.href && r.href.length &&
                     r.getcontenttype && r.getcontenttype.length &&
                     !r.isCollection) {
-
                     r.href = this.calendar.ensureDecodedPath(r.href);
 
                     if (r.getcontenttype.substr(0, 14) == "message/rfc822") {
                         // workaround for a Scalix bug which causes incorrect
                         // contenttype to be returned.
                         r.getcontenttype = "text/calendar";
                     }
                     if (r.getcontenttype == "text/vtodo") {
@@ -493,17 +491,16 @@ webDavSyncHandler.prototype = {
                                                    this.calendar,
                                                    this.baseUri,
                                                    this.newSyncToken,
                                                    this.additionalSyncNeeded,
                                                    null,
                                                    this.changeLogListener)
             multiget.doMultiGet();
         }
-
     },
 
     startElement: function wH_startElement(aUri, aLocalName, aQName, aAttributes) {
         switch (aLocalName) {
             case "response": // WebDAV Sync draft 3
                 this.currentResponse = {};
                 this.tag = null
                 this.isInPropStat = false;
@@ -526,17 +523,16 @@ webDavSyncHandler.prototype = {
             case "sync-token":
                 this.tag = aLocalName.replace(/-/g, '');
                 this.currentResponse[this.tag ] = "";
                 break;
         }
         if (this.calendar.verboseLogging()) {
             this.logXML += "<" + aQName + ">";
         }
-
     },
 
     endElement: function wH_endElement(aUri, aLocalName, aQName) {
         switch (aLocalName) {
             case "response": // WebDAV Sync draft 3
             case "sync-response": // WebDAV Sync draft 0,1,2
                 let r = this.currentResponse;
                 if (r.href && r.href.length) {
@@ -883,17 +879,16 @@ multigetSyncHandler.prototype = {
             case "getetag":
                 this.tag = aLocalName.replace(/-/g, '');
                 this.currentResponse[this.tag ] = "";
                 break;
         }
         if (this.calendar.verboseLogging()) {
             this.logXML += "<" + aQName + ">";
         }
-
     },
 
     endElement: function mg_endElement(aUri, aLocalName, aQName) {
         switch (aLocalName) {
             case "response":
                 let r = this.currentResponse;
                 if (r.href &&
                     r.href.length) {
--- a/calendar/providers/ics/calICSCalendar.js
+++ b/calendar/providers/ics/calICSCalendar.js
@@ -289,17 +289,16 @@ calICSCalendar.prototype = {
                 this_.mObserver.onLoad(this_);
 
                 // Now that all items have been stuffed into the memory calendar
                 // we should add ourselves as observer. It is important that this
                 // happens *after* the calls to adoptItem in the above loop to prevent
                 // the views from being notified.
                 this_.mMemoryCalendar.addObserver(this_.mObserver);
                 this_.unlock();
-
             }
         };
         parser.parseString(str, null, listener);
     },
 
     writeICS: function () {
         cal.LOG("[calICSCalendar] Commencing write of ICS Calendar " + this.name);
         this.lock();
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.js
@@ -194,17 +194,16 @@ calStorageCalendar.prototype = {
             let fileURL = this.uri.QueryInterface(Components.interfaces.nsIFileURL);
             if (!fileURL) {
                 throw new Components.Exception("Invalid file", Components.results.NS_ERROR_NOT_IMPLEMENTED);
             }
             // open the database
             this.mDB = Services.storage.openDatabase(fileURL.file);
             this.mDB.executeSimpleSQL("PRAGMA journal_mode=WAL");
             upgradeDB(this.mDB);
-
         } else if (this.uri.schemeIs("moz-profile-calendar")) {
             // This is an old-style moz-profile-calendar. It requires some
             // migration steps.
 
             let localDB = cal.getCalendarDirectory();
             localDB.append("local.sqlite");
             localDB = Services.storage.openDatabase(localDB);
 
@@ -920,17 +919,16 @@ calStorageCalendar.prototype = {
                 let todoitem = this.mRecTodoCache[id];
                 let offline_journal_flag = this.mRecTodoCacheOfflineFlags[todoitem.id] || null;
                 if ((sp.offline_journal == null &&
                      (offline_journal_flag == cICL.OFFLINE_FLAG_MODIFIED_RECORD ||
                       offline_journal_flag == cICL.OFFLINE_FLAG_CREATED_RECORD ||
                       offline_journal_flag == null)) ||
                     (sp.offline_journal != null &&
                      (offline_journal_flag == sp.offline_journal))) {
-
                     count += handleResultItem(todoitem,
                                               Components.interfaces.calITodo,
                                               checkCompleted);
                     if (checkCount()) {
                         return;
                     }
                 }
             }
@@ -940,17 +938,16 @@ calStorageCalendar.prototype = {
         queueItems(null);
 
         // and finish
         this.notifyOperationComplete(aListener,
                                      Components.results.NS_OK,
                                      Components.interfaces.calIOperationListener.GET,
                                      null,
                                      null);
-
     },
 
     getItemOfflineFlag: function cSC_getOfflineJournalFlag(aItem, aListener) {
         let flag = null;
         if (!aItem) {
             // It is possible that aItem can be null, flag provided should be null in this case
             aListener.onOperationComplete(this, Components.results.NS_OK,
                                                Components.interfaces.calIOperationListener.GET, null, flag);
@@ -992,17 +989,16 @@ calStorageCalendar.prototype = {
             this.mEditEventOfflineFlag.params.offline_journal = flag || null;
             try {
                 this.mEditEventOfflineFlag.executeStep();
             } catch (e) {
                 this.logError("Error setting offline journal flag for " + aItem.title, e);
             } finally {
                 this.mEditEventOfflineFlag.reset();
             }
-
         } else if (cal.isToDo(aItem)) {
             this.prepareStatement(this.mEditTodoOfflineFlag);
             this.mEditTodoOfflineFlag.params.id = aID;
             this.mEditTodoOfflineFlag.params.offline_journal = flag || null;
             try {
                 this.mEditTodoOfflineFlag.executeStep();
             } catch (e) {
                 this.logError("Error setting offline journal flag for " + aItem.title, e);
--- a/calendar/providers/storage/calStorageUpgrade.jsm
+++ b/calendar/providers/storage/calStorageUpgrade.jsm
@@ -739,17 +739,16 @@ upgrade.v3 = function upgrade_v3(db, ver
                              " WHERE " + field + " IS NOT NULL");
     }
 
     let tbl = upgrade.v2(version < 2 && db, version);
     LOGdb(db, "Storage: Upgrading to v3");
 
     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",
@@ -1156,17 +1155,16 @@ upgrade.v16 = function upgrade_v16(db, v
                                  "                        recurrence_id, " +
                                  "                        recurrence_id_tz, " +
                                  "                        icalString)" +
                                  " SELECT cal_id, id, recurrence_id," +
                                  "        recurrence_id_tz, " + transAlarm +
                                  "   FROM " + tbl +
                                  "  WHERE alarm_offset IS NOT NULL" +
                                  "     OR alarm_time IS NOT NULL;");
-
         };
         copyDataOver("cal_events");
         copyDataOver("cal_todos");
         removeFunction(db, "translateAlarm");
 
         // Make sure the alarm flag is set on the item
         executeSimpleSQL(db, "UPDATE cal_events " +
                              "   SET flags = flags | " + CAL_ITEM_FLAG.HAS_ALARMS +
@@ -1253,17 +1251,16 @@ upgrade.v17 = function upgrade_v17(db, v
                       db,
                       null,
                       "DISTINCT");
             renameTable(tbl,
                         "cal_" + tblName + "_v17",
                         "cal_" + tblName,
                         db,
                         true);
-
         }
         setDbVersionAndCommit(db, 17);
     } catch (e) {
         throw reportErrorAndRollback(db, e);
     }
 
     return tbl;
 };
@@ -1365,18 +1362,18 @@ upgrade.v20 = function upgrade_v20(db, v
  * Bug 785659 - Get rid of calIRecurrenceDateSet
  * Migrate x-dateset to x-date in the storage database
  * r=mmecca, p=philipp
  */
 upgrade.v21 = function upgrade_v21(db, version) {
     let tbl = upgrade.v20(version < 20 && db, version);
     LOGdb(db, "Storage: Upgrading to v21");
     beginTransaction(db);
+
     try {
-
         // The following operation is only important on a live DB, since we are
         // changing only the values on the DB, not the schema itself.
         if (db) {
             // Oh boy, here we go :-)
             // Insert a new row with the following columns...
             let insertSQL = 'INSERT INTO cal_recurrence ' +
                             '            (item_id, cal_id, recur_type, recur_index,' +
                             '             is_negative, dates, end_date, count,' +
--- a/calendar/providers/wcap/calWcapCalendar.js
+++ b/calendar/providers/wcap/calWcapCalendar.js
@@ -206,18 +206,17 @@ calWcapCalendar.prototype = {
         log("refresh.", this);
         // invalidate cached results:
         delete this.m_cachedResults;
         // notify about refreshed calendar:
         this.notifyObservers("onLoad", [this]);
     },
 
     issueNetworkRequest: function calWcapCalendar_issueNetworkRequest(
-        request, respFunc, dataConvFunc, wcapCommand, params, accessRights) {
-
+              request, respFunc, dataConvFunc, wcapCommand, params, accessRights) {
         var this_ = this;
         // - bootstrap problem: no cal_props, no access check, no default calId
         // - assure being logged in, thus the default cal_props are available
         // - every subscribed calendar will come along with cal_props
         return this.session.getSessionId(
             request,
             function getSessionId_resp(err, sessionId) {
                 try {
--- a/calendar/providers/wcap/calWcapCalendarItems.js
+++ b/calendar/providers/wcap/calWcapCalendarItems.js
@@ -345,17 +345,16 @@ function calWcapCalendar_storeItem(bAddI
             }
             if (!oldAtt || (att.participationStatus != oldAtt.participationStatus)) {
                 // REPLY first for just this calendar:
                 params += ("&attendees=PARTSTAT=" + att.participationStatus +
                            "^" + encodeURIComponent(att.id));
             }
         }
     } else { // PUBLISH, REQUEST
-
         // workarounds for server bugs concerning recurrences/exceptions:
         // - if first occurrence is an exception
         //   and an EXDATE for that occurrence ought to be written,
         //   then the master item's data is replaced with that EXDATEd exception. WTF.
         // - if start/end date is being written on master, the previously EXDATEd
         //   exception overwrites master, why ever.
         // So in these cases: write all data of master.
 
@@ -728,17 +727,16 @@ function calWcapCalendar_modifyItem(newI
                                              } finally {
                                                  request.unlockPending();
                                              }
                                          },
                                          stringToXml, isEvent(newItem) ? "deleteevents_by_id" : "deletetodos_by_id",
                                          params, calIWcapCalendar.AC_COMP_WRITE);
                 return request;
             }
-
         } else if (oldItem && !oldItem.parentItem.recurrenceInfo.getExceptionFor(newItem.recurrenceId)) {
             // pass null for oldItem when creating new exceptions, write whole item:
             oldItem_ = null;
         }
         this.storeItem(false /* bAddItem */, newItem, oldItem_, request);
     } catch (exc) {
         request.execRespFunc(exc);
     }
@@ -846,17 +844,16 @@ calWcapCalendar.prototype.parseItems = f
             componentType = "VEVENT";
             break;
     }
 
     let recurrenceBound = this.session.recurrenceBound;
 
     let count = 0;
     for (let subComp of cal.ical.calendarComponentIterator(icalRootComp, componentType)) {
-
         let organizer = subComp.getFirstProperty("ORGANIZER");
         if (organizer && organizer.getParameter("SENT-BY")) { // has SENT-BY
             // &emailorcalid=1 sets wrong email, workaround setting calid...
             let id = organizer.getParameter("X-S1CS-CALID");
             if (id) {
                 organizer.value = id;
             }
         }
@@ -910,17 +907,16 @@ calWcapCalendar.prototype.parseItems = f
                 rid = rid.getInTimezone(dtstart.timezone);
                 item.recurrenceId = rid;
                 if (LOG_LEVEL > 1) {
                     log("exception item: " + item.title +
                         "\nrid=" + getIcalUTC(rid) +
                         "\nitem.id=" + item.id, this);
                 }
                 excItems.push(item);
-
             } else if (item.recurrenceInfo) {
                 unexpandedItems.push(item);
                 uid2parent[item.id] = item;
             } else if ((maxResults == 0 || items.length < maxResults) &&
                        checkIfInRange(item, rangeStart, rangeEnd)) {
                 if (LOG_LEVEL > 2) {
                     log("item: " + item.title + "\n" + item.icalString, this);
                 }
@@ -1010,17 +1006,16 @@ calWcapCalendar.prototype.parseItems = f
                     for (let occ of occurrences) {
                         log("item: " + occ.title + "\n" + occ.icalString, this);
                     }
                 }
             }
             // only proxies returned:
             items = items.concat(occurrences);
         }
-
     } else {
         if (maxResults != 0 &&
             (items.length + unexpandedItems.length) > maxResults) {
             unexpandedItems.length = (maxResults - items.length);
         }
         if (!bLeaveMutable) {
             for (let item of unexpandedItems) {
                 item.makeImmutable();
@@ -1213,17 +1208,16 @@ function calWcapCalendar_getItems(itemFi
             request,
             function netResp(err, icalRootComp) {
                 if (err) {
                     if (checkErrorCode(err, calIWcapErrors.WCAP_ACCESS_DENIED_TO_CALENDAR)) {
                         // try free-busy times:
                         if (listener &&
                             (itemFilter & calICalendar.ITEM_FILTER_TYPE_EVENT) &&
                             rangeStart && rangeEnd) {
-
                             var freeBusyListener = { // calIGenericOperationListener:
                                 onResult: function freeBusyListener_onResult(request, result) {
                                     if (!Components.isSuccessCode(request.status)) {
                                         throw request.status;
                                     }
                                     var items = [];
                                     for (var entry of result) {
                                         var item = createEvent();
@@ -1243,25 +1237,23 @@ function calWcapCalendar_getItems(itemFi
                                 this_.session.getFreeBusyIntervals(
                                     this_.calId, rangeStart, rangeEnd, calIFreeBusyInterval.BUSY_ALL,
                                     freeBusyListener));
                         }
                     } else {
                         throw err;
                     }
                 } else if (listener) {
-
                     var items = this_.parseItems(
                         icalRootComp, itemFilter, maxResults,
                         rangeStart, rangeEnd);
 
                     if (CACHE_LAST_RESULTS > 0) {
                         // auto invalidate after X minutes:
                         if (!this_.m_cachedResultsTimer) {
-
                             var callback = {
                                 notify: function notify(timer) {
                                     if (!this_.m_cachedResults) {
                                         return;
                                     }
                                     var now = (new Date()).getTime();
                                     // sort out old entries:
                                     var entries = [];
--- a/calendar/providers/wcap/calWcapSession.js
+++ b/calendar/providers/wcap/calWcapSession.js
@@ -247,17 +247,16 @@ calWcapSession.prototype = {
                                });
         }
     },
 
     // this is a server limit for recurrencies; default is 60
     recurrenceBound: 60,
 
     getSessionId_: function calWcapSession_getSessionId_(request, respFunc) {
-
         var this_ = this;
         this.checkServerVersion(
             request,
             // probe whether server is accessible and responds:
             function checkServerVersion_resp(err) {
                 if (err) {
                     respFunc(err);
                     return;
@@ -455,17 +454,16 @@ calWcapSession.prototype = {
 
                         var prompt = Services.ww.getNewPrompter(null);
                         var labelText = cal.calGetString("wcap", "insufficientWcapVersionConfirmation.label");
                         if (!prompt.confirm(labelText,
                                             cal.calGetString("wcap", "insufficientWcapVersionConfirmation.text", vars))) {
                             throw new Components.Exception(labelText, calIWcapErrors.WCAP_LOGIN_FAILED);
                         }
                     }
-
                 } catch (exc) {
                     err = exc;
                 }
                 respFunc(err);
             },
             this_.sessionUri.spec + "version.wcap?fmt-out=text%2Fcalendar");
     },
 
@@ -495,17 +493,16 @@ calWcapSession.prototype = {
                     // get calprops for all registered calendars:
                     var cals = this_.getRegisteredCalendars(true);
 
                     var calprops_resp = null;
                     var defaultCal = this_.defaultCalendar;
                     if (defaultCal && cals[defaultCal.calId] && // default calendar is registered
                         getPref("calendar.wcap.subscriptions", true) &&
                         !defaultCal.getProperty("subscriptions_registered")) {
-
                         var hasSubscriptions = false;
                         // post register subscribed calendars:
                         var list = this_.getUserPreferences("X-NSCP-WCAP-PREF-icsSubscribed");
                         for (var item of list) {
                             var ar = item.split(',');
                             // ',', '$' are not encoded. ',' can be handled here. WTF.
                             for (var a of ar) {
                                 var dollar = a.indexOf('$');
@@ -545,25 +542,23 @@ calWcapSession.prototype = {
                         this_.installCalProps_get_calprops(calprops_resp, sessionId, cals, request);
                     }
                 },
                 stringToXml, "get_userprefs",
                 "&fmt-out=text%2Fxml&userid=" + encodeURIComponent(this.credentials.userId),
                 sessionId);
             this.installServerTimeDiff(sessionId, request);
             this.installServerTimezones(sessionId, request);
-
         } finally {
             request.unlockPending();
         }
     },
 
     installCalProps_get_calprops:
     function calWcapSession_installCalProps_get_calprops(respFunc, sessionId, cals, request) {
-
         var this_ = this;
         function calprops_resp(err, data) {
             if (err) {
                 throw err;
             }
             // string to xml converter func without WCAP errno check:
             if (!data || data.length == 0) { // assuming time-out
                 throw new Components.Exception(errorToString(calIWcapErrors.WCAP_LOGIN_FAILED),
@@ -587,17 +582,16 @@ calWcapSession.prototype = {
                         }
                         if (calendar) {
                             calendar.m_calProps = node;
                             if (respFunc) {
                                 respFunc(calendar);
                             }
                         }
                     }
-
                 } catch (exc) { // ignore but log any errors on subscribed calendars:
                     logError(exc, this_);
                 }
             }
         }
 
         var calidParam = "";
         for (var calId in cals) {
@@ -709,18 +703,17 @@ calWcapSession.prototype = {
         var url = this.sessionUri.spec;
         url += (wcapCommand + ".wcap?appid=mozilla-calendar&id=");
         url += sessionId;
         url += params;
         return url;
     },
 
     issueNetworkRequest: function calWcapSession_issueNetworkRequest(
-        request, respFunc, dataConvFunc, wcapCommand, params) {
-
+                    request, respFunc, dataConvFunc, wcapCommand, params) {
         var this_ = this;
         function getSessionId_resp(err, sessionId) {
             if (err) {
                 request.execSubRespFunc(respFunc, err);
             } else {
                 // else have session uri and id:
                 this_.issueNetworkRequest_(
                     request,
@@ -738,18 +731,17 @@ calWcapSession.prototype = {
                     },
                     dataConvFunc, wcapCommand, params, sessionId);
             }
         }
         this.getSessionId(request, getSessionId_resp);
     },
 
     issueNetworkRequest_: function calWcapSession_issueNetworkRequest_(
-        request, respFunc, dataConvFunc, wcapCommand, params, sessionId) {
-
+                    request, respFunc, dataConvFunc, wcapCommand, params, sessionId) {
         var url = this.getCommandUrl(wcapCommand, params, sessionId);
         var this_ = this;
         issueNetworkRequest(request,
                             function netResp(err, str) {
                                 var data;
                                 if (!err) {
                                     try {
                                         if (dataConvFunc) {
@@ -938,17 +930,16 @@ calWcapSession.prototype = {
                                     break;
                             }
                         }
                     }
                     log("search done. number of found calendars: " + ret.length, this_);
                     request.execRespFunc(null, ret);
                 },
                 null, "search_calprops", params);
-
         } catch (exc) {
             request.execRespFunc(exc);
         }
         return request;
     },
 
     // calIFreeBusyProvider:
     getFreeBusyIntervals:
@@ -1031,17 +1022,16 @@ calWcapSession.prototype = {
 
                                 ret.push(new cal.FreeBusyInterval(calId, fbType, start, end));
                             }
                         }
                         request.execRespFunc(null, ret);
                     }
                 },
                 stringToXml_, "get_freebusy", params);
-
         } catch (exc) {
             request.execRespFunc(exc);
         }
         return request;
     },
 
     // nsIObserver:
     observe: function calWcapSession_observer(subject, topic, data) {
@@ -1063,18 +1053,16 @@ calWcapSession.prototype = {
             if (aCalendar.getProperty(pref) === null) {
                 aCalendar.setProperty(pref, val);
             }
         }
 
         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",
--- a/calendar/resources/content/publish.js
+++ b/calendar/resources/content/publish.js
@@ -114,17 +114,16 @@ function publishEntireCalendarDialogResp
                 }
             }
         }
     };
     aProgressDialog.onStartUpload();
     var oldCalendar = CalendarPublishObject.calendar;
     oldCalendar.getItems(Components.interfaces.calICalendar.ITEM_FILTER_ALL_ITEMS,
                          0, null, null, getListener);
-
 }
 
 function publishItemArray(aItemArray, aPath, aProgressDialog) {
     var outputStream;
     var inputStream;
     var storageStream;
 
     var icsURL = makeURL(aPath);
--- a/calendar/test/unit/test_alarm.js
+++ b/calendar/test/unit/test_alarm.js
@@ -371,18 +371,18 @@ var propMap = { "related": Ci.calIAlarm.
 var clonePropMap = { "related": Ci.calIAlarm.ALARM_RELATED_END,
                      "repeat": 2,
                      "action": "X-CHANGED",
                      "description": "description-changed",
                      "summary": "summary-changed",
                      "offset": createDuration("PT5M"),
                      "repeatOffset": createDuration("PT2M")
 };
+
 function test_immutable() {
-
     dump("Testing immutable alarms...");
     let alarm = cal.createAlarm();
     // Set up each attribute
     for (let prop in propMap) {
         alarm[prop] = propMap[prop];
     }
 
     // Set up some extra props
@@ -544,17 +544,16 @@ function test_serialize() {
 
     // Missing repeat with duration
     throws(function() {
         comp = srv.createIcalComponent("VALARM");
         addActionDisplay(); addTrigger(); addDescr();
         addDuration();
         alarm.icalComponent = comp;
     }, /Illegal value/, "Invalid Argument");
-
 }
 
 function test_strings() {
     // Serializing the string shouldn't throw, but we don't really care about
     // the string itself.
     let alarm = cal.createAlarm();
     alarm.action = "DISPLAY";
     alarm.related = Components.interfaces.calIAlarm.ALARM_RELATED_ABSOLUTE;
--- a/calendar/test/unit/test_alarmutils.js
+++ b/calendar/test/unit/test_alarmutils.js
@@ -57,17 +57,16 @@ add_task(function* test_setDefaultValues
     ok(alarm);
     equal(alarm.related, alarm.ALARM_RELATED_START);
     equal(alarm.action, "SHOUT");
     equal(alarm.offset.icalString, "-P2DT12H");
 
     Preferences.reset("calendar.alarms.onforevents");
     Preferences.reset("calendar.alarms.eventalarmunit");
     Preferences.reset("calendar.alarms.eventalarmlen");
-
 });
 
 add_task(function* test_setDefaultValues_tasks() {
     let item, alarm;
     let calnow = cal.now;
     let nowDate = cal.createDateTime("20150815T120000");
     cal.now = function() {
       return nowDate;
--- a/calendar/test/unit/test_attendee.js
+++ b/calendar/test/unit/test_attendee.js
@@ -146,17 +146,16 @@ function test_serialize() {
     equal(prop.value, "horst");
     equal(prop.propertyName, "ORGANIZER");
     equal(prop.getParameter("CN"), "Horst");
     equal(prop.getParameter("RSVP"), "TRUE");
     equal(prop.getParameter("ROLE"), "CHAIR");
     equal(prop.getParameter("PARTSTAT"), "DECLINED");
     equal(prop.getParameter("CUTYPE"), "RESOURCE");
     equal(prop.getParameter("X-NAME"), "X-VALUE");
-
 }
 
 function test_properties() {
     let a = cal.createAttendee();
 
     throws(function() {
         a.icalProperty;
     }, /Component not initialized/);
@@ -197,17 +196,16 @@ function test_doubleParameters() {
             let prop = attendee.icalProperty;
             let parNames = [];
             let parValues = [];
 
             // Extract the parameters
             for (let paramName = prop.getFirstParameterName();
                  paramName;
                  paramName = prop.getNextParameterName()) {
-
                 parNames.push(paramName);
                 parValues.push(prop.getParameter(paramName));
             }
 
             // Check the results
             let att_n = attendee.id.substr(7, 9);
             for (let parIndex in parNames) {
                 ok(aExpected[att_n].param.includes(parNames[parIndex]),
--- a/calendar/test/unit/test_bug759324.js
+++ b/calendar/test/unit/test_bug759324.js
@@ -23,17 +23,16 @@ function run_test() {
     let rec = item.recurrenceInfo.getOccurrenceFor(rid);
     rec.title = "changed";
     item.recurrenceInfo.modifyException(rec, true);
 
     do_test_pending();
     storage.addItem(item, { onOperationComplete: checkAddedItem });
 
     function checkAddedItem(c, s, o, i, addedItem) {
-
         let seq = addedItem.getProperty("SEQUENCE");
         let rec = addedItem.recurrenceInfo.getOccurrenceFor(rid);
 
         equal(seq, 3);
         equal(rec.getProperty("SEQUENCE"), seq);
 
         let changedItem = addedItem.clone();
         changedItem.setProperty("SEQUENCE", parseInt(seq, 10) + 1);
@@ -50,17 +49,16 @@ function run_test() {
 
         // Now check with the pref off
         storage.deleteProperty("capabilities.propagate-sequence");
 
         let changedItem2 = changedItem.clone();
         changedItem2.setProperty("SEQUENCE", parseInt(seq, 10) + 1);
 
         storage.modifyItem(changedItem2, changedItem, { onOperationComplete: checkNormalItem });
-
     }
 
     function checkNormalItem(c, s, o, i, changedItem) {
         let seq = changedItem.getProperty("SEQUENCE");
         let rec = changedItem.recurrenceInfo.getOccurrenceFor(rid);
 
         equal(seq, 5);
         equal(rec.getProperty("SEQUENCE"), 4);
--- a/calendar/test/unit/test_datetime_before_1970.js
+++ b/calendar/test/unit/test_datetime_before_1970.js
@@ -1,14 +1,13 @@
 /* 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/. */
 
 function run_test() {
-
     // Bug 769938 - dates before 1970 are not handled correctly
     // due to signed vs. unsigned mismatch in PRTime in xpconnect
 
     let dateTime1950 = cal.createDateTime();
     dateTime1950.year = 1950;
     equal(dateTime1950.year, 1950);
 
     let dateTime1955 = cal.jsDateToDateTime(new Date(1955, 6, 15));
--- a/calendar/test/unit/test_freebusy_service.js
+++ b/calendar/test/unit/test_freebusy_service.js
@@ -106,17 +106,16 @@ function test_failure() {
 }
 
 function test_cancel() {
     _clearProviders();
 
     let provider = {
         QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calIFreeBusyProvider, Components.interfaces.calIOperation]),
         getFreeBusyIntervals: function(aCalId, aStart, aEnd, aTypes, aListener) {
-
             Services.tm.currentThread.dispatch({run: function() {
                 dump("Cancelling freebusy query...");
                 op.cancel();
             }}, Components.interfaces.nsIEventTarget.DISPATCH_NORMAL);
 
             // No listener call, we emulate a long running search
             // Do return the operation though
             return this;
--- a/calendar/test/unit/test_ics_parser.js
+++ b/calendar/test/unit/test_ics_parser.js
@@ -64,17 +64,16 @@ function test_failures() {
         "BEGIN:VEVENT",
         "UID:123",
         "END:VEVENT",
         "END:VWORLD"].join("\r\n");
     dump("Note: The following error message is expected:\n");
     parser.parseString(str);
     equal(parser.getComponents({}).length, 0);
     equal(parser.getItems({}).length, 0);
-
 }
 
 function test_fake_parent() {
     let parser = Components.classes["@mozilla.org/calendar/ics-parser;1"]
                            .createInstance(Components.interfaces.calIIcsParser);
 
     let str = [
         "BEGIN:VCALENDAR",
--- a/calendar/test/unit/test_ics_service.js
+++ b/calendar/test/unit/test_ics_service.js
@@ -212,17 +212,16 @@ function test_param() {
     equal(prop.icalString, "DTSTART;VALUE=TEXT:20120101T010101\r\n");
     prop.removeParameter("VALUE");
     equal(prop.icalString, "DTSTART:20120101T010101\r\n");
 
     prop.setParameter("X-FOO", "BAR");
     equal(prop.icalString, "DTSTART;X-FOO=BAR:20120101T010101\r\n");
     prop.removeParameter("X-FOO", "BAR");
     equal(prop.icalString, "DTSTART:20120101T010101\r\n");
-
 }
 
 function test_iterator() {
     let svc = cal.getIcsService();
 
     // Property iterator
     let comp = svc.createIcalComponent("VEVENT");
     let propNames = ["X-ONE", "X-TWO"];
--- a/calendar/test/unit/test_items.js
+++ b/calendar/test/unit/test_items.js
@@ -60,21 +60,19 @@ function test_aclmanager() {
     equal(pe.aclEntry.userCanRespond, itemEntry.userCanRespond);
     equal(pe.aclEntry.userCanViewAll, itemEntry.userCanViewAll);
     equal(pe.aclEntry.userCanViewDateAndTime, itemEntry.userCanViewDateAndTime);
 
     e = cal.createEvent();
     e.id = "noentry";
     e.calendar = mockCalendar;
     equal(e.aclEntry, null);
-
 }
 
 function test_calendar() {
-
     let e = cal.createEvent();
     let pe = cal.createEvent();
 
     let mockCalendar = {
         QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calICalendar]),
         id: "one"
     };
 
@@ -103,17 +101,16 @@ function test_attachment() {
     e.removeAttachment(a);
     equal(e.getAttachments({}).length, 1);
 
     e.removeAllAttachments();
     equal(e.getAttachments({}).length, 0);
 }
 
 function test_attendee() {
-
     let e = cal.createEvent();
     equal(e.getAttendeeById("unknown"), null);
     equal(e.getAttendees({}).length, 0);
 
     let a = cal.createAttendee();
     a.id = "mailto:horst";
 
     let b = cal.createAttendee();
@@ -137,17 +134,16 @@ function test_attendee() {
     equal(e.getAttendees({}).length, 1);
     equal(e.getAttendeeById("mailto:horst"), null);
 
     e.removeAllAttendees();
     equal(e.getAttendees({}).length, 0);
 }
 
 function test_categories() {
-
     let e = cal.createEvent();
 
     equal(e.getCategories({}).length, 0);
 
     let cat = ["a", "b", "c"];
     e.setCategories(3, cat);
 
     cat[0] = "err";
@@ -185,17 +181,16 @@ function test_alarm() {
     equal(e.getAlarms({}).length, 1);
     equal(e.getAlarms({})[0], alarm2);
 
     e.clearAlarms();
     equal(e.getAlarms({}).length, 0);
 }
 
 function test_immutable() {
-
     let e = cal.createEvent();
 
     let dt = cal.createDateTime();
     dt.timezone = cal.getTimezoneService().getTimezone("Europe/Berlin");
     e.alarmLastAck = dt;
 
     let org = cal.createAttendee();
     org.id = "one";
@@ -248,17 +243,16 @@ function test_immutable() {
 
     e2.setPropertyParameter("X-NAME", "X-PARAM", null);
     equal(e2.getPropertyParameter("X-NAME", "X-PARAM"), null);
 
     // TODO more clone checks
 }
 
 function test_lastack() {
-
     let e = cal.createEvent();
 
     e.alarmLastAck = cal.createDateTime("20120101T010101");
 
     // Our items don't support this yet
     //  equal(e.getProperty("X-MOZ-LASTACK"), "20120101T010101");
 
     let comp = e.icalComponent;
--- a/calendar/test/unit/test_recur.js
+++ b/calendar/test/unit/test_recur.js
@@ -680,17 +680,16 @@ function test_rrule_interface() {
     untilDate.timezone = cal.UTC();
     rrule.untilDate = untilDate;
     ok(!rrule.isByCount)
     throws(() => rrule.count, /0x80004005/);
     equal(rrule.untilDate.icalString, untilDate.icalString);
 }
 
 function test_startdate_change() {
-
     // Setting a start date if its missing shouldn't throw
     let item = makeEvent("DTEND:20020402T124500Z\r\n" +
                          "RRULE:FREQ=DAILY\r\n");
     item.startDate = cal.createDateTime("20020502T114500Z");
 
     function makeRecEvent(str) {
         return makeEvent("DTSTART:20020402T114500Z\r\n" +
                          "DTEND:20020402T134500Z\r\n" +
--- a/calendar/test/unit/test_search_service.js
+++ b/calendar/test/unit/test_search_service.js
@@ -55,17 +55,16 @@ function test_found() {
     let listener = {
         called: false,
         onResult: function(request, result) {
             ok(!this.called);
             this.called = true;
 
             equal(result.length, 1);
             equal(result[0].id, "test");
-
         }
     };
 
     let op = search.searchForCalendars("str", HINT_EXACT_MATCH, 0, listener);
     ok(listener.called);
     ok(provider2.called);
 }
 
@@ -94,17 +93,16 @@ function test_failure() {
 }
 
 function test_cancel() {
     search.getProviders({}).forEach(search.removeProvider, search);
 
     let provider = {
         QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calICalendarSearchProvider, Components.interfaces.calIOperation]),
         searchForCalendars: function(aStr, aHint, aMax, aListener) {
-
             Services.tm.currentThread.dispatch({run: function() {
                 dump("Cancelling search...");
                 op.cancel();
             }}, Components.interfaces.nsIEventTarget.DISPATCH_NORMAL);
 
             // No listener call, we emulate a long running search
             // Do return the operation though
             return this;
--- a/calendar/test/unit/test_weekinfo_service.js
+++ b/calendar/test/unit/test_weekinfo_service.js
@@ -1,14 +1,13 @@
 /* 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/. */
 
 function run_test() {
-
     // Bug 1239622. The 1st of January after a leap year which ends with
     // a Thursday belongs to week number 53 unless the start of week is
     // set on Friday.
     let wkst_wknum_date = [
         [1, 53, "20210101T000000Z"],   // Year 2021 affected by Bug 1239622
         [5, 1, "20210101T000000Z"],    //
         [3, 53, "20490101T000000Z"],   // Year 2049 affected by Bug 1239622
         [5, 1, "20490101T000000Z"],    //