Bug 1280898 - Set up eslint for calendar files - (almost) enable no-extra-parens rule. r=MakeMyDay
authoreslint <eslint@bugzilla.kewis.ch>
Fri, 08 Jul 2016 14:03:51 +0200
changeset 25992 9bb63b34413f5bb8e13d909962b80a5181866d6b
parent 25991 12957589835a7d5e54809d335388c5b960019105
child 25993 3d474ac6379c7c7278e3d41fb40437d95b9f7470
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 - (almost) enable no-extra-parens rule. r=MakeMyDay MozReview-Commit-ID: AIxffiiJaCp
calendar/.eslintrc
calendar/base/content/agenda-listbox.js
calendar/base/content/agenda-listbox.xml
calendar/base/content/calendar-common-sets.js
calendar/base/content/calendar-item-editing.js
calendar/base/content/calendar-management.js
calendar/base/content/calendar-menus.xml
calendar/base/content/calendar-multiday-view.xml
calendar/base/content/calendar-task-tree.xml
calendar/base/content/calendar-task-view.js
calendar/base/content/calendar-ui-utils.js
calendar/base/content/calendar-unifinder.js
calendar/base/content/calendar-view-core.xml
calendar/base/content/dialogs/calendar-dialog-utils.js
calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
calendar/base/content/dialogs/calendar-event-dialog-reminder.js
calendar/base/content/dialogs/calendar-event-dialog-timezone.js
calendar/base/content/dialogs/calendar-print-dialog.js
calendar/base/content/dialogs/calendar-properties-dialog.js
calendar/base/content/today-pane.js
calendar/base/content/widgets/calendar-list-tree.xml
calendar/base/content/widgets/calendar-widgets.xml
calendar/base/content/widgets/minimonth.xml
calendar/base/modules/calAlarmUtils.jsm
calendar/base/modules/calItipUtils.jsm
calendar/base/src/calCalendarManager.js
calendar/base/src/calEvent.js
calendar/base/src/calFilter.js
calendar/base/src/calIcsParser.js
calendar/base/src/calItemBase.js
calendar/base/src/calItipItem.js
calendar/base/src/calTimezoneService.js
calendar/base/src/calTodo.js
calendar/base/src/calTransactionManager.js
calendar/base/src/calUtils.js
calendar/base/src/calWeekInfoService.js
calendar/import-export/calHtmlExport.js
calendar/import-export/calMonthGridPrinter.js
calendar/import-export/calOutlookCSVImportExport.js
calendar/import-export/calWeekPrinter.js
calendar/itip/calItipEmailTransport.js
calendar/lightning/modules/ltnInvitationUtils.jsm
calendar/providers/caldav/calDavCalendar.js
calendar/providers/caldav/calDavRequestHandlers.js
calendar/providers/ics/calICSCalendar.js
calendar/providers/memory/calMemoryCalendar.js
calendar/providers/storage/calStorageCalendar.js
calendar/providers/storage/calStorageUpgrade.jsm
calendar/providers/wcap/calWcapCalendar.js
calendar/providers/wcap/calWcapCalendarItems.js
calendar/providers/wcap/calWcapCalendarModule.js
calendar/providers/wcap/calWcapErrors.js
calendar/providers/wcap/calWcapRequest.js
calendar/providers/wcap/calWcapSession.js
calendar/providers/wcap/calWcapUtils.js
calendar/resources/content/calendarCreation.js
calendar/resources/content/datetimepickers/datetimepickers.xml
calendar/resources/content/mouseoverPreviews.js
calendar/test/mozmill/eventDialog/testEventDialog.js
calendar/test/mozmill/shared-modules/calendar-utils.js
calendar/test/unit/test_alarmservice.js
calendar/test/unit/test_gdata_provider.js
calendar/test/unit/test_timezone_definition.js
--- a/calendar/.eslintrc
+++ b/calendar/.eslintrc
@@ -351,16 +351,20 @@
     "no-floating-decimal": 2,
 
     // Require Space Before Blocks
     "space-before-blocks": 2,
 
     // Operators always before the line break
     "operator-linebreak": [2, "after", { "overrides": { ":": "before", "?": "ignore"}}],
 
+    // Restricts the use of parentheses to only where they are necessary
+    // Disabled for now since this also removes parens around assignments, e.g. let foo = bar == baz
+    // "no-extra-parens": [2, "all", { "conditionalAssign": false, "returnAssign": false, "nestedBinaryExpressions": false }],
+
     // Will enable these rules later
     "block-spacing": 0,
     "no-lonely-if": 0,
     "computed-property-spacing": 0,
 
     // The following rules will not be enabled currently, but are kept here for
     // easier updates in the future.
     "no-else-return": 0,
--- a/calendar/base/content/agenda-listbox.js
+++ b/calendar/base/content/agenda-listbox.js
@@ -132,17 +132,17 @@ function onCheckboxChange(event) {
         agendaListbox.refreshCalendarQuery(period.start, period.end);
     } else {
         listItem = listItem.nextSibling;
         let leaveloop;
         do {
             leaveloop = (listItem == null);
             if (!leaveloop) {
                 let nextItemSibling = listItem.nextSibling;
-                leaveloop = (!agendaListbox.isEventListItem(listItem));
+                leaveloop = !agendaListbox.isEventListItem(listItem);
                 if (!leaveloop) {
                     listItem.remove();
                     listItem = nextItemSibling;
                 }
             }
         } while (!leaveloop);
     }
     calendarController.onSelectionChanged({ detail: [] });
@@ -377,25 +377,25 @@ function isBefore(aItem, aCompItem, aPer
         // - events and events spanning multiple days: start, end, (sorted by
         //   time) and intermediate.
         if (itemDate.isDate && aItem.duration.days == 1) {
             // all-day events with duration one day
             return true;
         } else if (itemDate.isDate) {
             if (aItem.startDate.compare(itemDate) == 0) {
                 // starting day of an all-day events spannig multiple days
-                return (!compItemDate.isDate || aCompItem.duration.days != 1);
+                return !compItemDate.isDate || aCompItem.duration.days != 1;
             } else if (aItem.endDate.compare(itemDateEndDate) == 0) {
                 // ending day of an all-day events spannig multiple days
-                return (!compItemDate.isDate ||
-                        (aCompItem.duration.days != 1 &&
-                          aCompItem.startDate.compare(compItemDate) != 0));
+                return !compItemDate.isDate ||
+                       (aCompItem.duration.days != 1 &&
+                        aCompItem.startDate.compare(compItemDate) != 0);
             } else {
                 // intermediate day of an all-day events spannig multiple days
-                return (!compItemDate.isDate);
+                return !compItemDate.isDate;
             }
         } else if (aCompItem.startDate.isDate) {
             return false;
         }
     }
     // Non all-day event sorted by date-time. When equal, sorted by start
     // date-time then by end date-time.
     let comp = itemDate.compare(compItemDate);
@@ -464,17 +464,17 @@ function getListItems(aItem, aPeriod) {
     }
     if (periods.length > 0) {
         for (let i = 0; i < periods.length; i++) {
             let period = periods[i];
             let complistItem = period.listItem;
             let leaveloop;
             do {
                 complistItem = complistItem.nextSibling;
-                leaveloop = (!this.isEventListItem(complistItem));
+                leaveloop = !this.isEventListItem(complistItem);
                 if (!leaveloop) {
                     if (this.isSameEvent(aItem, complistItem.occurrence)) {
                         retlistItems.push(complistItem);
                         break;
                     }
                 }
             } while (!leaveloop);
         }
@@ -531,31 +531,31 @@ function deleteItemsFromCalendar(aCalend
  * matches
  *
  * @param aItem         The item to compare.
  * @param aCompItem     The item to compare with.
  * @return              True, if the items match with the above noted criteria.
  */
 agendaListbox.isSameEvent =
 function isSameEvent(aItem, aCompItem) {
-    return ((aItem.id == aCompItem.id) &&
-            (aItem[calGetStartDateProp(aItem)].compare(aCompItem[calGetStartDateProp(aCompItem)]) == 0));
+    return aItem.id == aCompItem.id &&
+           aItem[calGetStartDateProp(aItem)].compare(aCompItem[calGetStartDateProp(aCompItem)]) == 0;
 };
 
 /**
  * Checks if the currently selected node in the listbox is an Event item (not a
  * period item).
  *
  * @return              True, if the node is not a period item.
  */
 agendaListbox.isEventSelected =
 function isEventSelected() {
     let listItem = this.agendaListboxControl.selectedItem;
     if (listItem) {
-        return (this.isEventListItem(listItem));
+        return this.isEventListItem(listItem);
     }
     return false;
 };
 
 /**
  * Delete the selected item from its calendar (if it is an event item)
  *
  * @param aDoNotConfirm     If true, the user will not be prompted.
@@ -781,17 +781,17 @@ function addListener(aListener) {
  * @return              Returns true if today is shown.
  */
 agendaListbox.showsToday =
 function showsToday(aStartDate) {
     let lstart = aStartDate;
     if (!lstart) {
         lstart = this.today.start;
     }
-    let lshowsToday = (sameDay(now(), lstart));
+    let lshowsToday = sameDay(now(), lstart);
     if (lshowsToday) {
         this.periods = [this.today, this.tomorrow, this.soon];
     } else {
         this.periods = [this.today];
     }
     return lshowsToday;
 };
 
@@ -1064,17 +1064,17 @@ function setCurrentEvent() {
     let msScheduleTime = -1;
     let complistItem = agendaListbox.tomorrow.listItem.previousSibling;
     let removelist = [];
     let anow = now();
     let msuntillend = 0;
     let msuntillstart = 0;
     let leaveloop;
     do {
-        leaveloop = (!agendaListbox.isEventListItem(complistItem));
+        leaveloop = !agendaListbox.isEventListItem(complistItem);
         if (!leaveloop) {
             msuntillstart = complistItem.occurrence.startDate
                                         .getInTimezone(agendaListbox.kDefaultTimezone)
                                         .subtractDate(anow).inSeconds;
             if (msuntillstart <= 0) {
                 msuntillend = complistItem.occurrence.endDate
                                           .getInTimezone(agendaListbox.kDefaultTimezone)
                                           .subtractDate(anow).inSeconds;
--- a/calendar/base/content/agenda-listbox.xml
+++ b/calendar/base/content/agenda-listbox.xml
@@ -263,19 +263,19 @@
             } else {
                 durationbox.textContent += " " + aItem.title;
             }
             this.refreshColor();
         ]]></body>
       </method>
       <method name="refreshColor">
         <body><![CDATA[
-            let calcolor = ((this.mOccurrence &&
-                             this.mOccurrence.calendar.getProperty("color")) ||
-                            "#a8c2e1");
+            let calcolor = (this.mOccurrence &&
+                            this.mOccurrence.calendar.getProperty("color")) ||
+                           "#a8c2e1";
 
             let imagebox = document.getAnonymousElementByAttribute(this, "anonid", "agenda-calendar-image");
             imagebox.setAttribute("style", "background-color: " + calcolor + ";");
         ]]></body>
       </method>
     </implementation>
     <handlers>
       <handler event="dragstart"><![CDATA[
--- a/calendar/base/content/calendar-common-sets.js
+++ b/calendar/base/content/calendar-common-sets.js
@@ -507,17 +507,17 @@ var calendarController = {
     selected_events_requires_network: false,
     selected_events_invitation: false,
 
     /**
      * Returns a boolean indicating if its possible to write items to any
      * calendar.
      */
     get writable() {
-        return (cal.getCalendarManager().getCalendars({}).some(cal.isCalendarWritable));
+        return cal.getCalendarManager().getCalendars({}).some(cal.isCalendarWritable);
     },
 
     /**
      * Returns a boolean indicating if the application is currently in offline
      * mode.
      */
     get offline() {
         return Services.io.offline;
--- a/calendar/base/content/calendar-item-editing.js
+++ b/calendar/base/content/calendar-item-editing.js
@@ -397,21 +397,22 @@ function openEventDialog(calendarItem, c
         calendars = calendars.filter(userCanAddItemsToCalendar);
     } else { /* modify */
         calendars = calendars.filter((aCalendar) => {
             /* If the calendar is the item calendar, we check that the item
              * can be modified. If the calendar is NOT the item calendar, we
              * check that the user can remove items from that calendar and
              * add items to the current one.
              */
-            return (((calendarItem.calendar != aCalendar) &&
-                     userCanDeleteItemsFromCalendar(calendarItem.calendar) &&
-                     userCanAddItemsToCalendar(aCalendar)) ||
-                    ((calendarItem.calendar == aCalendar) &&
-                     userCanModifyItem(calendarItem)));
+            let isSameCalendar = calendarItem.calendar == aCalendar;
+            let canModify = userCanModifyItem(calendarItem);
+            let canMoveItems = userCanDeleteItemsFromCalendar(calendarItem.calendar) &&
+                               userCanAddItemsToCalendar(aCalendar);
+
+            return isSameCalendar ? canModify : canMoveItems;
         });
     }
 
     if (mode == "new" &&
         (!isCalendarWritable(calendar) ||
          !userCanAddItemsToCalendar(calendar) ||
          !isItemSupported(calendar))) {
         if (calendars.length < 1) {
@@ -433,17 +434,17 @@ function openEventDialog(calendarItem, c
 
     // Setup the window arguments
     let args = {};
     args.calendarEvent = calendarItem;
     args.calendar = calendar;
     args.mode = mode;
     args.onOk = callback;
     args.job = job;
-    args.initialStartDateValue = (initialDate || getDefaultStartDate());
+    args.initialStartDateValue = initialDate || getDefaultStartDate();
     args.inTab = Preferences.get("calendar.item.editInTab", false);
     args.useNewItemUI = Preferences.get("calendar.item.useNewItemUI", false);
 
     // this will be called if file->new has been selected from within the dialog
     args.onNewEvent = function(opcalendar) {
         createEventWithDialog(opcalendar, null, null);
     };
     args.onNewTodo = function(opcalendar) {
--- a/calendar/base/content/calendar-management.js
+++ b/calendar/base/content/calendar-management.js
@@ -414,17 +414,17 @@ var calendarOfflineManager = {
         if (!this.initialized) {
             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);
+        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-menus.xml
+++ b/calendar/base/content/calendar-menus.xml
@@ -44,24 +44,24 @@
             }
             let propertyValue;
             if (gTabmail && gTabmail.currentTabInfo.mode.type == "calendarTask") {
                 // We are in a task tab (editing a single task).
                 propertyValue = gConfig[this.mType];
             } else {
                 // We are in the Tasks tab.
                 let tasks = getSelectedTasks();
-                let tasksSelected = ((tasks != null) && (tasks.length > 0));
+                let tasksSelected = (tasks != null) && (tasks.length > 0);
                 if (tasksSelected) {
                     let task = tasks[0];
                     if (isPropertyValueSame(tasks, this.mType)) {
                         propertyValue = task[this.mType];
                     }
                 } else {
-                    applyAttributeToMenuChildren(this, "disabled", (!tasksSelected));
+                    applyAttributeToMenuChildren(this, "disabled", !tasksSelected);
                 }
             }
             if (propertyValue || propertyValue == 0) {
                 let command = document.getElementById("calendar_" + this.mType + "-" + propertyValue + "_command");
                 if (command) {
                     command.setAttribute("checked", "true");
                 }
             }
--- a/calendar/base/content/calendar-multiday-view.xml
+++ b/calendar/base/content/calendar-multiday-view.xml
@@ -742,17 +742,17 @@
               spanTotal = 0;
 
               // Each layer contains a list of the columns that
               // need to be created for a span.
               for (let column of layer) {
                   let innerColumn = createXULElement("box");
                   innerColumn.setAttribute("orient", orient);
 
-                  let colFlex = column.specialSpan ? (columnCount * column.specialSpan) : 1;
+                  let colFlex = column.specialSpan ? columnCount * column.specialSpan : 1;
                   innerColumn.setAttribute("flex", colFlex);
                   spanTotal += colFlex;
 
                   innerColumn.style.minWidth = "1px";
                   innerColumn.style.minHeight = "1px";
                   innerColumn.style.width = colFlex + "px";
                   innerColumn.style.height = colFlex + "px";
 
@@ -1133,17 +1133,17 @@
                   // are introduced based on the start column and number of spanning columns of an item.
                   if (data.colSpan != 1) {
                       let index = glob.totalCols * data.colSpan + data.startCol;
                       layerIndex = layerArray[index];
                       if (!layerIndex) {
                           layerIndex = layerCounter++;
                           layerArray[index] = layerIndex;
                       }
-                      let offset = ((glob.totalCols - data.colSpan) % glob.totalCols);
+                      let offset = (glob.totalCols - data.colSpan) % glob.totalCols;
                       if (offset != 0) {
                           specialSpan = data.colSpan / glob.totalCols;
                       }
                   } else {
                       layerIndex = 0;
                   }
                   layerIndex += layerOffset;
 
@@ -1308,17 +1308,17 @@
               if ((this.mDragState.shadows - 1 - this.mDragState.offset) > currentOffsetEndSide &&
                    lastCol.nextSibling) {
                   lastCol.nextSibling.fgboxes.dragbox.removeAttribute("dragging");
                   lastCol.nextSibling.fgboxes.box.removeAttribute("dragging");
               }
           }
 
           // set shadow boxes size for every part of the occurrence
-          let firstShadowSize = (aCurrentShadows == 1) ? aEnd - aStart : this.mEndMin - aStart;
+          let firstShadowSize = (aCurrentShadows == 1 ? aEnd : this.mEndMin) - aStart;
           let column = firstCol;
           for (let i = firstIndex; column && i <= lastIndex; i++) {
               column.fgboxes.box.setAttribute("dragging", "true");
               column.fgboxes.dragbox.setAttribute("dragging", "true");
               if (i == 0) {
                   // first shadow
                   column.fgboxes.dragspacer.setAttribute(aSizeattr, aStart * column.mPixPerMin);
                   column.fgboxes.dragbox.setAttribute(aSizeattr, firstShadowSize * column.mPixPerMin);
@@ -1934,18 +1934,18 @@
       <method name="updateDragLabels">
         <parameter name="aFirstColumn"/>
         <parameter name="aLastColumn"/>
         <body><![CDATA[
           if (!this.mDragState) {
               return;
           }
 
-          let firstColumn = (aFirstColumn || this);
-          let lastColumn = (aLastColumn || this);
+          let firstColumn = aFirstColumn || this;
+          let lastColumn = aLastColumn || this;
           let realstartmin = this.mDragState.startMin + this.mStartMin;
           let realendmin = this.mDragState.endMin + this.mStartMin;
           let starthr = Math.floor(realstartmin / 60);
           let startmin = realstartmin % 60;
 
           let endhr = Math.floor(realendmin / 60);
           let endmin = realendmin % 60;
 
@@ -3057,18 +3057,18 @@
                   let occEnd = occ[endDateProperty];
                   // must have at least one of start or end
                   if (!occStart && !occEnd) {
                       continue; // task with no dates
                   }
 
                   // if just has single datetime, treat as zero duration item
                   // (such as task with due datetime or start datetime only)
-                  occStart = (occStart || occEnd);
-                  occEnd = (occEnd || occStart);
+                  occStart = occStart || occEnd;
+                  occEnd = occEnd || occStart;
                   // Now both occStart and occEnd are datetimes.
 
                   // skip occurrence if all-day: it won't show in time view.
                   if (occStart.isDate || occEnd.isDate) {
                      continue;
                   }
 
                   // Trim dates to view.  (Not mutated so just reuse view dates)
@@ -3162,17 +3162,17 @@
             d.day += 1;
           }
 
           return count;
         ]]></getter>
       </property>
 
       <property name="orient">
-        <getter><![CDATA[return (this.getAttribute("orient") || "vertical");]]></getter>
+        <getter><![CDATA[return this.getAttribute("orient") || "vertical";]]></getter>
         <setter><![CDATA[this.setAttribute("orient", val); return val;]]></setter>
       </property>
 
       <property name="timeBarTimeIndicator" readonly="true">
         <getter><![CDATA[
           let timebar = document.getAnonymousElementByAttribute(this, "anonid", "timebar");
           return document.getAnonymousElementByAttribute(timebar, "anonid", "timeIndicatorBoxTimeBar");
         ]]></getter>
--- a/calendar/base/content/calendar-task-tree.xml
+++ b/calendar/base/content/calendar-task-tree.xml
@@ -187,17 +187,17 @@
           let ordinals = "";
           let visible = "";
           let sorted = this.mTreeView.selectedColumn;
           let tree = document.getAnonymousNodes(this)[0];
           let treecols = tree.getElementsByTagNameNS(tree.namespaceURI, "treecol");
           for (let i = 0; i < treecols.length; i++) {
               if (treecols[i].getAttribute("hidden") != "true") {
                 let content = treecols[i].getAttribute("itemproperty");
-                visible += (visible.length > 0) ? " " + content : content;
+                visible += visible.length > 0 ? " " + content : content;
               }
               if (ordinals.length > 0) {
                   ordinals += " ";
               }
               ordinals += treecols[i].ordinal;
               if (widths.length > 0) {
                   widths += " ";
               }
@@ -237,17 +237,17 @@
         <getter><![CDATA[
           let tree = document.getAnonymousElementByAttribute(
               this, "anonid", "calendar-task-tree");
           let index = tree.currentIndex;
           if (tree.view && tree.view.selection) {
               // If the current index is not selected, then ignore
               index = (tree.view.selection.isSelected(index) ? index : -1);
           }
-          return (index < 0) ? null : this.mTaskArray[index];
+          return index < 0 ? null : this.mTaskArray[index];
         ]]></getter>
       </property>
 
       <property name="selectedTasks" readonly="true">
         <getter><![CDATA[
           let tasks = [];
           let start = {};
           let end = {};
@@ -1101,17 +1101,17 @@
                 let context = document.getElementById(this.getAttribute("context"));
                 if (context && context.state) {
                     menuOpen = (context.state == "open") || (context.state == "showing");
                 }
             }
 
             let focused = (document.activeElement == tree) || menuOpen;
 
-            calendarController.onSelectionChanged({ detail: (focused ? this.selectedTasks : []) });
+            calendarController.onSelectionChanged({ detail: focused ? this.selectedTasks : [] });
             calendarController.todo_tasktree_focused = focused;
         ]]></body>
       </method>
 
     </implementation>
 
     <handlers>
       <handler event="select"><![CDATA[
--- a/calendar/base/content/calendar-task-view.js
+++ b/calendar/base/content/calendar-task-view.js
@@ -50,20 +50,20 @@ var taskDetailsView = {
                     document.getElementById("calendar-task-details-organizer").value = name;
                 }
             }
 
             let priority = 0;
             if (item.calendar.getProperty("capabilities.priority.supported") != false) {
                 priority = parseInt(item.priority, 10);
             }
-            displayElement("calendar-task-details-priority-label", (priority > 0));
-            displayElement("calendar-task-details-priority-low", (priority >= 6 && priority <= 9));
+            displayElement("calendar-task-details-priority-label", priority > 0);
+            displayElement("calendar-task-details-priority-low", priority >= 6 && priority <= 9);
             displayElement("calendar-task-details-priority-normal", priority == 5);
-            displayElement("calendar-task-details-priority-high", (priority >= 1 && priority <= 4));
+            displayElement("calendar-task-details-priority-high", priority >= 1 && priority <= 4);
 
             let status = item.getProperty("STATUS");
             if (displayElement("calendar-task-details-status-row", status && status.length > 0)) {
                 let statusDetails = document.getElementById("calendar-task-details-status");
                 switch (status) {
                     case "NEEDS-ACTION":
                         statusDetails.value = calGetString(
                             "calendar",
@@ -253,17 +253,17 @@ function taskViewOnLoad() {
     if (deck && tree) {
         deck.addEventListener("select", taskViewObserveDisplayDeckChange, true);
         tree.textFilterField = "task-text-filter-field";
 
         // setup the platform-dependent placeholder for the text filter field
         let textFilter = document.getElementById("task-text-filter-field");
         if (textFilter) {
             let base = textFilter.getAttribute("emptytextbase");
-            let keyLabel = textFilter.getAttribute((AppConstants.platform == "macosx") ?
+            let keyLabel = textFilter.getAttribute(AppConstants.platform == "macosx" ?
                                                    "keyLabelMac" : "keyLabelNonMac");
 
             textFilter.setAttribute("placeholder", base.replace("#1", keyLabel));
             textFilter.value = "";
         }
     }
 
     // Setup customizeDone handler for the task action toolbox.
--- a/calendar/base/content/calendar-ui-utils.js
+++ b/calendar/base/content/calendar-ui-utils.js
@@ -81,17 +81,17 @@ function getElementValue(aElement, aProp
  * removing the attribute
  *
  * @param aXulElement     The XUL element/string ID the attribute is applied to.
  * @param aAttribute      The name of the attribute
  * @param aValue          The boolean value
  * @return                Returns aValue (for chaining)
  */
 function setBooleanAttribute(aXulElement, aAttribute, aValue) {
-    setElementValue(aXulElement, (aValue ? "true" : false), aAttribute);
+    setElementValue(aXulElement, aValue ? "true" : false, aAttribute);
     return aValue;
 }
 
 /**
  * Unconditionally show the element (hidden attribute)
  *
  * @param aElement      ID of XUL element to set, or the element node itself
  */
--- a/calendar/base/content/calendar-unifinder.js
+++ b/calendar/base/content/calendar-unifinder.js
@@ -509,17 +509,17 @@ var unifinderTreeView = {
 
     /**
      * Sets the items that should be in the unifinder. This removes all items
      * that were previously in the unifinder.
      */
     setItems: function uTV_setItems(aItemArray, aDontSort) {
         let oldCount = this.eventArray.length;
         this.eventArray = aItemArray.slice(0);
-        this.tree.rowCountChanged(oldCount - 1, (this.eventArray.length - oldCount));
+        this.tree.rowCountChanged(oldCount - 1, this.eventArray.length - oldCount);
 
         if (aDontSort) {
             this.calculateIndexMap();
         } else {
             this.sortItems();
         }
     },
 
--- a/calendar/base/content/calendar-view-core.xml
+++ b/calendar/base/content/calendar-view-core.xml
@@ -343,17 +343,17 @@
 
         // stop 'single click edit' timeout (if started)
         if (this.editingTimer) {
             clearTimeout(this.editingTimer);
             this.editingTimer = null;
         }
 
         if (this.calendarView && this.calendarView.controller) {
-            let item = (event.ctrlKey) ? this.mOccurrence.parentItem : this.mOccurrence;
+            let item = event.ctrlKey ? this.mOccurrence.parentItem : this.mOccurrence;
             this.calendarView.controller.modifyOccurrence(item);
         }
       ]]></handler>
       <handler event="mouseover"><![CDATA[
         if (this.calendarView && this.calendarView.controller) {
             event.stopPropagation();
             onMouseOverItem(event);
         }
--- a/calendar/base/content/dialogs/calendar-dialog-utils.js
+++ b/calendar/base/content/dialogs/calendar-dialog-utils.js
@@ -132,19 +132,19 @@ function createReminderFromMenuitem(aMen
  * extension to open the reminder dialog, set the menulist "item-alarm" to the
  * custom menuitem and call updateReminder().
  */
 function editReminder() {
     let customItem = document.getElementById("reminder-custom-menuitem");
     let args = {};
     args.reminders = customItem.reminders;
     args.item = window.calendarItem;
-    args.timezone = (window.gStartTimezone ||
-                     window.gEndTimezone ||
-                     calendarDefaultTimezone());
+    args.timezone = window.gStartTimezone ||
+                    window.gEndTimezone ||
+                    calendarDefaultTimezone();
 
     args.calendar = getCurrentCalendar();
 
     // While these are "just" callbacks, the dialog is opened modally, so aside
     // from whats needed to set up the reminders, nothing else needs to be done.
     args.onOk = function(reminders) {
         customItem.reminders = reminders;
     };
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
@@ -238,17 +238,17 @@
           let cn = aAttendee.commonName || "";
           let inputValue = cal.removeMailTo(aAttendee.id || "");
           if (cn.length) {
               // Make the commonName appear in quotes if it contains a
               // character that could confuse the header parser
               if (cn.search(/[,;<>@]/) != -1) {
                   cn = '"' + cn + '"';
               }
-              inputValue = (inputValue.length) ? cn + ' <' + inputValue + '>' : cn;
+              inputValue = inputValue.length ? cn + ' <' + inputValue + '>' : cn;
           }
 
           // trim spaces if any
           inputValue = inputValue.trim();
 
           // don't set value with null, otherwise autocomplete stops working,
           // but make sure attendee and dirty are set
           if (inputValue.length) {
@@ -449,17 +449,17 @@
           return null;
         ]]></getter>
       </property>
 
       <method name="_resolveListByName">
         <parameter name="value"/>
         <body><![CDATA[
             let entries = MailServices.headerParser.makeFromDisplayAddress(value);
-            return (entries.length) ? this._findListInAddrBooks(entries[0].name) : null;
+            return entries.length ? this._findListInAddrBooks(entries[0].name) : null;
           ]]></body>
     </method>
 
     <method name="_findListInAddrBooks">
         <parameter name="entryname"/>
         <body><![CDATA[
             let allAddressBooks = MailServices.ab.directories;
 
@@ -674,32 +674,32 @@
               "OPT-PARTICIPANT": "optional",
               "NON-PARTICIPANT": "nonparticipant",
               "CHAIR": "chair"
             };
 
             let roleNameString = "event.attendee.role." + (role in roleMap ? roleMap[role] : "unknown");
             let tooltip = cal.calGetString("calendar-event-dialog-attendees",
                                            roleNameString,
-                                           (role in roleMap ? null : [role]));
+                                           role in roleMap ? null : [role]);
             targetIcon.setAttribute("tooltiptext", tooltip);
         } else if (targetIcon.className == "usertype-icon") {
             let cutype = targetIcon.getAttribute("cutype");
             const cutypeMap = {
                 "INDIVIDUAL": "individual",
                 "GROUP": "group",
                 "RESOURCE": "resource",
                 "ROOM": "room",
                 // I've decided UNKNOWN will not be handled.
             };
 
             let cutypeString = "event.attendee.usertype." + (cutype in cutypeMap ? cutypeMap[cutype] : "unknown");
             let tooltip = cal.calGetString("calendar-event-dialog-attendees",
                                            cutypeString,
-                                           (cutype in cutypeMap ? null : [cutype]));
+                                           cutype in cutypeMap ? null : [cutype]);
             targetIcon.setAttribute("tooltiptext", tooltip);
         }
       ]]></body>
       </method>
 
       <property name="documentSize">
         <getter><![CDATA[
             return this.mRowHeight * this.mMaxAttendees;
@@ -961,17 +961,17 @@
 
       <method name="returnHit">
         <parameter name="element"/>
         <parameter name="noAdvance"/>
         <body><![CDATA[
           function parseHeaderValue(aMsgIAddressObject) {
               if (aMsgIAddressObject.name.match(/[<>@,]/)) {
                   // special handling only needed for a name with a comma which are not already quoted
-                  return ((aMsgIAddressObject.name.match(/^".*"$/))
+                  return (aMsgIAddressObject.name.match(/^".*"$/)
                           ? aMsgIAddressObject.name
                           : '"' + aMsgIAddressObject.name + '"'
                          ) + ' <' + aMsgIAddressObject.email + '>';
               } else {
                   return aMsgIAddressObject.toString();
               }
           }
 
--- a/calendar/base/content/dialogs/calendar-event-dialog-reminder.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-reminder.js
@@ -46,19 +46,19 @@ function onLoad() {
     for (let action of supportedActions) {
         allowedActionsMap[action] = true;
     }
 
     // Hide all actions that are not supported by this provider
     let firstAvailableItem;
     let actionNodes = document.getElementById("reminder-actions-menupopup").childNodes;
     for (let actionNode of actionNodes) {
-        let shouldHide = (!(actionNode.value in allowedActionsMap) ||
-                          (actionNode.hasAttribute("provider") &&
-                           actionNode.getAttribute("provider") != calendar.type));
+        let shouldHide = !(actionNode.value in allowedActionsMap) ||
+                         (actionNode.hasAttribute("provider") &&
+                          actionNode.getAttribute("provider") != calendar.type);
         setElementValue(actionNode, shouldHide && "true", "hidden");
         if (!firstAvailableItem && !shouldHide) {
             firstAvailableItem = actionNode;
         }
     }
 
     // Correct the selected item on the supported actions list. This will be
     // changed when reminders are loaded, but in case there are none we need to
@@ -403,18 +403,18 @@ function onNewReminder() {
 
 /**
  * Handler function to be called when the "remove" button is pressed to remove
  * the selected reminder item and advance the selection.
  */
 function onRemoveReminder() {
     let listbox = document.getElementById("reminder-listbox");
     let listitem = listbox.selectedItem;
-    let newSelection = (listitem ? listitem.nextSibling ||
-                                   listitem.previousSibling : null);
+    let newSelection = listitem ? listitem.nextSibling || listitem.previousSibling
+                                 : null;
 
     listbox.clearSelection();
     listitem.remove();
     listbox.selectItem(newSelection);
 
     setElementValue("reminder-remove-button",
                     listbox.childNodes.length < 1 && "true",
                     "disabled");
--- a/calendar/base/content/dialogs/calendar-event-dialog-timezone.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-timezone.js
@@ -10,18 +10,18 @@ Components.utils.import("resource://cale
  * Sets up the timezone dialog from the window arguments, also setting up all
  * dialog controls from the window's dates.
  */
 function onLoad() {
     let args = window.arguments[0];
     window.time = args.time;
     window.onAcceptCallback = args.onOk;
 
-    let tzProvider = (args.calendar.getProperty("timezones.provider") ||
-                      cal.getTimezoneService());
+    let tzProvider = args.calendar.getProperty("timezones.provider") ||
+                     cal.getTimezoneService();
     window.tzProvider = tzProvider;
 
     let menulist = document.getElementById("timezone-menulist");
     let tzMenuPopup = document.getElementById("timezone-menupopup");
 
     // floating and UTC (if supported) at the top:
     if (args.calendar.getProperty("capabilities.timezones.floating.supported") !== false) {
         addMenuItem(tzMenuPopup, floating().displayName, floating().tzid);
--- a/calendar/base/content/dialogs/calendar-print-dialog.js
+++ b/calendar/base/content/dialogs/calendar-print-dialog.js
@@ -69,17 +69,17 @@ function loadCalendarPrintDialog() {
  * settings.
  *
  * @param receiverFunc  The callback function to call on completion.
  */
 function getPrintSettings(receiverFunc) {
     let tempTitle = document.getElementById("title-field").value;
     let settings = {};
     let requiresFetch = true;
-    settings.title = (tempTitle || calGetString("calendar", "Untitled"));
+    settings.title = tempTitle || calGetString("calendar", "Untitled");
     settings.layoutCId = document.getElementById("layout-field").value;
     settings.start = null;
     settings.end = null;
     settings.eventList = [];
     settings.printEvents = document.getElementById("events").checked;
     settings.printTasks = document.getElementById("tasks").checked;
     settings.printCompletedTasks = document.getElementById("completed-tasks").checked;
     settings.printTasksWithNoDueDate = document.getElementById("tasks-with-no-due-date").checked;
--- a/calendar/base/content/dialogs/calendar-properties-dialog.js
+++ b/calendar/base/content/dialogs/calendar-properties-dialog.js
@@ -27,23 +27,23 @@ function onLoad() {
     document.getElementById("read-only").checked = gCalendar.readOnly;
 
     // Set up refresh interval
     initRefreshInterval();
 
     // Set up the cache field
     let cacheBox = document.getElementById("cache");
     let canCache = (gCalendar.getProperty("cache.supported") !== false);
-    let alwaysCache = (gCalendar.getProperty("cache.always"));
+    let alwaysCache = gCalendar.getProperty("cache.always");
     if (!canCache || alwaysCache) {
         cacheBox.setAttribute("disable-capability", "true");
         cacheBox.hidden = true;
         cacheBox.disabled = true;
     }
-    cacheBox.checked = (alwaysCache || (canCache && gCalendar.getProperty("cache.enabled")));
+    cacheBox.checked = alwaysCache || (canCache && gCalendar.getProperty("cache.enabled"));
 
     // Set up the show alarms row and checkbox
     let suppressAlarmsRow = document.getElementById("calendar-suppressAlarms-row");
     let suppressAlarms = gCalendar.getProperty('suppressAlarms');
     document.getElementById("fire-alarms").checked = !suppressAlarms;
 
     suppressAlarmsRow.hidden =
         (gCalendar.getProperty("capabilities.alarms.popup.supported") === false);
@@ -88,17 +88,17 @@ function onAcceptDialog() {
 
     // Save refresh interval
     if (gCalendar.canRefresh) {
         let value = getElementValue("calendar-refreshInterval-menulist");
         gCalendar.setProperty("refreshInterval", value);
     }
 
     // Save cache options
-    let alwaysCache = (gCalendar.getProperty("cache.always"));
+    let alwaysCache = gCalendar.getProperty("cache.always");
     if (!alwaysCache) {
         gCalendar.setProperty("cache.enabled", document.getElementById("cache").checked);
     }
 
     if (!gCalendar.getProperty("force-disabled")) {
         // Save disabled option (should do this last), remove auto-enabled
         gCalendar.setProperty("disabled", !document.getElementById("calendar-enabled-checkbox").checked);
         gCalendar.deleteProperty("auto-enabled");
--- a/calendar/base/content/today-pane.js
+++ b/calendar/base/content/today-pane.js
@@ -70,24 +70,24 @@ var TodayPane = {
             agendaIsVisible = true;
             document.getElementById("agenda-panel").setVisible(agendaIsVisible);
             index = 2;
         }
         let todayHeader = document.getElementById("today-pane-header");
         todayHeader.setAttribute("index", index);
         todayHeader.setAttribute("value", this.paneViews[index]);
         let todayPaneSplitter = document.getElementById("today-pane-splitter");
-        setBooleanAttribute(todayPaneSplitter, "hidden", (index != 0));
+        setBooleanAttribute(todayPaneSplitter, "hidden", index != 0);
         let todayIsVisible = document.getElementById("today-pane-panel").isVisible();
 
         // Disable or enable the today pane menuitems that have an attribute
         // name="minidisplay" depending on the visibility of elements.
         let menu = document.getElementById("ltnTodayPaneMenuPopup");
         if (menu) {
-            setAttributeToChildren(menu, "disabled", (!todayIsVisible || !agendaIsVisible), "name", "minidisplay");
+            setAttributeToChildren(menu, "disabled", !todayIsVisible || !agendaIsVisible, "name", "minidisplay");
         }
 
         onCalendarViewResize();
     },
 
     /**
      * Sets up the miniday display in the today pane.
      */
@@ -384,17 +384,17 @@ var TodayPane = {
             this.setDay(this.start);
         }
     },
 
     /**
      * Checks if the today pane is showing today's date.
      */
     showsToday: function showsToday() {
-        return (cal.sameDay(cal.now(), this.start));
+        return cal.sameDay(cal.now(), this.start);
     },
 
     /**
      * Update the period headers in the agenda listbox using the today pane's
      * start date.
      */
     updatePeriod: function updatePeriod() {
         agendaListbox.refreshPeriodDates(this.start.clone());
--- a/calendar/base/content/widgets/calendar-list-tree.xml
+++ b/calendar/base/content/widgets/calendar-list-tree.xml
@@ -60,18 +60,18 @@
           // Setting calendars externally is not wanted. This is done internally
           // in the compositeCalendar setter.
           throw Components.Exception("Seting calendars on type='full' is not supported",
                                      Components.results.NS_ERROR_NOT_IMPLEMENTED);
         ]]></setter>
       </property>
 
       <field name="calMgrObserver"><![CDATA[
-      ({ listTree: this,
-
+      ({
+        listTree: this,
         QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calICalendarManagerObserver]),
 
         // calICalendarManagerObserver
         onCalendarRegistered: function cMO_onCalendarRegistered(aCalendar) {
             this.listTree.addCalendar(aCalendar);
             let composite = this.listTree.compositeCalendar;
             let inComposite = aCalendar.getProperty(composite.prefPrefix +
                                                     "-in-composite");
@@ -88,18 +88,18 @@
             // Now that the calendar is unregistered, update the commands to
             // make sure that New Event/Task commands are correctly
             // enabled/disabled.
             document.commandDispatcher.updateCommands("calendar_commands");
         }
       })
       ]]></field>
       <field name="compositeObserver"><![CDATA[
-      ({ listTree: this,
-
+      ({
+        listTree: this,
         QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calICompositeObserver,
                                                Components.interfaces.calIObserver]),
 
         // calICompositeObserver
         onCalendarAdded: function onCalendarAdded(aCalendar) {
             // Make sure the checkbox state is updated
             this.listTree.updateCalendar(aCalendar);
         },
@@ -248,18 +248,18 @@
         this.calObserver.listTree = null;
 
         if (this.mCompositeCalendar) {
             this.mCompositeCalendar.removeObserver(this.compositeObserver);
         }
       ]]></destructor>
 
       <field name="calObserver"><![CDATA[
-      ({ listTree: this,
-
+      ({
+        listTree: this,
         QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calIObserver]),
 
         // calIObserver. Note that each registered calendar uses this observer
         onStartBatch: function cMO_onStartBatch() { },
         onEndBatch: function cMO_onEndBatch() { },
         onLoad: function cMO_onLoad() { },
 
         onAddItem: function cMO_onAddItem(aItem) { },
@@ -294,18 +294,18 @@
             // but should not be the same as the value, set it to a different
             // value.
             this.onPropertyChanged(aCalendar, aName, null, null);
         }
       })
       ]]></field>
 
       <field name="compositeObserver"><![CDATA[
-      ({ listTree: this,
-
+      ({
+        listTree: this,
         QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calICompositeObserver]),
 
         // calICompositeObserver
         onCalendarAdded: function onCalendarAdded(aCalendar) {
             // Make sure the checkbox state is updated
             this.listTree.updateCalendar(aCalendar);
         },
 
@@ -403,17 +403,18 @@
           let event = document.createEvent('Events');
           event.initEvent("SortOrderChanged", true, false);
           event.sortOrder = this.sortOrder;
           this.dispatchEvent(event);
 
           let handler = this.getAttribute("onSortOrderChanged");
           if (handler) {
               // Call the given code in a function
-              (new Function("event", handler))(event);
+              let func = new Function("event", handler);
+              func(event);
           }
         ]]></body>
       </method>
       <method name="displayScrollbarSpacer">
         <parameter name="aShouldDisplay"/>
         <body><![CDATA[
             let spacer = document.getAnonymousElementByAttribute(this, "anonid", "scrollbar-spacer");
             spacer.collapsed = !aShouldDisplay;
--- a/calendar/base/content/widgets/calendar-widgets.xml
+++ b/calendar/base/content/widgets/calendar-widgets.xml
@@ -341,17 +341,17 @@
             if (!this.isVisibleInMode(lMode)) {
                 return false;
             }
             let collapsedModes = this.getAttribute("collapsedinmodes").split(",");
             return (!collapsedModes.includes(lMode));
         ]]></body>
       </method>
 
-      <method name="setModeAttribute"> 
+      <method name="setModeAttribute">
         <parameter name="aModeAttribute"/>
         <parameter name="aModeValue"/>
         <parameter name="amode"/>
         <body><![CDATA[
             if (this.hasAttribute(aModeAttribute)) {
                 let lMode = amode || this.currentMode;
                 let modeAttributeValues = this.getAttribute(aModeAttribute).split(",");
                 let modes = this.getAttribute("mode").split(",");
@@ -377,33 +377,33 @@
         ]]></body>
       </method>
 
       <method name="setVisible">
         <parameter name="aVisible"/>
         <parameter name="aPushModeCollapsedAttribute"/>
         <parameter name="aNotifyRefControl"/>
         <body><![CDATA[
-            let notifyRefControl = ((aNotifyRefControl == null) || (aNotifyRefControl === true));
+            let notifyRefControl = aNotifyRefControl == null || aNotifyRefControl === true;
             let pushModeCollapsedAttribute = aPushModeCollapsedAttribute == null ||
                                              aPushModeCollapsedAttribute === true;
             let collapsedModes = [];
             let modeIndex = -1;
             let display = aVisible;
             let collapsedInMode = false;
             if (this.hasAttribute("collapsedinmodes")) {
                 collapsedModes = this.getAttribute("collapsedinmodes").split(",");
                 modeIndex = collapsedModes.indexOf(this.currentMode);
                 collapsedInMode = (modeIndex > -1);
             }
             if ((aVisible === true) && (pushModeCollapsedAttribute == false)) {
                 display = (aVisible === true) && (!collapsedInMode);
             }
 
-            setBooleanAttribute(this, "collapsed", (!display || !this.isVisibleInMode()));
+            setBooleanAttribute(this, "collapsed", !display || !this.isVisibleInMode());
             if (pushModeCollapsedAttribute) {
                 if (!display) {
                     if (modeIndex == -1) {
                         collapsedModes.push(this.currentMode);
                         if (this.getAttribute("collapsedinmodes") == ",") {
                             collapsedModes.splice(0, 2);
                         }
                     }
--- a/calendar/base/content/widgets/minimonth.xml
+++ b/calendar/base/content/widgets/minimonth.xml
@@ -184,31 +184,31 @@
          ]]></body>
        </method>
        <method name="updateMonthPopup">
          <parameter name="aDate"/>
          <body><![CDATA[
            let months = document.getAnonymousElementByAttribute(this, "anonid", "months-popup").firstChild.childNodes;
            let month = aDate.getMonth();
            for (let i = 0; i < months.length; i++) {
-               months[i].setAttribute("current", (i == month) ? "true" : "false");
+               months[i].setAttribute("current", i == month ? "true" : "false");
            }
          ]]></body>
        </method>
        <method name="updateYearPopup">
          <parameter name="aDate"/>
          <body><![CDATA[
            let years = document.getAnonymousElementByAttribute(this, "anonid", "years-popup").firstChild.childNodes;
            let year = new Date(aDate);
            let compFullYear = aDate.getFullYear();
            year.setFullYear(Math.max(1, compFullYear - Math.trunc(years.length / 2) + 1));
            for (let i = 1; i < years.length - 1; i++) {
                let curfullYear = year.getFullYear();
                years[i].setAttribute("value", curfullYear);
-               years[i].setAttribute("current", (curfullYear == compFullYear) ? "true" : "false");
+               years[i].setAttribute("current", curfullYear == compFullYear ? "true" : "false");
                year.setFullYear(curfullYear + 1);
            }
          ]]></body>
        </method>
 
        <method name="scrollYears">
          <parameter name="event"/>
          <body><![CDATA[
--- a/calendar/base/modules/calAlarmUtils.jsm
+++ b/calendar/base/modules/calAlarmUtils.jsm
@@ -33,19 +33,19 @@ cal.alarms = {
                 // You can't have an alarm if the entryDate doesn't exist.
                 aItem.entryDate = cal.now();
             }
             alarm.related = Components.interfaces.calIAlarm.ALARM_RELATED_START;
             alarm.offset = alarmOffset;
 
             // Default to a display alarm, unless the calendar doesn't support
             // it or we have no calendar yet. (Man this is hard to wrap)
-            let actionValues = ((aItem.calendar &&
+            let actionValues = (aItem.calendar &&
                                  aItem.calendar.getProperty("capabilities.alarms.actionValues")) ||
-                                ["DISPLAY"]);
+                                ["DISPLAY"];
 
             alarm.action = (actionValues.includes("DISPLAY") ? "DISPLAY" : actionValues[0]);
             aItem.addAlarm(alarm);
         }
     },
 
     /**
      * Calculate the alarm date for a calIAlarm.
--- a/calendar/base/modules/calItipUtils.jsm
+++ b/calendar/base/modules/calItipUtils.jsm
@@ -107,19 +107,19 @@ cal.itip = {
     /**
      * Checks if the given calendar is a scheduling calendar. This means it
      * needs an organizer id and an itip transport. It should also be writable.
      *
      * @param calendar    The calendar to check
      * @return            True, if its a scheduling calendar.
      */
     isSchedulingCalendar: function isSchedulingCalendar(calendar) {
-        return (cal.isCalendarWritable(calendar) &&
-                calendar.getProperty("organizerId") &&
-                calendar.getProperty("itip.transport"));
+        return cal.isCalendarWritable(calendar) &&
+               calendar.getProperty("organizerId") &&
+               calendar.getProperty("itip.transport");
     },
 
     /**
      * Scope: iTIP message receiver
      *
      * Given an nsIMsgDBHdr and an imipMethod, set up the given itip item.
      *
      * @param itipItem    The item to set up
@@ -466,17 +466,17 @@ cal.itip = {
                                    "_blank", "chrome,titlebar,modal,resizable", args);
             }
 
             if (targetCalendar) {
                 aItipItem.targetCalendar = targetCalendar;
             }
         }
 
-        return (!needsCalendar || targetCalendar != null);
+        return !needsCalendar || targetCalendar != null;
     },
 
     /**
      * Clean up after the given iTIP item. This needs to be called once for each
      * time processItipItem is called. May be called with a null itipItem in
      * which case it will do nothing.
      *
      * @param itipItem      The iTIP item to clean up for.
@@ -563,19 +563,19 @@ cal.itip = {
                 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 &&
-                                        wrappedR.date.compare(wrappedRItem.date) == 0);
+                                return r.isNegative &&
+                                       wrappedR &&
+                                       wrappedR.date.compare(wrappedRItem.date) == 0;
                             })) {
                         exdates.push(wrappedRItem);
                     }
                 }
                 if (exdates.length > 0) {
                     // check whether really only EXDATEs have been added:
                     let recInfo = clonedItem.recurrenceInfo;
                     exdates.forEach(recInfo.deleteRecurrenceItem, recInfo);
@@ -834,33 +834,32 @@ 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) {
+    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 || [])) {
+        for (let item of aItems) {
             serializedItems += cal.getSerializedItem(item);
         }
         itipItem.init(serializedItems);
 
-        let props = aProps || {};
-        itipItem.autoResponse = ("autoResponse" in props) ? props.autoResponse : aItipItem.autoResponse;
-        itipItem.identity = ("identity" in props) ? props.identity : aItipItem.identity;
-        itipItem.isSend = ("isSend" in props) ? props.isSend : aItipItem.isSend;
-        itipItem.localStatus = ("localStatus" in props) ? props.localStatus : aItipItem.localStatus;
-        itipItem.receivedMethod = ("receivedMethod" in props) ? props.receivedMethod : aItipItem.receivedMethod;
-        itipItem.responseMethod = ("responseMethod" in props) ? props.responseMethod : aItipItem.responseMethod;
-        itipItem.targetCalendar = ("targetCalendar" in props) ? properties.targetCalendar : aItipItem.targetCalendar;
+        itipItem.autoResponse = ("autoResponse" in aProps) ? aProps.autoResponse : aItipItem.autoResponse;
+        itipItem.identity = ("identity" in aProps) ? aProps.identity : aItipItem.identity;
+        itipItem.isSend = ("isSend" in aProps) ? aProps.isSend : aItipItem.isSend;
+        itipItem.localStatus = ("localStatus" in aProps) ? aProps.localStatus : aItipItem.localStatus;
+        itipItem.receivedMethod = ("receivedMethod" in aProps) ? aProps.receivedMethod : aItipItem.receivedMethod;
+        itipItem.responseMethod = ("responseMethod" in aProps) ? aProps.responseMethod : aItipItem.responseMethod;
+        itipItem.targetCalendar = ("targetCalendar" in aProps) ? aProps.targetCalendar : aItipItem.targetCalendar;
 
         return itipItem;
     }
 };
 
 /** local to this module file
  * Sets the received info either on the passed attendee or item object.
  *
@@ -938,17 +937,17 @@ function updateItem(item, itipItemItem) 
     if (recInfo) {
         // keep care of installing all overridden items, and mind existing alarms, categories:
         for (let rid of recInfo.getExceptionIds({})) {
             let excItem = recInfo.getExceptionFor(rid).clone();
             cal.ASSERT(excItem, "unexpected!");
             let newExc = newItem.recurrenceInfo.getOccurrenceFor(rid).clone();
             newExc.icalComponent = excItem.icalComponent;
             setReceivedInfo(newExc, itipItemItem);
-            let existingExcItem = (item.recurrenceInfo && item.recurrenceInfo.getExceptionFor(rid));
+            let existingExcItem = item.recurrenceInfo && item.recurrenceInfo.getExceptionFor(rid);
             if (existingExcItem) {
                 updateUserData(newExc, existingExcItem);
             }
             newItem.recurrenceInfo.modifyException(newExc, true);
         }
     }
 
     return newItem;
@@ -1020,23 +1019,24 @@ function sendMessage(aItem, aMethod, aRe
 
     let aTransport = aItem.calendar.getProperty("itip.transport");
     if (!aTransport) { // can only send if there's a transport for the calendar
         return false;
     }
     aTransport = aTransport.QueryInterface(Components.interfaces.calIItipTransport);
 
     let _sendItem = function(aSendToList, aSendItem) {
+        let cIII = Components.interfaces.calIItipItem;
         let itipItem = Components.classes["@mozilla.org/calendar/itip-item;1"]
                                  .createInstance(Components.interfaces.calIItipItem);
         itipItem.init(cal.getSerializedItem(aSendItem));
         itipItem.responseMethod = aMethod;
         itipItem.targetCalendar = aSendItem.calendar;
-        itipItem.autoResponse = ((autoResponse && autoResponse.value) ? Components.interfaces.calIItipItem.AUTO
-                                                                      : Components.interfaces.calIItipItem.USER);
+        itipItem.autoResponse = autoResponse && autoResponse.value ? cIII.calIItipItem.AUTO
+                                                                   : cIII.USER;
         if (autoResponse) {
             autoResponse.value = true; // auto every following
         }
         // XXX I don't know whether the below are used at all, since we don't use the itip processor
         itipItem.isSend = true;
 
         return aTransport.sendItems(aSendToList.length, aSendToList, itipItem);
     };
@@ -1389,17 +1389,17 @@ ItipItemFinder.prototype = {
                                 case "REPLY": {
                                     let attendees = itipItemItem.getAttendees({});
                                     cal.ASSERT(attendees.length == 1, "invalid number of attendees in REPLY!");
                                     if (attendees.length > 0 &&
                                         (item.calendar.getProperty("itip.disableRevisionChecks") ||
                                          (cal.itip.compare(itipItemItem, item.getAttendeeById(attendees[0].id)) > 0))) {
                                         // accepts REPLYs from previously uninvited attendees:
                                         let newItem = item.clone();
-                                        let att = (item.getAttendeeById(attendees[0].id) || attendees[0]);
+                                        let att = item.getAttendeeById(attendees[0].id) || attendees[0];
                                         newItem.removeAttendee(att);
                                         att = att.clone();
                                         setReceivedInfo(att, itipItemItem);
                                         att.participationStatus = attendees[0].participationStatus;
                                         newItem.addAttendee(att);
 
                                         // Make sure the provider-specified properties are copied over
                                         copyProviderProperties(this.mItipItem, itipItemItem, newItem);
@@ -1498,17 +1498,17 @@ ItipItemFinder.prototype = {
                                     cal.ASSERT(att, "no attendee to reply REQUEST!");
                                     return null;
                                 }
                             } else {
                                 cal.ASSERT(itipItemItem.getAttendees({}).length == 0,
                                            "invalid number of attendees in PUBLISH!");
                             }
                             return newItem.calendar.addItem(newItem,
-                                                            (method == "REQUEST")
+                                                            method == "REQUEST"
                                                             ? new ItipOpListener(opListener, null)
                                                             : opListener);
                         };
                         operations.push(action);
                         break;
                     }
                     case "CANCEL": // has already been processed
                     case "REPLY": // item has been previously removed from the calendar
--- a/calendar/base/src/calCalendarManager.js
+++ b/calendar/base/src/calCalendarManager.js
@@ -403,19 +403,19 @@ calCalendarManager.prototype = {
         let hostAppName = calGetString("brand", "brandShortName", null, "branding");
         let calAppName = calGetString("lightning", "brandShortName", null, "lightning");
         let errorBoxTitle = calGetString("calendar", "tooNewSchemaErrorBoxTitle", [calAppName]);
         let errorBoxText = calGetString("calendar", "tooNewSchemaErrorBoxTextLightning", [calAppName, hostAppName]);
         let errorBoxButtonLabel = calGetString("calendar", "tooNewSchemaButtonRestart", [hostAppName]);
 
         let promptSvc = Services.prompt;
 
-        let errorBoxButtonFlags = (promptSvc.BUTTON_POS_0 *
-                                   promptSvc.BUTTON_TITLE_IS_STRING +
-                                   promptSvc.BUTTON_POS_0_DEFAULT);
+        let errorBoxButtonFlags = promptSvc.BUTTON_POS_0 *
+                                  promptSvc.BUTTON_TITLE_IS_STRING +
+                                  promptSvc.BUTTON_POS_0_DEFAULT;
 
         promptSvc.confirmEx(null,
                             errorBoxTitle,
                             errorBoxText,
                             errorBoxButtonFlags,
                             errorBoxButtonLabel,
                             null, // No second button text
                             null, // No third button text
@@ -718,34 +718,34 @@ calCalendarManager.prototype = {
         }
     },
 
     getCalendarPref_: function(calendar, name) {
         cal.ASSERT(calendar, "Invalid Calendar!");
         cal.ASSERT(calendar.id !== null, "Calendar id needs to be set!");
         cal.ASSERT(name && name.length > 0, "Pref Name must be non-empty!");
 
-        let branch = (getPrefBranchFor(calendar.id) + name);
+        let branch = getPrefBranchFor(calendar.id) + name;
         let value = Preferences.get(branch, null);
 
         if (typeof value == "string" && value.startsWith("bignum:")) {
             let converted = Number(value.substr(7));
             if (!isNaN(converted)) {
                 value = converted;
             }
         }
         return value;
     },
 
     setCalendarPref_: function(calendar, name, value) {
         cal.ASSERT(calendar, "Invalid Calendar!");
         cal.ASSERT(calendar.id !== null, "Calendar id needs to be set!");
         cal.ASSERT(name && name.length > 0, "Pref Name must be non-empty!");
 
-        let branch = (getPrefBranchFor(calendar.id) + name);
+        let branch = getPrefBranchFor(calendar.id) + name;
 
         if (typeof value == "number" && (value > MAX_INT || value < MIN_INT || !Number.isInteger(value))) {
             // This is something the preferences service can't store directly.
             // Convert to string and tag it so we know how to handle it.
             value = "bignum:" + value;
         }
 
         // Delete before to allow pref-type changes, then set the pref.
@@ -1025,17 +1025,17 @@ calDummyCalendar.prototype = {
                 return true;
             default:
                 return this.__proto__.__proto__.getProperty.apply(this, arguments);
         }
     }
 };
 
 function getPrefBranchFor(id) {
-    return (REGISTRY_BRANCH + id + ".");
+    return REGISTRY_BRANCH + id + ".";
 }
 
 /**
  * Helper function to flush the preferences file. If the application crashes
  * after a calendar has been created using the prefs registry, then the calendar
  * won't show up. Writing the prefs helps counteract.
  */
 function flushPrefs() {
--- a/calendar/base/src/calEvent.js
+++ b/calendar/base/src/calEvent.js
@@ -148,17 +148,17 @@ calEvent.prototype = {
         this.importUnpromotedProperties(event, this.eventPromotedProps);
 
         // Importing didn't really change anything
         this.mDirty = false;
     },
 
     isPropertyPromoted: function(name) {
         // avoid strict undefined property warning
-        return (this.eventPromotedProps[name] || false);
+        return this.eventPromotedProps[name] || false;
     },
 
     set startDate(value) {
         this.modify();
 
         // We're about to change the start date of an item which probably
         // could break the associated calIRecurrenceInfo. We're calling
         // the appropriate method here to adjust the internal structure in
--- a/calendar/base/src/calFilter.js
+++ b/calendar/base/src/calFilter.js
@@ -747,17 +747,17 @@ calFilter.prototype = {
     /**
      * Checks if the item matches the currently applied filter properties and text filter.
      *
      * @param aItem               The item to check.
      * @return                    Returns true if the item matches the filters,
      *                            false otherwise.
      */
     isItemInFilters: function cF_isItemInFilters(aItem) {
-        return (this.propertyFilter(aItem) && this.textFilter(aItem));
+        return this.propertyFilter(aItem) && this.textFilter(aItem);
     },
 
     /**
      * Finds the next occurrence of a repeating item that matches the currently applied
      * filter properties.
      *
      * @param aItem               The parent item to find the next occurrence of.
      * @return                    Returns the next occurrence that matches the filters,
@@ -790,17 +790,17 @@ calFilter.prototype = {
             cal.WARN("[calFilter] getNextOccurrence: reached maximum iterations for " + aItem.title);
             return null;
         } else {
             // the parent item doesn't match the filter, we can return the first future exception
             // that matches the filter
             let exMatch = null;
             aItem.recurrenceInfo.getExceptionIds({}).forEach(function(rID) {
                 let ex = aItem.recurrenceInfo.getExceptionFor(rID);
-                if (ex && cal.now().compare((ex.startDate || ex.entryDate)) < 0 &&
+                if (ex && cal.now().compare(ex.startDate || ex.entryDate) < 0 &&
                     this.isItemInFilters(ex)) {
                     exMatch = ex;
                 }
             }, this);
             return exMatch;
         }
     },
 
--- a/calendar/base/src/calIcsParser.js
+++ b/calendar/base/src/calIcsParser.js
@@ -234,20 +234,20 @@ parserState.prototype = {
             let tzid = dt.timezone.tzid;
             let hid = item.hashId + "#" + tzid;
             if (!(hid in this.tzErrors)) {
                 // For now, publish errors to console and alert user.
                 // In future, maybe make them available through an interface method
                 // so this UI code can be removed from the parser, and caller can
                 // choose whether to alert, or show user the problem items and ask
                 // for fixes, or something else.
-                let msg = (calGetString("calendar", "unknownTimezoneInItem",
-                                        [tzid, item.title, cal.getDateFormatter().formatDateTime(dt)]) +
-                           "\n" + item.icalString);
-                cal.ERROR(msg);
+                let msgArgs = [tzid, item.title, cal.getDateFormatter().formatDateTime(dt)];
+                let msg = calGetString("calendar", "unknownTimezoneInItem", msgArgs);
+
+                cal.ERROR(msg + "\n" + item.icalString);
                 this.tzErrors[hid] = true;
             }
         }
     },
 
     /**
      * Submit processing of a subcomponent to the event queue
      *
--- a/calendar/base/src/calItemBase.js
+++ b/calendar/base/src/calItemBase.js
@@ -55,17 +55,17 @@ calItemBase.prototype = {
      */
     QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calIItemBase]),
 
     /**
      * @see calIItemBase
      */
     get aclEntry() {
         let aclEntry = this.mACLEntry;
-        let aclManager = (this.calendar && this.calendar.superCalendar.aclManager);
+        let aclManager = this.calendar && this.calendar.superCalendar.aclManager;
 
         if (!aclEntry && aclManager) {
             this.mACLEntry = aclManager.getItemEntry(this);
             aclEntry = this.mACLEntry;
         }
 
         if (!aclEntry && this.parentItem != this) {
             // No ACL entry on this item, check the parent
@@ -116,17 +116,17 @@ calItemBase.prototype = {
     },
     set recurrenceInfo(value) {
         this.modify();
         return (this.mRecurrenceInfo = calTryWrappedJSObject(value));
     },
 
     // attribute calIItemBase parentItem;
     get parentItem() {
-        return (this.mParentItem || this);
+        return this.mParentItem || this;
     },
     set parentItem(value) {
         if (this.mImmutable) {
             throw Components.results.NS_ERROR_OBJECT_IS_IMMUTABLE;
         }
         return (this.mParentItem = calTryWrappedJSObject(value));
     },
 
@@ -224,20 +224,20 @@ calItemBase.prototype = {
         }
 
         this.ensureNotDirty();
         this.mImmutable = true;
     },
 
      // boolean hasSameIds(in calIItemBase aItem);
     hasSameIds: function cIB_hasSameIds(that) {
-        return (that && this.id == that.id &&
-                (this.recurrenceId == that.recurrenceId || // both null
-                 (this.recurrenceId && that.recurrenceId &&
-                  this.recurrenceId.compare(that.recurrenceId) == 0)));
+        return that && this.id == that.id &&
+               (this.recurrenceId == that.recurrenceId || // both null
+                (this.recurrenceId && that.recurrenceId &&
+                 this.recurrenceId.compare(that.recurrenceId) == 0));
     },
 
     // calIItemBase clone();
     clone: function cIB_clone() {
         return this.cloneShallow(this.mParentItem);
     },
 
     /**
@@ -246,17 +246,17 @@ calItemBase.prototype = {
      *
      * @param m     The item to clone this item into
      * @param aNewParent    (optional) The new parent item to set on m.
      */
     cloneItemBaseInto: function cIB_cloneItemBaseInto(m, aNewParent) {
         m.mImmutable = false;
         m.mACLEntry = this.mACLEntry;
         m.mIsProxy = this.mIsProxy;
-        m.mParentItem = (calTryWrappedJSObject(aNewParent) || this.mParentItem);
+        m.mParentItem = calTryWrappedJSObject(aNewParent) || this.mParentItem;
         m.mHashId = this.mHashId;
         m.mCalendar = this.mCalendar;
         if (this.mRecurrenceInfo) {
             m.mRecurrenceInfo = calTryWrappedJSObject(this.mRecurrenceInfo.clone());
             m.mRecurrenceInfo.item = m;
         }
 
         let org = this.organizer;
@@ -449,18 +449,18 @@ calItemBase.prototype = {
         return null;
     },
 
     // boolean hasPropertyParameter(in AString aPropertyName,
     //                              in AString aParameterName);
     hasPropertyParameter: function cIB_hasPropertyParameter(aPropName, aParamName) {
         let propName = aPropName.toUpperCase();
         let paramName = aParamName.toUpperCase();
-        return ((propName in this.mPropertyParams) &&
-                (paramName in this.mPropertyParams[propName]));
+        return (propName in this.mPropertyParams) &&
+                (paramName in this.mPropertyParams[propName]);
     },
 
     // void setPropertyParameter(in AString aPropertyName,
     //                           in AString aParameterName,
     //                           in AUTF8String aParameterValue);
     setPropertyParameter: function cIB_setPropertyParameter(aPropName, aParamName, aParamValue) {
         let propName = aPropName.toUpperCase();
         let paramName = aParamName.toUpperCase();
@@ -936,17 +936,17 @@ calItemBase.prototype = {
                     this.mPropertyParams[propName][paramName] = paramValue;
                 }
             }
         }
     },
 
     // boolean isPropertyPromoted(in AString name);
     isPropertyPromoted: function cIB_isPropertyPromoted(name) {
-        return (this.itemBasePromotedProps[name.toUpperCase()]);
+        return this.itemBasePromotedProps[name.toUpperCase()];
     },
 
     // attribute calIIcalComponent icalComponent;
     get icalComponent() {
         throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
     },
     set icalComponent(val) {
         throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
--- a/calendar/base/src/calItipItem.js
+++ b/calendar/base/src/calItipItem.js
@@ -184,17 +184,17 @@ calItipItem.prototype = {
 
     /**
      * Note that this code forces the user to respond to all items in the same
      * way, which is a current limitation of the spec.
      */
     setAttendeeStatus: function ciiSAS(aAttendeeId, aStatus) {
         // Append "mailto:" to the attendee if it is missing it.
         if (!aAttendeeId.match(/^mailto:/i)) {
-            aAttendeeId = ("mailto:" + aAttendeeId);
+            aAttendeeId = "mailto:" + aAttendeeId;
         }
 
         for (let item of this.mItemList) {
             let attendee = item.getAttendeeById(aAttendeeId);
             if (attendee) {
                 // Replies should not have the RSVP property.
                 // XXX BUG 351589: workaround for updating an attendee
                 item.removeAttendee(attendee);
--- a/calendar/base/src/calTimezoneService.js
+++ b/calendar/base/src/calTimezoneService.js
@@ -588,19 +588,18 @@ function guessSystemTimezone() {
     // First, try to detect operating system timezone.
     let zoneInfoIdFromOSUserTimeZone = null;
     let osUserTimeZone = null;
     try {
         let handler = Components.classes["@mozilla.org/network/protocol;1?name=http"]
                                 .getService(Components.interfaces.nsIHttpProtocolHandler);
 
         if (handler.oscpu.match(/^Windows/)) {
-            let wrk = (Components
-                       .classes["@mozilla.org/windows-registry-key;1"]
-                       .createInstance(Components.interfaces.nsIWindowsRegKey));
+            let wrk = Components.classes["@mozilla.org/windows-registry-key;1"]
+                                .createInstance(Components.interfaces.nsIWindowsRegKey);
             wrk.open(wrk.ROOT_KEY_LOCAL_MACHINE,
                      "SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
                      wrk.ACCESS_READ);
             if (wrk.hasValue("TimeZoneKeyName")) {
                 // Windows Vista and later have this key.
                 // Clear trailing garbage on this key, see bug 1129712.
                 osUserTimeZone = wrk.readStringValue("TimeZoneKeyName").split("\0")[0];
             } else {
@@ -650,21 +649,21 @@ function guessSystemTimezone() {
             // The timezone is set per user via the TZ environment variable.
             // TZ may contain a path that may start with a colon and ends with
             // a ZoneInfo timezone identifier, such as ":America/New_York" or
             // ":/share/lib/zoneinfo/America/New_York".  The others are
             // in the filesystem so they give one timezone for the system;
             // the values are similar (but cannot have a leading colon).
             // (Note: the OS ZoneInfo database may be a different version from
             // the one we use, so still need to check that DST dates match.)
-            osUserTimeZone = (environmentVariableValue("TZ") ||
-                              symbolicLinkTarget("/etc/localtime") ||
-                              fileFirstZoneLineString("/etc/TIMEZONE") ||
-                              fileFirstZoneLineString("/etc/timezone") ||
-                              fileFirstZoneLineString("/etc/sysconfig/clock"));
+            osUserTimeZone = environmentVariableValue("TZ") ||
+                             symbolicLinkTarget("/etc/localtime") ||
+                             fileFirstZoneLineString("/etc/TIMEZONE") ||
+                             fileFirstZoneLineString("/etc/timezone") ||
+                             fileFirstZoneLineString("/etc/sysconfig/clock");
             let results = osUserTimeZone.match(tzRegex);
             if (results) {
                 zoneInfoIdFromOSUserTimeZone = results[1];
             }
         }
 
         // check how well OS tz matches tz defined in our version of zoneinfo db
         if (zoneInfoIdFromOSUserTimeZone != null) {
@@ -779,30 +778,29 @@ function guessSystemTimezone() {
             let warningDetail;
             if (probableTZScore == 1) {
                 // score 1 means has daylight time,
                 // but transitions start on different weekday from os timezone.
                 let standardStart = getIcalString(standard, "DTSTART");
                 let standardStartWeekday = weekday(standardStart, tz);
                 let standardRule = getIcalString(standard, "RRULE");
                 let standardText =
-                    ("  Standard: " + standardStart + " " + standardStartWeekday + "\n" +
-                     "            " + standardRule + "\n");
+                    "  Standard: " + standardStart + " " + standardStartWeekday + "\n" +
+                    "            " + standardRule + "\n";
                 let daylightStart = getIcalString(daylight, "DTSTART");
                 let daylightStartWeekday = weekday(daylightStart, tz);
                 let daylightRule = getIcalString(daylight, "RRULE");
                 let daylightText =
-                    ("  Daylight: " + daylightStart + " " + daylightStartWeekday + "\n" +
-                     "            " + daylightRule + "\n");
+                    "  Daylight: " + daylightStart + " " + daylightStartWeekday + "\n" +
+                    "            " + daylightRule + "\n";
                 warningDetail =
-                    ((standardStart < daylightStart
+                    (standardStart < daylightStart
                       ? standardText + daylightText
                       : daylightText + standardText) +
-                     (calProperties.GetStringFromName(
-                      "TZAlmostMatchesOSDifferAtMostAWeek")));
+                     calProperties.GetStringFromName("TZAlmostMatchesOSDifferAtMostAWeek");
             } else {
                 warningDetail = calProperties.GetStringFromName("TZSeemsToMatchOS");
             }
             let offsetString = standardTZOffset +
                                  (!daylightTZOffset ? "" : "/" + daylightTZOffset);
             let warningMsg = calProperties.formatStringFromName("WarningUsingGuessedTZ",
                               [tzId, offsetString, warningDetail, probableTZSource], 4);
             cal.WARN(warningMsg);
--- a/calendar/base/src/calTodo.js
+++ b/calendar/base/src/calTodo.js
@@ -185,17 +185,17 @@ calTodo.prototype = {
 
         this.importUnpromotedProperties(todo, this.todoPromotedProps);
         // Importing didn't really change anything
         this.mDirty = false;
     },
 
     isPropertyPromoted: function(name) {
         // avoid strict undefined property warning
-        return (this.todoPromotedProps[name] || false);
+        return this.todoPromotedProps[name] || false;
     },
 
     set entryDate(value) {
         this.modify();
 
         // We're about to change the start date of an item which probably
         // could break the associated calIRecurrenceInfo. We're calling
         // the appropriate method here to adjust the internal structure in
--- a/calendar/base/src/calTransactionManager.js
+++ b/calendar/base/src/calTransactionManager.js
@@ -61,27 +61,27 @@ calTransactionManager.prototype = {
         return trans && checkItem(trans.mItem) && checkItem(trans.mOldItem);
     },
 
     undo: function cTM_undo() {
         this.transactionManager.undoTransaction();
     },
 
     canUndo: function cTM_canUndo() {
-        return ((this.transactionManager.numberOfUndoItems > 0) &&
-                this.checkWritable(this.transactionManager.peekUndoStack()));
+        return this.transactionManager.numberOfUndoItems > 0 &&
+               this.checkWritable(this.transactionManager.peekUndoStack());
     },
 
     redo: function cTM_redo() {
         this.transactionManager.redoTransaction();
     },
 
     canRedo: function cTM_canRedo() {
-        return ((this.transactionManager.numberOfRedoItems > 0) &&
-                this.checkWritable(this.transactionManager.peekRedoStack()));
+        return this.transactionManager.numberOfRedoItems > 0 &&
+               this.checkWritable(this.transactionManager.peekRedoStack());
     }
 };
 
 function calTransaction(aAction, aItem, aCalendar, aOldItem, aListener) {
     this.wrappedJSObject = this;
     this.mAction = aAction;
     this.mItem = aItem;
     this.mCalendar = aCalendar;
--- a/calendar/base/src/calUtils.js
+++ b/calendar/base/src/calUtils.js
@@ -262,57 +262,57 @@ function getCalendarDirectory() {
  * Check if the specified calendar is writable. This is the case when it is not
  * marked readOnly, we are not offline, or we are offline and the calendar is
  * local.
  *
  * @param aCalendar     The calendar to check
  * @return              True if the calendar is writable
  */
 function isCalendarWritable(aCalendar) {
-    return (!aCalendar.getProperty("disabled") &&
+    return !aCalendar.getProperty("disabled") &&
             !aCalendar.readOnly &&
             (!Services.io.offline ||
              aCalendar.getProperty("cache.enabled") ||
              aCalendar.getProperty("cache.always") ||
-             aCalendar.getProperty("requiresNetwork") === false));
+             aCalendar.getProperty("requiresNetwork") === false);
 }
 
 /**
  * Check if the specified calendar is writable from an ACL point of view.
  *
  * @param aCalendar     The calendar to check
  * @return              True if the calendar is writable
  */
 function userCanAddItemsToCalendar(aCalendar) {
     let aclEntry = aCalendar.aclEntry;
-    return (!aclEntry || !aclEntry.hasAccessControl || aclEntry.userIsOwner || aclEntry.userCanAddItems);
+    return !aclEntry || !aclEntry.hasAccessControl || aclEntry.userIsOwner || aclEntry.userCanAddItems;
 }
 
 /**
  * Check if the user can delete items from the specified calendar, from an ACL point of view.
  *
  * @param aCalendar     The calendar to check
  * @return              True if the calendar is writable
  */
 function userCanDeleteItemsFromCalendar(aCalendar) {
     let aclEntry = aCalendar.aclEntry;
-    return (!aclEntry || !aclEntry.hasAccessControl || aclEntry.userIsOwner || aclEntry.userCanDeleteItems);
+    return !aclEntry || !aclEntry.hasAccessControl || aclEntry.userIsOwner || aclEntry.userCanDeleteItems;
 }
 
 /**
  * Check if the user can fully modify the specified item, from an ACL point of view.
  * Note to be confused with the right to respond to an invitation, which is
  * handled instead by userCanRespondToInvitation.
  *
  * @param aItem         The calendar item to check
  * @return              True if the item is modifiable
  */
 function userCanModifyItem(aItem) {
     let aclEntry = aItem.aclEntry;
-    return (!aclEntry || !aclEntry.calendarEntry.hasAccessControl || aclEntry.calendarEntry.userIsOwner || aclEntry.userCanModify);
+    return !aclEntry || !aclEntry.calendarEntry.hasAccessControl || aclEntry.calendarEntry.userIsOwner || aclEntry.userCanModify;
 }
 
 /**
  * Check if the attendee object matches one of the addresses in the list. This
  * is useful to determine whether the current user acts as a delegate.
  *
  * @param aAttendee     The reference attendee object
  * @param addresses     The list of addresses
@@ -696,17 +696,17 @@ function calGetString(aBundleName, aStri
         let props = Services.strings.createBundle(propName);
 
         if (aParams && aParams.length) {
             return props.formatStringFromName(aStringName, aParams, aParams.length);
         } else {
             return props.GetStringFromName(aStringName);
         }
     } catch (ex) {
-        let s = ("Failed to read '" + aStringName + "' from " + propName + ".");
+        let s = "Failed to read '" + aStringName + "' from " + propName + ".";
         Components.utils.reportError(s + " Error: " + ex);
         return s;
     }
 }
 
 /**
  * Make a UUID using the UUIDGenerator service available, we'll use that.
  */
@@ -1099,35 +1099,35 @@ function checkIfInRange(item, rangeStart
     let endDate;
     let queryStart = ensureDateTime(rangeStart);
     if (isEvent(item)) {
         startDate = item.startDate;
         if (!startDate) { // DTSTART mandatory
             // xxx todo: should we assert this case?
             return null;
         }
-        endDate = (item.endDate || startDate);
+        endDate = item.endDate || startDate;
     } else {
         let dueDate = item.dueDate;
-        startDate = (item.entryDate || dueDate);
+        startDate = item.entryDate || dueDate;
         if (!item.entryDate) {
             if (returnDtstartOrDue) { // DTSTART or DUE mandatory
                 return null;
             }
             // 3.6.2. To-do Component
             // A "VTODO" calendar component without the "DTSTART" and "DUE" (or
             // "DURATION") properties specifies a to-do that will be associated
             // with each successive calendar date, until it is completed.
             let completedDate = ensureDateTime(item.completedDate);
             dueDate = ensureDateTime(dueDate);
             return !completedDate || !queryStart ||
                    completedDate.compare(queryStart) > 0 ||
                    (dueDate && dueDate.compare(queryStart) >= 0);
         }
-        endDate = (dueDate || startDate);
+        endDate = dueDate || startDate;
     }
 
     let start = ensureDateTime(startDate);
     let end = ensureDateTime(endDate);
     let queryEnd = ensureDateTime(rangeEnd);
 
     if (start.compare(end) == 0) {
         if ((!queryStart || start.compare(queryStart) >= 0) &&
@@ -1278,20 +1278,20 @@ function sendMailTo(aRecipient, aSubject
  * calendar operations (without handle).
  */
 function calOperationGroup(cancelFunc) {
     this.wrappedJSObject = this;
     if (calOperationGroup.mOpGroupId === undefined) {
         calOperationGroup.mOpGroupId = 0;
     }
     if (calOperationGroup.mOpGroupPrefix === undefined) {
-        calOperationGroup.mOpGroupPrefix = (getUUID() + "-");
+        calOperationGroup.mOpGroupPrefix = getUUID() + "-";
     }
     this.mCancelFunc = cancelFunc;
-    this.mId = (calOperationGroup.mOpGroupPrefix + calOperationGroup.mOpGroupId++);
+    this.mId = calOperationGroup.mOpGroupPrefix + calOperationGroup.mOpGroupId++;
     this.mSubOperations = [];
 }
 calOperationGroup.prototype = {
     mCancelFunc: null,
     mId: null,
     mIsPending: true,
     mStatus: Components.results.NS_OK,
     mSubOperations: null,
@@ -1318,17 +1318,17 @@ calOperationGroup.prototype = {
             this.mIsPending = false;
             if (status) {
                 this.mStatus = status;
             }
         }
     },
 
     toString: function calOperationGroup_toString() {
-        return ("[calOperationGroup] id=" + this.id);
+        return "[calOperationGroup] id=" + this.id;
     },
 
     // calIOperation:
     get id() {
         return this.mId;
     },
 
     get isPending() {
--- a/calendar/base/src/calWeekInfoService.js
+++ b/calendar/base/src/calWeekInfoService.js
@@ -90,21 +90,20 @@ calWeekInfoService.prototype = {
      * of the preference setting "calendar.week.start"
      *
      * @param aDate     a date time object
      * @return          a dateTime-object denoting the first day of the week
      */
     getStartOfWeek: function(aDate) {
         let date = aDate.clone();
         date.isDate = true;
-        let offset = (Preferences.get("calendar.week.start", 0) - aDate.weekday);
+        let offset = Preferences.get("calendar.week.start", 0) - aDate.weekday;
+        date.day += offset;
         if (offset > 0) {
-            date.day -= (7 - offset);
-        } else {
-            date.day += offset;
+            date.day -= 7;
         }
         return date;
     },
 
     /**
      * gets the last day of a week of a passed day under consideration
      * of the preference setting "calendar.week.start"
      *
--- a/calendar/import-export/calHtmlExport.js
+++ b/calendar/import-export/calHtmlExport.js
@@ -79,17 +79,17 @@ calHtmlExporter.prototype = {
             let endDate = item[cal.calGetEndDateProp(item)];
             if (startDate || endDate) {
                 // This is a task with a start or due date, format accordingly
                 let prefixWhen = cal.calGetString("calendar", "htmlPrefixWhen");
                 itemNode.querySelector(".intervalkey").textContent = prefixWhen;
 
                 let startNode = itemNode.querySelector(".dtstart");
                 let dateString = cal.getDateFormatter().formatItemInterval(item);
-                startNode.setAttribute("title", (startDate ? startDate.icalString : "none"));
+                startNode.setAttribute("title", startDate ? startDate.icalString : "none");
                 startNode.textContent = dateString;
             } else {
                 let row = itemNode.querySelector(".intervalrow");
                 row.remove();
                 if (row.nextSibling instanceof Components.interfaces.nsIDOMText) {
                     row.nextSibling.remove();
                 }
             }
--- a/calendar/import-export/calMonthGridPrinter.js
+++ b/calendar/import-export/calMonthGridPrinter.js
@@ -174,17 +174,17 @@ calMonthPrinter.prototype = {
         let weekContainer = currentMonth.querySelector(".week-container");
 
         for (let weekStart = startOfMonthView; weekStart.compare(endOfMonthView) < 0; weekStart.day += 7) {
             this.setupWeek(document, weekContainer, weekStart, mainMonth, dayTable);
         }
 
         // Now insert the month into the page container, sorting by date (and therefore by month)
         function compareDates(a, b) {
-            return (!a || !b) ? -1 : a.compare(b);
+            return !a || !b ? -1 : a.compare(b);
         }
 
         cal.binaryInsertNode(monthContainer, currentMonth, currentMonth.item, compareDates);
     },
 
     setupWeek: function monthPrint_setupWeek(document, weekContainer, startOfWeek, mainMonth, dayTable) {
         const weekdayMap = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
         let weekTemplate = document.getElementById("week-template");
--- a/calendar/import-export/calOutlookCSVImportExport.js
+++ b/calendar/import-export/calOutlookCSVImportExport.js
@@ -476,17 +476,17 @@ calOutlookCSVExporter.prototype = {
                 alarmDate = cal.alarms.calculateAlarmDate(item, alarms[0]);
             }
             line.push(alarmDate ? localeEn.valueTrue : localeEn.valueFalse);
             line.push(alarmDate ? dateString(alarmDate) : "");
             line.push(alarmDate ? timeString(alarmDate) : "");
             line.push(txtString(cal.categoriesArrayToString(item.getCategories({})))); // xxx todo: what's the correct way to encode ',' in csv?, how are multi-values expressed?
             line.push(txtString(item.getProperty("DESCRIPTION")));
             line.push(txtString(item.getProperty("LOCATION")));
-            line.push((item.privacy == "PRIVATE") ? localeEn.valueTrue : localeEn.valueFalse);
+            line.push(item.privacy == "PRIVATE" ? localeEn.valueTrue : localeEn.valueFalse);
 
             line = line.map(function(v) {
                 v = String(v).replace(/"/g, '""');
                 return '"' + v + '"';
             });
             str = line.join(',') + exportLineEnding;
             aStream.write(str, str.length);
         }
--- a/calendar/import-export/calWeekPrinter.js
+++ b/calendar/import-export/calWeekPrinter.js
@@ -127,14 +127,14 @@ calWeekPrinter.prototype = {
             if (Preferences.get(dayOffPrefName, false)) {
                 let daysOffNode = currentPage.querySelector("." + weekdayName + "-box");
                 daysOffNode.className += " day-off";
             }
         }
 
         // Now insert the week into the week container, sorting by date (and therefore week number)
         function compareDates(a, b) {
-            return (!a || !b) ? -1 : a.compare(b);
+            return !a || !b ? -1 : a.compare(b);
         }
 
         cal.binaryInsertNode(weekContainer, currentPage, currentPage.item, compareDates);
     }
 };
--- a/calendar/itip/calItipEmailTransport.js
+++ b/calendar/itip/calItipEmailTransport.js
@@ -43,51 +43,48 @@ calItipEmailTransport.prototype = {
     set senderAddress(aValue) {
         return (this.mSenderAddress = aValue);
     },
 
     sendItems: function cietSI(aCount, aRecipients, aItipItem) {
         if (this.mHasXpcomMail) {
             cal.LOG("sendItems: Sending Email...");
             let items = this._prepareItems(aItipItem);
-            return (items === false)
-                ? false
-                : this._sendXpcomMail(
-                    aRecipients,
-                    items.subject,
-                    items.body,
-                    aItipItem
-                );
+            if (items === false) {
+                return false;
+            } else {
+                return this._sendXpcomMail(aRecipients, items.subject, items.body, aItipItem);
+            }
         } else {
             // Sunbird case: Call user's default mailer on system.
             throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
         }
     },
 
     _prepareItems: function(aItipItem) {
         let item = aItipItem.getItemList({})[0];
 
         // Get ourselves some default text - when we handle organizer properly
         // We'll need a way to configure the Common Name attribute and we should
         // use it here rather than the email address
 
-        let summary = (item.getProperty("SUMMARY") || "");
+        let summary = item.getProperty("SUMMARY") || "";
         let subject = "";
         let body = "";
         switch (aItipItem.responseMethod) {
             case "REQUEST":
                 let usePrefixes = Preferences.get(
                     "calendar.itip.useInvitationSubjectPrefixes",
                     true
                 );
                 if (!usePrefixes) {
                     subject = summary;
                 } else {
                     let seq = item.getProperty("SEQUENCE");
-                    let subjectKey = (seq && seq > 0)
+                    let subjectKey = seq && seq > 0
                         ? "itipRequestUpdatedSubject"
                         : "itipRequestSubject";
                     subject = cal.calGetString(
                         "lightning",
                         subjectKey,
                         [summary],
                         "lightning"
                     );
@@ -213,25 +210,25 @@ calItipEmailTransport.prototype = {
         }
         if (!identity) { // use some default identity/account:
             identity = this.mDefaultIdentity;
             account = this.mDefaultAccount;
         }
 
         let compatMode = 0;
         switch (aItem.autoResponse) {
-            case (Components.interfaces.calIItipItem.USER): {
+            case Components.interfaces.calIItipItem.USER: {
                 cal.LOG("sendXpcomMail: Found USER autoResponse type.\n" +
                         "This type is currently unsupported, the compose API will always enter a text/plain\n" +
                         "or text/html part as first part of the message.\n" +
                         "This will disable OL (up to 2003) to consume the mail as an iTIP invitation showing\n" +
                         "the usual calendar buttons.");
                 // To somehow have a last resort before sending spam, the user can choose to send the mail.
                 let prefCompatMode = Preferences.get("calendar.itip.compatSendMode", 0);
-                let inoutCheck = { value: (prefCompatMode == 1) };
+                let inoutCheck = { value: prefCompatMode == 1 };
                 let parent = Services.wm.getMostRecentWindow(null);
                 if (parent.closed) {
                     parent = cal.getCalendarWindow();
                 }
                 if (Services.prompt.confirmEx(parent,
                                               cal.calGetString("lightning", "imipSendMail.title", null, "lightning"),
                                               cal.calGetString("lightning", "imipSendMail.text", null, "lightning"),
                                               Services.prompt.STD_YES_NO_BUTTONS,
@@ -243,29 +240,29 @@ calItipEmailTransport.prototype = {
                     break;
                 } // else go on with auto sending for now
                 compatMode = (inoutCheck.value ? 1 : 0);
                 if (compatMode != prefCompatMode) {
                     Preferences.set("calendar.itip.compatSendMode", compatMode);
                 }
             }
             // falls through, based on prompting above
-            case (Components.interfaces.calIItipItem.AUTO): {
+            case Components.interfaces.calIItipItem.AUTO: {
                 // don't show log message in case of falling through
                 if (aItem.autoResponse == Components.interfaces.calIItipItem.AUTO) {
                     cal.LOG("sendXpcomMail: Found AUTO autoResponse type.");
                 }
                 let cbEmail = function(aVal, aInd, aArr) {
                     let email = cal.getAttendeeEmail(aVal, true);
                     if (!email.length) {
                         cal.LOG("Invalid recipient for email transport: " + aVal.toString());
                     }
                     return email;
                 };
-                let toMap = aToList.map(cbEmail).filter(function(aVal, aInd, aArr) {return (aVal.length);});
+                let toMap = aToList.map(cbEmail).filter(v => v.length);
                 if (toMap.length < aToList.length) {
                     // at least one invalid recipient, so we skip sending for this message
                     return false;
                 }
                 let toList = toMap.join(', ');
                 let composeUtils = Components.classes["@mozilla.org/messengercompose/computils;1"]
                                              .createInstance(Components.interfaces.nsIMsgCompUtils);
                 let messageId = composeUtils.msgGenerateMessageId(identity);
@@ -313,17 +310,17 @@ calItipEmailTransport.prototype = {
                                             null  /* nsIMsgDBHdr msgToReplace */,
                                             null  /* nsIMsgSendListener aListener */,
                                             null  /* nsIMsgStatusFeedback aStatusFeedback */,
                                             ""    /* password */);
                     return true;
                 }
                 break;
             }
-            case (Components.interfaces.calIItipItem.NONE):
+            case Components.interfaces.calIItipItem.NONE:
                 cal.LOG("sendXpcomMail: Found NONE autoResponse type.");
 
                 // No response
                 break;
             default:
                 // Unknown autoResponse type
                 throw new Error("sendXpcomMail: " +
                                 "Unknown autoResponse type: " +
@@ -345,52 +342,52 @@ calItipEmailTransport.prototype = {
             let utf8CalText = ltn.invitation.encodeUTF8(calText);
 
             // Home-grown mail composition; I'd love to use nsIMimeEmitter, but it's not clear to me whether
             // it can cope with nested attachments,
             // like multipart/alternative with enclosed text/calendar and text/plain.
             let mailText = ltn.invitation.getHeaderSection(aMessageId, aIdentity, aToList, aSubject);
             switch (compatMode) {
                 case 1:
-                    mailText += ("Content-class: urn:content-classes:calendarmessage\r\n" +
-                                 "Content-type: text/calendar; method=" + aItem.responseMethod + "; charset=UTF-8\r\n" +
-                                 "Content-transfer-encoding: 8BIT\r\n" +
-                                 "\r\n" +
-                                 utf8CalText +
-                                 "\r\n");
+                    mailText += "Content-class: urn:content-classes:calendarmessage\r\n" +
+                                "Content-type: text/calendar; method=" + aItem.responseMethod + "; charset=UTF-8\r\n" +
+                                "Content-transfer-encoding: 8BIT\r\n" +
+                                "\r\n" +
+                                utf8CalText +
+                                "\r\n";
                     break;
                 default:
-                    mailText += ("Content-type: multipart/mixed; boundary=\"Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)\"\r\n" +
-                                 "\r\n\r\n" +
-                                 "--Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)\r\n" +
-                                 "Content-type: multipart/alternative;\r\n" +
-                                 " boundary=\"Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)\"\r\n" +
-                                 "\r\n\r\n" +
-                                 "--Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)\r\n" +
-                                 "Content-type: text/plain; charset=UTF-8\r\n" +
-                                 "Content-transfer-encoding: 8BIT\r\n" +
-                                 "\r\n" +
-                                 ltn.invitation.encodeUTF8(aBody) +
-                                 "\r\n\r\n\r\n" +
-                                 "--Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)\r\n" +
-                                 "Content-type: text/calendar; method=" + aItem.responseMethod + "; charset=UTF-8\r\n" +
-                                 "Content-transfer-encoding: 8BIT\r\n" +
-                                 "\r\n" +
-                                 utf8CalText +
-                                 "\r\n\r\n" +
-                                 "--Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)--\r\n" +
-                                 "\r\n" +
-                                 "--Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)\r\n" +
-                                 "Content-type: application/ics; name=invite.ics\r\n" +
-                                 "Content-transfer-encoding: 8BIT\r\n" +
-                                 "Content-disposition: attachment; filename=invite.ics\r\n" +
-                                 "\r\n" +
-                                 utf8CalText +
-                                 "\r\n\r\n" +
-                                 "--Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)--\r\n");
+                    mailText += "Content-type: multipart/mixed; boundary=\"Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)\"\r\n" +
+                                "\r\n\r\n" +
+                                "--Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)\r\n" +
+                                "Content-type: multipart/alternative;\r\n" +
+                                " boundary=\"Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)\"\r\n" +
+                                "\r\n\r\n" +
+                                "--Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)\r\n" +
+                                "Content-type: text/plain; charset=UTF-8\r\n" +
+                                "Content-transfer-encoding: 8BIT\r\n" +
+                                "\r\n" +
+                                ltn.invitation.encodeUTF8(aBody) +
+                                "\r\n\r\n\r\n" +
+                                "--Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)\r\n" +
+                                "Content-type: text/calendar; method=" + aItem.responseMethod + "; charset=UTF-8\r\n" +
+                                "Content-transfer-encoding: 8BIT\r\n" +
+                                "\r\n" +
+                                utf8CalText +
+                                "\r\n\r\n" +
+                                "--Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)--\r\n" +
+                                "\r\n" +
+                                "--Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)\r\n" +
+                                "Content-type: application/ics; name=invite.ics\r\n" +
+                                "Content-transfer-encoding: 8BIT\r\n" +
+                                "Content-disposition: attachment; filename=invite.ics\r\n" +
+                                "\r\n" +
+                                utf8CalText +
+                                "\r\n\r\n" +
+                                "--Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)--\r\n";
                     break;
             }
             cal.LOG("mail text:\n" + mailText);
 
             let tempFile = Services.dirsvc.get("TmpD", Components.interfaces.nsIFile);
             tempFile.append("itipTemp");
             tempFile.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE,
                                   parseInt("0600", 8));
--- a/calendar/lightning/modules/ltnInvitationUtils.jsm
+++ b/calendar/lightning/modules/ltnInvitationUtils.jsm
@@ -225,17 +225,17 @@ ltn.invitation = {
             // display itip icon
             let role = aAttendee.role || "REQ-PARTICIPANT";
             let ps = aAttendee.participationStatus || "NEEDS-ACTION";
             let ut = aAttendee.userType || "INDIVIDUAL";
             let itipIcon = row.getElementsByClassName("itip-icon")[0];
             itipIcon.setAttribute("role", role);
             itipIcon.setAttribute("usertype", ut);
             itipIcon.setAttribute("partstat", ps);
-            let attName = (aAttendee.commonName && aAttendee.commonName.length)
+            let attName = aAttendee.commonName && aAttendee.commonName.length
                           ? aAttendee.commonName : aAttendee.toString();
             let utString = ltn.getString("lightning", "imipHtml.attendeeUserType2." + ut,
                                          [aAttendee.toString()]);
             let roleString = ltn.getString("lightning", "imipHtml.attendeeRole2." + role,
                                            [utString]);
             let psString = ltn.getString("lightning", "imipHtml.attendeePartStat2." + ps,
                                          [attName, del.delegatees]);
             let itipTooltip = ltn.getString("lightning", "imipHtml.attendee.combined",
@@ -276,17 +276,17 @@ ltn.invitation = {
          * @param {String}  aText   [optional]
          * @param {Boolean} aClear  [optional] for consecutive changes on the same node, set to false
          */
         function _content2Child(aToNode, aType, aText = '', aClear = true) {
             let nodeDoc = aToNode.ownerDocument;
             if (aClear && aToNode.hasChildNodes()) {
                 aToNode.removeChild(aToNode.firstChild);
             }
-            let n = nodeDoc.createElement((aType.toLowerCase() == 'newline') ? 'br' : 'span');
+            let n = nodeDoc.createElement(aType.toLowerCase() == 'newline' ? 'br' : 'span');
             switch (aType) {
                 case 'added':
                 case 'modified':
                 case 'removed':
                     n.className = aType;
                     if (Preferences.get('calendar.view.useSystemColors', false)) {
                         n.setAttribute('systemcolors', true);
                     }
@@ -311,17 +311,17 @@ ltn.invitation = {
             }
             return attendees;
         }
         /**
          * Compares both documents for elements related to the given name
          * @param {String} aElement  part of the element id within the html template
          */
         function _compareElement(aElement) {
-            let element = (aElement == 'attendee') ? aElement + 's' : aElement;
+            let element = aElement == 'attendee' ? aElement + 's' : aElement;
             let oldRow = aOldDoc.getElementById('imipHtml-' + element + '-row');
             let newRow = aNewDoc.getElementById('imipHtml-' + element + '-row');
             let row = doc.getElementById('imipHtml-' + element + '-row');
             let oldContent = aOldDoc.getElementById('imipHtml-' + aElement + '-content');
             let content = doc.getElementById('imipHtml-' + aElement + '-content');
 
             if (newRow.hidden && !oldRow.hidden) {
                 // element was removed
@@ -358,18 +358,18 @@ ltn.invitation = {
                         for (let att of Object.keys(attendees)) {
                             if (!(att in oldAttendees)) {
                                 _content2Child(attendees[att], 'added', att);
                             }
                         }
                         for (let att of Object.keys(oldAttendees)) {
                             // if att is the user his/herself, who accepted an invitation he/she was
                             // not invited to, we exclude him/her from decoration
-                            let notExcluded = (excludeAddress == "" ||
-                                               !att.includes(excludeAddress));
+                            let notExcluded = excludeAddress == "" ||
+                                               !att.includes(excludeAddress);
                             // decorate removed attendees
                             if (!(att in attendees) && notExcluded) {
                                 _content2Child(oldAttendees[att], 'removed', att);
                                 content.appendChild(oldAttendees[att].parentNode.cloneNode(true));
                             } else if ((att in attendees) && notExcluded) {
                                 // highlight partstat, role or usertype changes
                                 let oldAtts = oldAttendees[att].parentNode
                                                                .getElementsByClassName("itip-icon")[0]
@@ -404,40 +404,40 @@ ltn.invitation = {
      * @param   {String}         aMessageId  the message id to use for that email
      * @param   {nsIMsgIdentity} aIdentity   the identity to use for that email
      * @returns {String}                     the source code of the header section of the email
      */
     getHeaderSection: function(aMessageId, aIdentity, aToList, aSubject) {
         let from = !aIdentity.fullName.length ? aIdentity.email
                                               : cal.validateRecipientList(aIdentity.fullName +
                                                                           " <" + aIdentity.email + ">");
-        let header = ("MIME-version: 1.0\r\n" +
-                      (aIdentity.replyTo ? "Return-path: " +
-                                           ltn.invitation.encodeMimeHeader(aIdentity.replyTo, true) +
-                                           "\r\n" : "") +
-                      "From: " + ltn.invitation.encodeMimeHeader(from, true) + "\r\n" +
-                      (aIdentity.organization ? "Organization: " +
-                                                ltn.invitation.encodeMimeHeader(aIdentity.organization) +
-                                                "\r\n" : "") +
-                      "Message-ID: " + aMessageId + "\r\n" +
-                      "To: " + ltn.invitation.encodeMimeHeader(aToList, true) + "\r\n" +
-                      "Date: " + ltn.invitation.getRfc5322FormattedDate() + "\r\n" +
-                      "Subject: " + ltn.invitation
-                                       .encodeMimeHeader(aSubject.replace(/(\n|\r\n)/, "|")) + "\r\n");
+        let header = "MIME-version: 1.0\r\n" +
+                     (aIdentity.replyTo ? "Return-path: " +
+                                          ltn.invitation.encodeMimeHeader(aIdentity.replyTo, true) +
+                                          "\r\n" : "") +
+                     "From: " + ltn.invitation.encodeMimeHeader(from, true) + "\r\n" +
+                     (aIdentity.organization ? "Organization: " +
+                                               ltn.invitation.encodeMimeHeader(aIdentity.organization) +
+                                               "\r\n" : "") +
+                     "Message-ID: " + aMessageId + "\r\n" +
+                     "To: " + ltn.invitation.encodeMimeHeader(aToList, true) + "\r\n" +
+                     "Date: " + ltn.invitation.getRfc5322FormattedDate() + "\r\n" +
+                     "Subject: " + ltn.invitation
+                                      .encodeMimeHeader(aSubject.replace(/(\n|\r\n)/, "|")) + "\r\n";
         let validRecipients;
         if (aIdentity.doCc) {
             validRecipients = cal.validateRecipientList(aIdentity.doCcList);
             if (validRecipients != "") {
-                header += ("Cc: " + ltn.invitation.encodeMimeHeader(validRecipients, true) + "\r\n");
+                header += "Cc: " + ltn.invitation.encodeMimeHeader(validRecipients, true) + "\r\n";
             }
         }
         if (aIdentity.doBcc) {
             validRecipients = cal.validateRecipientList(aIdentity.doBccList);
             if (validRecipients != "") {
-                header += ("Bcc: " + ltn.invitation.encodeMimeHeader(validRecipients, true) + "\r\n");
+                header += "Bcc: " + ltn.invitation.encodeMimeHeader(validRecipients, true) + "\r\n";
             }
         }
         return header;
     },
 
     /**
      * Returns a datetime string according to section 3.3 of RfC5322
      * @param  {Date}   [optional] Js Date object to format; if not provided current DateTime is used
@@ -483,17 +483,17 @@ ltn.invitation = {
     /**
      * Converts a header to a mime encoded header
      * @param  {String}  aHeader   a header to encode
      * @param  {boolean} aIsEmail  if enabled, only the CN but not the email address gets
      *                             converted - default value is false
      * @return {String}            the encoded string
      */
     encodeMimeHeader: function(aHeader, aIsEmail = false) {
-        let fieldNameLen = (aHeader.indexOf(": ") + 2);
+        let fieldNameLen = aHeader.indexOf(": ") + 2;
         return MailServices.mimeConverter
                            .encodeMimePartIIStr_UTF8(aHeader,
                                                      aIsEmail,
                                                      "UTF-8",
                                                      fieldNameLen,
                                                      Components.interfaces
                                                                .nsIMimeConverter
                                                                .MIME_ENCODED_WORD_SIZE);
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.js
@@ -236,17 +236,17 @@ calDavCalendar.prototype = {
             this.setupAuthentication(aChangeLogListener);
         } else {
             this.safeRefresh(aChangeLogListener);
         }
     },
     setMetaData: function caldav_setMetaData(id, path, etag, isInboxItem) {
         if (this.mOfflineStorage.setMetaData) {
             if (id) {
-                let dataString = [etag, path, (isInboxItem ? "true" : "false")].join("\u001A");
+                let dataString = [etag, path, isInboxItem ? "true" : "false"].join("\u001A");
                 this.mOfflineStorage.setMetaData(id, dataString);
             } else {
                 cal.LOG("CalDAV: cannot store meta data without an id");
             }
         } else {
             cal.ERROR("CalDAV: calendar storage does not support meta data");
         }
     },
@@ -318,17 +318,17 @@ calDavCalendar.prototype = {
                 let isInboxItem = itemDataArray[2];
                 if (itemDataArray.length == 3) {
                     this.mHrefIndex[resourcePath] = itemId;
                     let locationPath = resourcePath
                         .substr(this.mLocationPath.length);
                     let item = { etag: etag,
                                  isNew: false,
                                  locationPath: locationPath,
-                                 isInboxItem: (isInboxItem == "true") };
+                                 isInboxItem: isInboxItem == "true" };
                     this.mItemInfoCache[itemId] = item;
                 }
             }
         }
 
         this.ensureMetaData();
     },
 
@@ -372,17 +372,17 @@ calDavCalendar.prototype = {
             }
 
             self.mLastRedirectStatus = null;
             channel.asyncOpen(listener, channel);
         }
 
         const OAUTH_GRACE_TIME = 30 * 1000;
 
-        let usesGoogleOAuth = (aUri && aUri.host == "apidata.googleusercontent.com" && this.oauth);
+        let usesGoogleOAuth = aUri && aUri.host == "apidata.googleusercontent.com" && this.oauth;
         let origArgs = arguments;
         let self = this;
 
         if (usesGoogleOAuth && (
               !this.oauth.accessToken ||
               this.oauth.tokenExpires - OAUTH_GRACE_TIME < (new Date()).getTime())) {
             // The token has expired, we need to reauthenticate first
             cal.LOG("CalDAV: OAuth token expired or empty, refreshing");
@@ -559,19 +559,19 @@ calDavCalendar.prototype = {
             case "organizerCN":
                 return null; // xxx todo
             case "itip.transport":
                 if (this.hasAutoScheduling || this.hasScheduling) {
                     return this.QueryInterface(Components.interfaces.calIItipTransport);
                 } // else use outbound email-based iTIP (from cal.ProviderBase)
                 break;
             case "capabilities.tasks.supported":
-                return (this.supportedItemTypes.includes("VTODO"));
+                return this.supportedItemTypes.includes("VTODO");
             case "capabilities.events.supported":
-                return (this.supportedItemTypes.includes("VEVENT"));
+                return this.supportedItemTypes.includes("VEVENT");
             case "capabilities.autoschedule.supported":
                 return this.hasAutoScheduling;
         }
         return this.__proto__.__proto__.getProperty.apply(this, arguments);
     },
 
     promptOverwrite: function caldav_promptOverwrite(aMethod, aItem, aListener, aOldItem) {
         let overwrite = cal.promptOverwrite(aMethod, aItem, aListener, aOldItem);
@@ -2613,19 +2613,19 @@ calDavCalendar.prototype = {
                 cal.WARN("CalDAV: Exception decoding path " + aString + ", segment: " + uriComponents[i]);
             }
         }
         return uriComponents.join("/");
     },
     isInbox: function caldav_isInbox(aString) {
         // Note: If you change this, make sure it really returns a boolean
         // value and not null!
-        return ((this.hasScheduling || this.hasAutoScheduling) &&
-                (this.mInboxUrl != null) &&
-                aString.startsWith(this.mInboxUrl.spec));
+        return (this.hasScheduling || this.hasAutoScheduling) &&
+               this.mInboxUrl != null &&
+               aString.startsWith(this.mInboxUrl.spec);
     },
 
     /**
      * Query contents of scheduling inbox
      *
      */
     pollInbox: function caldav_pollInbox() {
         // If polling the inbox was switched off, no need to poll the inbox.
--- a/calendar/providers/caldav/calDavRequestHandlers.js
+++ b/calendar/providers/caldav/calDavRequestHandlers.js
@@ -566,17 +566,17 @@ webDavSyncHandler.prototype = {
                            r.href && r.href.length &&
                            (!r.status ||                 // Draft 3 does not require
                             r.status.length == 0 ||      // a status for created or updated items but
                             r.status.indexOf(" 204") ||  // draft 0, 1 and 2 needed it so treat no status
                             r.status.indexOf(" 200") ||  // Apple iCloud returns 200 status for each item
                             r.status.indexOf(" 201"))) { // and status 201 and 204 the same
                     this.itemsReported[r.href] = r.getetag;
                     let itemId = this.calendar.mHrefIndex[r.href];
-                    let oldEtag = (itemId && this.calendar.mItemInfoCache[itemId].etag);
+                    let oldEtag = itemId && this.calendar.mItemInfoCache[itemId].etag;
 
                     if (!oldEtag || oldEtag != r.getetag) {
                         // Etag mismatch, getting new/updated item.
                         this.itemsNeedFetching.push(r.href);
                     }
                 } else if (r.status &&
                            r.status.includes(" 507")) {
                     // webdav-sync says that if a 507 is encountered and the
--- a/calendar/providers/ics/calICSCalendar.js
+++ b/calendar/providers/ics/calICSCalendar.js
@@ -128,17 +128,17 @@ calICSCalendar.prototype = {
         } else {
             this.mHooks = new dummyHooks(this);
         }
     },
 
     getProperty: function calICSCalendar_getProperty(aName) {
         switch (aName) {
             case "requiresNetwork":
-                return (!this.uri.schemeIs("file"));
+                return !this.uri.schemeIs("file");
         }
         return this.__proto__.__proto__.getProperty.apply(this, arguments);
     },
 
     refresh: function calICSCalendar_refresh() {
         this.queue.push({ action: 'refresh', forceRefresh: false });
         this.processQueue();
     },
@@ -656,20 +656,17 @@ calICSCalendar.prototype = {
         }
 
         function purgeBackupsByType(files, type) {
             // filter out backups of the type we care about.
             let filteredFiles = files.filter(
                 v => v.name.includes("calBackupData_" + pseudoID + "_" + type)
             );
             // Sort by lastmodifed
-            filteredFiles.sort(
-                function s(a, b) {
-                    return (a.lastmodified - b.lastmodified);
-                });
+            filteredFiles.sort((a, b) => a.lastmodified - b.lastmodified);
             // And delete the oldest files, and keep the desired number of
             // old backups
             for (let i = 0; i < filteredFiles.length - numBackupFiles; ++i) {
                 let file = backupDir.clone();
                 file.append(filteredFiles[i].name);
 
                 try {
                     file.remove(false);
--- a/calendar/providers/memory/calMemoryCalendar.js
+++ b/calendar/providers/memory/calMemoryCalendar.js
@@ -375,17 +375,17 @@ calMemoryCalendar.prototype = {
         let superCal;
         try {
             superCal = this.superCalendar.QueryInterface(Components.interfaces.calISchedulingSupport);
         } catch (exc) {
             wantUnrespondedInvitations = false;
         }
         function checkUnrespondedInvitation(item) {
             let att = superCal.getInvitedAttendee(item);
-            return (att && (att.participationStatus == "NEEDS-ACTION"));
+            return att && att.participationStatus == "NEEDS-ACTION";
         }
 
         // item base type
         let wantEvents = ((aItemFilter & calICalendar.ITEM_FILTER_TYPE_EVENT) != 0);
         let wantTodos = ((aItemFilter & calICalendar.ITEM_FILTER_TYPE_TODO) != 0);
         if (!wantEvents && !wantTodos) {
             // bail.
             this.notifyOperationComplete(aListener,
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.js
@@ -2048,17 +2048,17 @@ calStorageCalendar.prototype = {
             let dtstamp = item.stampTime;
             if (dtstamp) {
                 ip.todo_stamp = dtstamp.nativeTime;
             }
             this.setDateParamHelper(ip, "todo_completed", item.getProperty("COMPLETED"));
 
             ip.todo_complete = item.getProperty("PERCENT-COMPLETED");
 
-            let someDate = (item.entryDate || item.dueDate);
+            let someDate = item.entryDate || item.dueDate;
             if (someDate && someDate.isDate) {
                 flags |= CAL_ITEM_FLAG.EVENT_ALLDAY;
             }
 
             ip.flags = flags;
 
             this.mInsertTodo.executeStep();
         } finally {
--- a/calendar/providers/storage/calStorageUpgrade.jsm
+++ b/calendar/providers/storage/calStorageUpgrade.jsm
@@ -89,17 +89,17 @@ var EXPORTED_SYMBOLS = ["DB_SCHEMA_VERSI
  * @param alternateName (optional) The table or index name to be used in the
  *                        resulting CREATE statement. If not set, tblName will
  *                        be used.
  * @return              The SQL Statement for the given table or index and
  *                        version as a string.
  */
 function getSql(tblName, tblData, alternateName) {
     tblData = tblData || getSqlTable();
-    let altName = (alternateName || tblName);
+    let altName = alternateName || tblName;
     let sql;
     if (tblName.substr(0, 4) == "idx_") {
         // If this is an index, we need construct the SQL differently
         let idxTbl = tblData[tblName].shift();
         let idxOn = idxTbl + "(" + tblData[tblName].join(",") + ")";
         sql = "CREATE INDEX " + altName + " ON " + idxOn + ";";
     } else {
         sql = "CREATE TABLE " + altName + " (\n";
--- a/calendar/providers/wcap/calWcapCalendar.js
+++ b/calendar/providers/wcap/calWcapCalendar.js
@@ -35,17 +35,17 @@ calWcapCalendar.prototype = {
         contractID: "@mozilla.org/calendar/calendar;1?type=wcap",
         classDescription: "Sun Java System Calendar Server WCAP Provider",
         interfaces: calWcapCalendarInterfaces
     }),
 
     toString: function calWcapCalendar_toString() {
         let str = this.session.toString();
         if (this.m_calId) {
-            str += (", calId=" + this.calId);
+            str += ", calId=" + this.calId;
         } else {
             str += ", default calendar";
         }
         return str;
     },
 
     notifyError_: function calWcapCalendar_notifyError_(err, msg, context) {
         let rc = getResultCode(err);
@@ -57,17 +57,17 @@ calWcapCalendar.prototype = {
                 msg = errorToString(err);
                 log("error: " + msg, context);
                 break;
         }
         this.__proto__.__proto__.notifyError.apply(
             this,
             err instanceof Components.interfaces.nsIException
             ? [err.result, err.message]
-            : [(isNaN(err) ? Components.results.NS_ERROR_FAILURE : err), msg]);
+            : [isNaN(err) ? Components.results.NS_ERROR_FAILURE : err, msg]);
     },
     notifyError: function calWcapCalendar_notifyError(err, msg) {
         this.notifyError_(err, msg, this);
     },
 
     // calICalendarProvider:
     get prefChromeOverlay() {
         return null;
@@ -105,17 +105,17 @@ calWcapCalendar.prototype = {
     },
     set uri(thatUri) {
         this.m_uri = thatUri.clone();
         let path = thatUri.path;
         let qmPos = path.indexOf("?");
         if (qmPos != -1) {
             let pos = path.indexOf("?calid=", qmPos);
             if (pos != -1) {
-                let start = (pos + "?calid=".length);
+                let start = pos + "?calid=".length;
                 let end = path.indexOf("&", start);
                 this.m_calId = decodeURIComponent(
                     path.substring(start, end == -1 ? path.length : end));
             }
         }
         return this.uri;
     },
 
@@ -239,17 +239,17 @@ calWcapCalendar.prototype = {
         if (!this.m_session) {
             this.m_session = getWcapSessionFor(this);
         }
         return this.m_session;
     },
 
     m_calId: null,
     get calId() {
-        return (this.m_calId || this.session.defaultCalId);
+        return this.m_calId || this.session.defaultCalId;
     },
 
     get ownerId() {
         let ar = this.getCalendarProperties("X-NSCP-CALPROPS-PRIMARY-OWNER");
         if (ar.length == 0) {
             let calId = this.calId;
             log("cannot determine primary owner of calendar " + calId, this);
             // fallback to calId prefix:
--- a/calendar/providers/wcap/calWcapCalendarItems.js
+++ b/calendar/providers/wcap/calWcapCalendarItems.js
@@ -12,17 +12,17 @@ function calWcapCalendar_encodeAttendee(
         log("attendee.icalProperty.icalString=" + att.icalProperty.icalString, this);
     }
     function encodeAttr(val, attr, params) {
         if (val && val.length > 0) {
             if (params.length > 0) {
                 params += "^";
             }
             if (attr) {
-                params += (attr + "=");
+                params += attr + "=";
             }
             params += encodeURIComponent(val);
         }
         return params;
     }
     let params = encodeAttr(att.rsvp, "RSVP", "");
     params = encodeAttr(att.participationStatus, "PARTSTAT", params);
     params = encodeAttr(att.role, "ROLE", params);
@@ -42,17 +42,17 @@ function calWcapCalendar_getRecurrencePa
     out_exdates.value = [];
     if (item.recurrenceInfo) {
         let rItems = item.recurrenceInfo.getRecurrenceItems({});
         for (let rItem of rItems) {
             let isNeg = rItem.isNegative;
             let rRuleInstance = cal.wrapInstance(rItem, Components.interfaces.calIRecurrenceRule);
             let rDateInstance = cal.wrapInstance(rItem, Components.interfaces.calIRecurrenceDate);
             if (rRuleInstance) {
-                let rule = ("\"" + encodeURIComponent(rRuleInstance.icalProperty.valueAsIcalString) + "\"");
+                let rule = "\"" + encodeURIComponent(rRuleInstance.icalProperty.valueAsIcalString) + "\"";
                 if (isNeg) {
                     out_exrules.value.push(rule);
                 } else {
                     out_rrules.value.push(rule);
                 }
             } else if (rDateInstance) {
                 // cs does not accept DATEs here:
                 if (isNeg) {
@@ -64,21 +64,18 @@ function calWcapCalendar_getRecurrencePa
                 this.notifyError(NS_ERROR_UNEXPECTED,
                                  "don\'t know how to handle this recurrence item: " + rItem.valueAsIcalString);
             }
         }
     }
 };
 
 function sameStringSet(list, list_) {
-    return (list.length == list_.length &&
-            list.every(function everyFunc(x) {
-                    return list_.some(
-                        function someFunc(y) { return x == y; });
-                }));
+    return list.length == list_.length &&
+           list.every(x => list_.some(y => x == y));
 }
 
 calWcapCalendar.prototype.encodeRecurrenceParams =
     function calWcapCalendar_encodeRecurrenceParams(item, oldItem, excludeExdates) {
     let rrules = {};
     let rdates = {};
     let exrules = {};
     let exdates = {};
@@ -116,26 +113,26 @@ calWcapCalendar.prototype.encodeRecurren
         }
         if (excludeExdates || sameStringSet(exdates.value, exdates_.value)) {
             exdates.value = null; // don't write
         }
     }
 
     let ret = "";
     if (rrules.value) {
-        ret += ("&rrules=" + rrules.value.join(";"));
+        ret += "&rrules=" + rrules.value.join(";");
     }
     if (rdates.value) {
-        ret += ("&rdates=" + rdates.value.join(";"));
+        ret += "&rdates=" + rdates.value.join(";");
     }
     if (exrules.value) {
-        ret += ("&exrules=" + exrules.value.join(";"));
+        ret += "&exrules=" + exrules.value.join(";");
     }
     if (!excludeExdates && exdates.value) {
-        ret += ("&exdates=" + exdates.value.join(";"));
+        ret += "&exdates=" + exdates.value.join(";");
     }
     return ret;
     // xxx todo:
     // rchange=1: expand recurrences,
     // or whether to replace the rrule, ambiguous documentation!!!
     // check with store(with no uid) upon adoptItem() which behaves strange
     // if rchange=0 is set!
 };
@@ -161,18 +158,18 @@ function calWcapCalendar_getAlarmParams(
 
         let emails = "";
         if (item.hasProperty("alarmEmailAddress")) {
             emails = encodeURIComponent(item.getProperty("alarmEmailAddress"));
         } else {
             emails = this.session.getDefaultAlarmEmails({}).map(encodeURIComponent).join(";");
         }
         if (emails.length > 0) {
-            params = ("&alarmStart=" + alarmStart.icalString);
-            params += ("&alarmEmails=" + emails);
+            params = "&alarmStart=" + alarmStart.icalString;
+            params += "&alarmEmails=" + emails;
         }
         // else popup
     }
     if (!params) { // clear popup, email alarm:
         params = "&alarmStart=&alarmPopup=&alarmEmails=";
     }
     return params;
 };
@@ -222,37 +219,37 @@ function calWcapCalendar_canNotify(metho
     if (!this.session.isLoggedIn) {
         return false;
     }
     let calId = this.calId;
     switch (method) {
         case "REQUEST":
         case "CANCEL":
             // when creating new items, mind that organizer's id
-            return (!item.organizer || // might yet not be set
-                    (item.organizer.id == calId) || // or is set to raw calId
-                    (getCalId(item.organizer) == calId));
+            return !item.organizer || // might yet not be set
+                   item.organizer.id == calId || // or is set to raw calId
+                   getCalId(item.organizer) == calId;
         case "REPLY": // only if we we're invited from cs, and find matching X-S1CS-CALID:
             return (getAttendeeByCalId(item.getAttendees({}), calId) != null);
         default:
             return false;
     }
 };
 
 function equalDatetimes(one, two) {
-    return ((!one && !two) ||
-            (one && two &&
-             (one.isDate == two.isDate) &&
-             (one.compare(two) == 0)));
+    return !one && !two ||
+           (one && two &&
+            one.isDate == two.isDate &&
+            one.compare(two) == 0);
 }
 
 function identicalDatetimes(one, two) {
-    return ((!one && !two) ||
-            (equalDatetimes(one, two) &&
-             compareObjects(one.timezone, two.timezone)));
+    return !one && !two ||
+           (equalDatetimes(one, two) &&
+            compareObjects(one.timezone, two.timezone));
 }
 
 // @return null if nothing has changed else value to be written
 function diffProperty(newItem, oldItem, propName) {
     let val = newItem.getProperty(propName);
     let oldVal = (oldItem ? oldItem.getProperty(propName) : null);
     if (val === null) {
         // force being set when - no old item, eg when adding new item
@@ -342,62 +339,62 @@ function calWcapCalendar_storeItem(bAddI
         if (att) {
             log("attendee: " + att.icalProperty.icalString, this);
             let oldAtt = null;
             if (oldItem) {
                 oldAtt = getAttendeeByCalId(oldItem.getAttendees({}), calId);
             }
             if (!oldAtt || (att.participationStatus != oldAtt.participationStatus)) {
                 // REPLY first for just this calendar:
-                params += ("&attendees=PARTSTAT=" + att.participationStatus +
-                           "^" + encodeURIComponent(att.id));
+                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.
 
         let bIsAllDay = false;
         let dtstart, dtend;
         if (bIsEvent) {
             dtstart = item.startDate;
             dtend = item.endDate;
-            bIsAllDay = (dtstart.isDate && dtend.isDate);
+            bIsAllDay = dtstart.isDate && dtend.isDate;
             if (!oldItem || !identicalDatetimes(dtstart, oldItem.startDate) ||
                 !identicalDatetimes(dtend, oldItem.endDate)) {
-                params += ("&dtstart=" + getIcalUTC(dtstart)); // timezone will be set with tzid param
-                params += ("&dtend=" + getIcalUTC(dtend));
-                params += (bIsAllDay ? "&isAllDay=1" : "&isAllDay=0");
+                params += "&dtstart=" + getIcalUTC(dtstart); // timezone will be set with tzid param
+                params += "&dtend=" + getIcalUTC(dtend);
+                params += bIsAllDay ? "&isAllDay=1" : "&isAllDay=0";
 
                 if (bIsParent && item.recurrenceInfo) {
                     oldItem = null; // recurrence/exceptions hack: write whole master
                 }
             }
         } else { // calITodo
             // xxx todo: dtstart is mandatory for cs, so if this is
             //           undefined, assume an allDay todo???
             dtstart = item.entryDate;
             dtend = item.dueDate;
 
             // cs bug: enforce DUE (set to DTSTART) if alarm is set
             if (!dtend && item.getAlarms({}).length) {
                 dtend = dtstart;
             }
 
-            bIsAllDay = (dtstart && dtstart.isDate);
+            bIsAllDay = dtstart && dtstart.isDate;
             if (!oldItem || !identicalDatetimes(dtstart, oldItem.entryDate) ||
                 !identicalDatetimes(dtend, oldItem.dueDate)) {
-                params += ("&dtstart=" + getIcalUTC(dtstart)); // timezone will be set with tzid param
-                params += ("&due=" + getIcalUTC(dtend)); // timezone will be set with tzid param
-                params += (bIsAllDay ? "&isAllDay=1" : "&isAllDay=0");
+                params += "&dtstart=" + getIcalUTC(dtstart); // timezone will be set with tzid param
+                params += "&due=" + getIcalUTC(dtend); // timezone will be set with tzid param
+                params += bIsAllDay ? "&isAllDay=1" : "&isAllDay=0";
 
                 if (bIsParent && item.recurrenceInfo) {
                     oldItem = null; // recurrence/exceptions hack: write whole master
                 }
             }
         }
         if (bIsParent) {
             let recParams = this.encodeRecurrenceParams(item, oldItem, !bAddItem /* exclude EXDATEs */);
@@ -415,119 +412,119 @@ function calWcapCalendar_storeItem(bAddI
             } // else outbound
         }
 
         let attendees = item.getAttendees({});
         if (attendees.length > 0) {
             // xxx todo: why ever, X-S1CS-EMAIL is unsupported though documented for calprops... WTF.
             let attParam = encodeAttendees(attendees);
             if (!oldItem || attParam != encodeAttendees(oldItem.getAttendees({}))) {
-                params += ("&attendees=" + attParam);
+                params += "&attendees=" + attParam;
             }
 
             if (orgCalId == calId) {
                 method = METHOD_REQUEST;
             } else {
                 method = METHOD_UPDATE;
                 bNoSmtpNotify = true;
             }
         } else if (oldItem && oldItem.getAttendees({}).length > 0) {
             // else using just PUBLISH
             params += "&attendees="; // clear attendees
         }
 
         if (orgCalId) {
             if (!oldItem || (orgCalId != getCalId(oldItem.organizer))) {
-                params += ("&orgCalid=" + encodeURIComponent(orgCalId));
+                params += "&orgCalid=" + encodeURIComponent(orgCalId);
             }
         } else { // might be a copy of an iTIP invitation:
             let orgEmail = getOrgId(item);
             if (!oldItem || (getOrgId(oldItem) != orgEmail)) {
-                params += ("&orgEmail=" + encodeURIComponent(orgEmail));
+                params += "&orgEmail=" + encodeURIComponent(orgEmail);
             }
         }
 
         let val = item.title;
         if (!oldItem || val != oldItem.title) {
-            params += ("&summary=" + encodeURIComponent(val));
+            params += "&summary=" + encodeURIComponent(val);
         }
 
         let categories = item.getCategories({});
         let catParam = encodeCategories(categories);
         if (!oldItem || catParam != encodeCategories(oldItem.getCategories({}))) {
-            params += ("&categories=" + catParam);
+            params += "&categories=" + catParam;
         }
 
         val = diffProperty(item, oldItem, "DESCRIPTION");
         if (val !== null) {
-            params += ("&desc=" + encodeURIComponent(val));
+            params += "&desc=" + encodeURIComponent(val);
         }
         val = diffProperty(item, oldItem, "LOCATION");
         if (val !== null) {
-            params += ("&location=" + encodeURIComponent(val));
+            params += "&location=" + encodeURIComponent(val);
         }
         val = diffProperty(item, oldItem, "URL");
         if (val !== null) {
-            params += ("&icsUrl=" + encodeURIComponent(val));
+            params += "&icsUrl=" + encodeURIComponent(val);
         }
         // xxx todo: default prio is 0 (5 in sjs cs)
         val = item.priority;
         if (!oldItem || val != oldItem.priority) {
-            params += ("&priority=" + encodeURIComponent(val));
+            params += "&priority=" + encodeURIComponent(val);
         }
 
         let icsClass = getPrivacy(item);
         if (!oldItem || icsClass != getPrivacy(oldItem)) {
-            params += ("&icsClass=" + icsClass);
+            params += "&icsClass=" + icsClass;
         }
 
         if (!oldItem || item.status != oldItem.status) {
             switch (item.status) {
                 case "CONFIRMED": params += "&status=0"; break;
                 case "CANCELLED": params += "&status=1"; break;
                 case "TENTATIVE": params += "&status=2"; break;
                 case "NEEDS-ACTION": params += "&status=3"; break;
                 case "COMPLETED": params += "&status=4"; break;
                 case "IN-PROCESS": params += "&status=5"; break;
                 case "DRAFT": params += "&status=6"; break;
                 case "FINAL": params += "&status=7"; break;
                 default: // reset to default
-                    params += (bIsEvent ? "&status=0" : "&status=3");
+                    params += bIsEvent ? "&status=0" : "&status=3";
                     break;
             }
         }
 
         val = diffProperty(item, oldItem, "TRANSP");
         if (val !== null) {
             switch (val) {
                 case "TRANSPARENT":
                     params += "&transparent=1";
                     break;
                 case "OPAQUE":
                     params += "&transparent=0";
                     break;
                 default:
-                    params += ("&transparent=" + (((icsClass == "PRIVATE") || bIsAllDay) ? "1" : "0"));
+                    params += "&transparent=" + (icsClass == "PRIVATE" || bIsAllDay ? "1" : "0");
                     break;
             }
         }
 
         if (!bIsEvent) {
             if (!oldItem || item.percentComplete != oldItem.percentComplete) {
-                params += ("&percent=" + item.percentComplete.toString(10));
+                params += "&percent=" + item.percentComplete.toString(10);
             }
             if (!oldItem || !equalDatetimes(item.completedDate, oldItem.completedDate)) {
-                params += ("&completed=" + getIcalUTC(item.completedDate));
+                params += "&completed=" + getIcalUTC(item.completedDate);
             }
         }
 
         // attachment urls:
         val = getAttachments(item);
         if (!oldItem || val != getAttachments(oldItem)) {
-            params += ("&attachments=" + val);
+            params += "&attachments=" + val;
         }
     } // PUBLISH, REQUEST
 
     let alarmParams = this.getAlarmParams(item);
     if (!oldItem || (this.getAlarmParams(oldItem) != alarmParams)) {
         if ((method == METHOD_REQUEST) && params.length == 0) {
             // assure no email notifications about this change:
             bNoSmtpNotify = true;
@@ -538,40 +535,40 @@ function calWcapCalendar_storeItem(bAddI
     if (params.length == 0) {
         log("no change at all.", this);
         if (LOG_LEVEL > 2) {
             log("old item:\n" + oldItem.icalString + "\n\nnew item:\n" + item.icalString, this);
         }
         request.execRespFunc(null, item);
     } else {
         // cs does not support separate timezones for start and end, just pick one for tzid param:
-        let someDate = (item.startDate || item.entryDate || item.dueDate);
+        let someDate = item.startDate || item.entryDate || item.dueDate;
         if (someDate && !someDate.timezone.isUTC) {
-            params += ("&tzid=" + encodeURIComponent(this.getAlignedTzid(someDate.timezone)));
+            params += "&tzid=" + encodeURIComponent(this.getAlignedTzid(someDate.timezone));
         }
 
         if (item.id) {
-            params += ("&uid=" + encodeURIComponent(item.id));
+            params += "&uid=" + encodeURIComponent(item.id);
         }
 
         // be picky about create/modify, if possible:
         // WCAP_STORE_TYPE_CREATE, WCAP_STORE_TYPE_MODIFY
         if (bAddItem) {
             params += "&storetype=1";
         } else if (oldItem) {
             params += "&storetype=2";
         } // else we don't know exactly, so don't check
 
         if (bIsParent) {
             params += "&mod=4"; // THIS AND ALL INSTANCES
         } else {
-            params += ("&mod=1&rid=" + getIcalUTC(ensureDateTime(item.recurrenceId))); // THIS INSTANCE
+            params += "&mod=1&rid=" + getIcalUTC(ensureDateTime(item.recurrenceId)); // THIS INSTANCE
         }
 
-        params += ("&method=" + method);
+        params += "&method=" + method;
         if (bNoSmtpNotify) {
             params += "&smtp=0&smtpNotify=0&notify=0";
         }
         params += "&replace=1"; // (update) don't append to any lists
         params += "&fetch=1&relativealarm=1&compressed=1&recurring=1";
         params += "&emailorcalid=1&fmt-out=text%2Fcalendar";
 
         let netRespFunc = (err, icalRootComp) => {
@@ -700,17 +697,17 @@ function calWcapCalendar_modifyItem(newI
                 let params = "&uid=";
                 // all deletes on the same item:
                 for (let i = exdates.value.length; i--;) {
                     params += encodeURIComponent(newItem.id);
                     if (i > 0) {
                         params += ";";
                     }
                 }
-                params += ("&mod=1&rid=" + exdates.value.join(";"));
+                params += "&mod=1&rid=" + exdates.value.join(";");
 
                 let orgCalId = getCalId(newItem.organizer);
                 if (!orgCalId || (orgCalId != this.calId)) {
                     // item does not belong to this user, so don't notify:
                     params += "&smtp=0&smtpNotify=0&notify=0";
                 }
                 params += "&fmt-out=text%2Fxml";
 
@@ -760,22 +757,22 @@ function calWcapCalendar_deleteItem(item
             }
         },
         log("deleteItem() call: " + item.id, this));
 
     try {
         if (!item.id) {
             throw new Components.Exception("no item id!");
         }
-        let params = ("&uid=" + encodeURIComponent(item.id));
+        let params = "&uid=" + encodeURIComponent(item.id);
         if (isParent(item)) { // delete THIS AND ALL:
             params += "&mod=4&rid=0";
         } else { // delete THIS INSTANCE:
             // cs does not accept DATE here:
-            params += ("&mod=1&rid=" + getIcalUTC(ensureDateTime(item.recurrenceId)));
+            params += "&mod=1&rid=" + getIcalUTC(ensureDateTime(item.recurrenceId));
         }
 
         let orgCalId = getCalId(item.organizer);
         if (!orgCalId || (orgCalId != this.calId)) {
             // item does not belong to this user, so don't notify:
             params += "&smtp=0&smtpNotify=0&notify=0";
         }
 
@@ -1010,17 +1007,17 @@ calWcapCalendar.prototype.parseItems = f
                 }
             }
             // only proxies returned:
             items = items.concat(occurrences);
         }
     } else {
         if (maxResults != 0 &&
             (items.length + unexpandedItems.length) > maxResults) {
-            unexpandedItems.length = (maxResults - items.length);
+            unexpandedItems.length = maxResults - items.length;
         }
         if (!bLeaveMutable) {
             for (let item of unexpandedItems) {
                 item.makeImmutable();
             }
         }
         if (LOG_LEVEL > 2) {
             for (let item of unexpandedItems) {
@@ -1132,17 +1129,17 @@ function getItemFilterParams(itemFilter)
 //     if (itemFilter & calIWcapCalendar.ITEM_FILTER_REQUEST_NEEDSNOACTION) {
 //         compstate += ";REQUEST-NEEDSNOACTION";
 //     }
 //     if (itemFilter & calIWcapCalendar.ITEM_FILTER_REQUEST_PENDING)
 //         compstate += ";REQUEST-PENDING";
 //     if (itemFilter & calIWcapCalendar.ITEM_FILTER_REQUEST_WAITFORREPLY)
 //         compstate += ";REQUEST-WAITFORREPLY";
     if (compstate.length > 0) {
-        params += ("&compstate=" + compstate.substr(1));
+        params += "&compstate=" + compstate.substr(1);
     }
     return params;
 }
 
 calWcapCalendar.prototype.getItems =
 function calWcapCalendar_getItems(itemFilter, maxResults, rangeStart, rangeEnd, listener) {
     rangeStart = ensureDateTime(rangeStart);
     rangeEnd = ensureDateTime(rangeEnd);
@@ -1191,24 +1188,24 @@ function calWcapCalendar_getItems(itemFi
                 }
                 request.execRespFunc(null, entry.results);
                 return request;
             }
         }
     }
 
     try {
-        let params = ("&relativealarm=1&compressed=1&recurring=1&emailorcalid=1&fmt-out=text%2Fcalendar");
+        let params = "&relativealarm=1&compressed=1&recurring=1&emailorcalid=1&fmt-out=text%2Fcalendar";
         // setting component-type, compstate filters:
         params += getItemFilterParams(itemFilter);
         if (maxResults > 0) {
-            params += ("&maxResults=" + maxResults);
+            params += "&maxResults=" + maxResults;
         }
-        params += ("&dtstart=" + zRangeStart);
-        params += ("&dtend=" + zRangeEnd);
+        params += "&dtstart=" + zRangeStart;
+        params += "&dtend=" + zRangeEnd;
 
         this.issueNetworkRequest(
             request,
             function netResp(err, icalRootComp) {
                 if (err) {
                     if (checkErrorCode(err, calIWcapErrors.WCAP_ACCESS_DENIED_TO_CALENDAR)) {
                         // try free-busy times:
                         if (listener &&
@@ -1217,17 +1214,17 @@ function calWcapCalendar_getItems(itemFi
                             let freeBusyListener = { // calIGenericOperationListener:
                                 onResult: function freeBusyListener_onResult(oprequest, result) {
                                     if (!Components.isSuccessCode(oprequest.status)) {
                                         throw oprequest.status;
                                     }
                                     let items = [];
                                     for (let entry of result) {
                                         let item = createEvent();
-                                        item.id = (g_busyPhantomItemUuidPrefix + getIcalUTC(entry.interval.start));
+                                        item.id = g_busyPhantomItemUuidPrefix + getIcalUTC(entry.interval.start);
                                         item.calendar = this_.superCalendar;
                                         item.title = g_busyItemTitle;
                                         item.startDate = entry.interval.start;
                                         item.endDate = entry.interval.end;
                                         item.makeImmutable();
                                         items.push(item);
                                     }
                                     listener.onGetResult(this_.superCalendar, NS_OK, calIItemBase,
@@ -1347,17 +1344,17 @@ function calWcapCalendar_replayChangesOn
                 }
             }
         };
         let request = new calWcapRequest(
             function netFinishedRespFunc(err, data) {
                 let modifiedIds = {};
                 for (let item of request.m_modifiedItems) {
                     let dtCreated = item.getProperty("CREATED");
-                    let bAdd = (!dtCreated || !dtFrom || dtCreated.compare(dtFrom) >= 0);
+                    let bAdd = !dtCreated || !dtFrom || dtCreated.compare(dtFrom) >= 0;
                     modifiedIds[item.id] = true;
                     if (bAdd) {
                         log("replayChangesOn(): new item " + item.id, this_);
                         if (this_.offlineStorage) {
                             this_.offlineStorage.addItem(item, writeListener);
                         }
                     } else {
                         log("replayChangesOn(): modified item " + item.id, this_);
@@ -1391,23 +1388,23 @@ function calWcapCalendar_replayChangesOn
         // assure being logged in to calc server times:
         this.session.getSessionId(
             request,
             function getSessionId_resp(err, sessionId) {
                 try {
                     if (err) {
                         throw err;
                     }
-                    let params = ("&relativealarm=1&compressed=1&recurring=1" +
-                                  "&emailorcalid=1&fmt-out=text%2Fcalendar");
+                    let params = "&relativealarm=1&compressed=1&recurring=1" +
+                                 "&emailorcalid=1&fmt-out=text%2Fcalendar";
                     if (dtFrom) {
                         dtFrom = this_.session.getServerTime(dtFrom);
                     }
-                    params += ("&dtstart=" + getIcalUTC(dtFrom));
-                    params += ("&dtend=" + getIcalUTC(this_.session.getServerTime(now)));
+                    params += "&dtstart=" + getIcalUTC(dtFrom);
+                    params += "&dtend=" + getIcalUTC(this_.session.getServerTime(now));
 
                     log("replayChangesOn(): getting last modifications...", this_);
                     this_.issueNetworkRequest(
                         request,
                         function modifiedNetResp(fetcherr, icalRootComp) {
                             if (fetcherr) {
                                 throw fetcherr;
                             }
--- a/calendar/providers/wcap/calWcapCalendarModule.js
+++ b/calendar/providers/wcap/calWcapCalendarModule.js
@@ -52,17 +52,17 @@ var LOG_LEVEL = 0;
 function initWcapProvider() {
     try {
         initLogging();
 
         // some string resources:
         g_privateItemTitle = cal.calGetString("wcap", "privateItem.title.text");
         g_confidentialItemTitle = cal.calGetString("wcap", "confidentialItem.title.text");
         g_busyItemTitle = cal.calGetString("wcap", "busyItem.title.text");
-        g_busyPhantomItemUuidPrefix = ("PHANTOM_uuid_" + cal.getUUID());
+        g_busyPhantomItemUuidPrefix = "PHANTOM_uuid_" + cal.getUUID();
 
         CACHE_LAST_RESULTS = Preferences.get("calendar.wcap.cache_last_results", 4);
         CACHE_LAST_RESULTS_INVALIDATE = Preferences.get("calendar.wcap.cache_last_results_invalidate", 120);
     } catch (exc) {
         logError(exc, "error in init sequence");
     }
 }
 
--- a/calendar/providers/wcap/calWcapErrors.js
+++ b/calendar/providers/wcap/calWcapErrors.js
@@ -23,17 +23,17 @@ function generateNetFailure(code) {
     return generateFailure(NS_ERROR_MODULE_NETWORK, code);
 }
 
 function getResultCode(err) {
     if (err === undefined || err === null) {
         return NS_OK;
     }
     if (isNaN(err)) {
-        return ((err instanceof nsIException) ? err.result : Components.results.NS_ERROR_FAILURE);
+        return (err instanceof nsIException ? err.result : Components.results.NS_ERROR_FAILURE);
     }
     return err;
 }
 
 function getErrorModule(err) {
     let rc = getResultCode(err);
     return (((rc >>> 16) & 0x7fff) - NS_ERROR_MODULE_BASE_OFFSET);
 }
@@ -323,17 +323,17 @@ function errorToString(err) {
         }
         if (err instanceof Error) {
             return err.message;
         }
         if (err instanceof nsIException) {
             return err.toString(); // xxx todo: or just message?
         }
         if (isNaN(err)) {
-            return ("[" + err + "] unknown error.");
+            return "[" + err + "] unknown error.";
         }
     }
     // numeric codes:
     switch (err) {
         case undefined:
         case null:
         case NS_OK:
             return "NS_OK";
@@ -373,14 +373,14 @@ function errorToString(err) {
                 } catch (exc2) {
                     if (err & calIErrors.ERROR_BASE) {
                         for (let err_ in calIErrors) {
                             if (calIErrors[err_] == err) {
                                 return err_;
                             }
                         }
                     }
-                    return ("[0x" + err.toString(0x10) + "] unknown error.");
+                    return "[0x" + err.toString(0x10) + "] unknown error.";
                 }
             }
     }
 }
 
--- a/calendar/providers/wcap/calWcapRequest.js
+++ b/calendar/providers/wcap/calWcapRequest.js
@@ -19,21 +19,21 @@
 
 /* exported issueNetworkRequest, getWcapRequestStatusString, stringToIcal, stringToXml */
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function generateRequestId() {
     if (!generateRequestId.mRequestPrefix) {
-        generateRequestId.mRequestPrefix = (cal.getUUID() + "-");
+        generateRequestId.mRequestPrefix = cal.getUUID() + "-";
         generateRequestId.mRequestId = 0;
     }
     ++generateRequestId.mRequestId;
-    return (generateRequestId.mRequestPrefix + generateRequestId.mRequestId);
+    return generateRequestId.mRequestPrefix + generateRequestId.mRequestId;
 }
 
 function calWcapRequest(respFunc, logContext) {
     this.wrappedJSObject = this;
     this.m_logContext = logContext;
     this.m_id = generateRequestId();
     this.m_isPending = true;
     this.m_status = NS_OK;
@@ -74,27 +74,27 @@ calWcapRequest.prototype = {
             // assures that respFunc is executed:
             if (this.m_attachedRequests.length == 0) {
                 this.execRespFunc();
             }
         }
     },
 
     toString: function calWcapRequest_toString() {
-        let ret = ("calWcapRequest id=" + this.id +
-                   ", parent-id=" + (this.parentRequest ? this.parentRequest.id : "<none>") +
-                   " (" + this.m_logContext + ")");
+        let ret = "calWcapRequest id=" + this.id +
+                  ", parent-id=" + (this.parentRequest ? this.parentRequest.id : "<none>") +
+                  " (" + this.m_logContext + ")";
         if (LOG_LEVEL > 2 && this.m_attachedRequests.length > 0) {
             ret += "\nattached requests:";
             for (let req of this.m_attachedRequests) {
-                ret += ("\n#" + req.id + "\t" + req);
+                ret += "\n#" + req.id + "\t" + req;
             }
         }
-        ret += (", isPending=" + this.isPending);
-        ret += (", status=" + errorToString(this.status));
+        ret += ", isPending=" + this.isPending;
+        ret += ", status=" + errorToString(this.status);
         return ret;
     },
 
     attachSubRequest: function calWcapRequest_attachSubRequest(req) {
         if (req) {
             if (!this.m_attachedRequests.some(function(req_) { return req.id == req_.id; })) {
                 if (req.isPending) {
                     this.m_attachedRequests.push(req);
@@ -292,34 +292,34 @@ calWcapNetworkRequest.prototype = {
         let httpChannel = aLoader.channel.QueryInterface(Components.interfaces.nsIHttpChannel);
         switch (httpChannel.responseStatus / 100) {
             case 2: /* 2xx codes */
                 // Everything worked out, we are done
                 this.execRespFunc(aStatus, unicharData);
                 break;
             default: {
                 // Something else went wrong
-                let error = ("A request Error Occurred. Status Code: " +
-                             httpChannel.responseStatus + " " +
-                             httpChannel.responseStatusText + " Body: " +
-                             unicharData);
+                let error = "A request Error Occurred. Status Code: " +
+                            httpChannel.responseStatus + " " +
+                            httpChannel.responseStatusText + " Body: " +
+                            unicharData;
                 this.execRespFunc(Components.Exception(error, NS_BINDING_FAILED));
                 break;
             }
         }
     },
 
     toString: function calWcapNetworkRequest_toString() {
-        let ret = ("calWcapNetworkRequest id=" + this.id +
-                   ", parent-id=" + (this.parentRequest ? this.parentRequest.id : "<none>"));
+        let ret = "calWcapNetworkRequest id=" + this.id +
+                   ", parent-id=" + (this.parentRequest ? this.parentRequest.id : "<none>");
         if (this.m_bLogging) {
-            ret += (" (" + this.m_url + ")");
+            ret += " (" + this.m_url + ")";
         }
-        ret += (", isPending=" + this.isPending);
-        ret += (", status=" + errorToString(this.status));
+        ret += ", isPending=" + this.isPending;
+        ret += ", status=" + errorToString(this.status);
         return ret;
     },
 
     m_parentRequest: null,
     get parentRequest() {
         return this.m_parentRequest;
     },
     set parentRequest(req) {
--- a/calendar/providers/wcap/calWcapSession.js
+++ b/calendar/providers/wcap/calWcapSession.js
@@ -32,19 +32,19 @@ calWcapTimezone.prototype = {
     toString: function() {
         return this.icalComponent.toString();
     }
 };
 
 function splitUriParams(uri) {
     let spec = uri.spec;
     let qmPos = spec.indexOf("?");
-    return ((qmPos != -1)
-            ? [spec.substring(0, qmPos), spec.substring(qmPos)]
-            : [spec, ""]);
+    return qmPos != -1
+           ? [spec.substring(0, qmPos), spec.substring(qmPos)]
+           : [spec, ""];
 }
 
 function getWcapSessionFor(calendar, uri) {
     let contextId = calendar.getProperty("shared_context");
     if (!contextId) {
         contextId = cal.getUUID();
         calendar.setProperty("shared_context", contextId);
     }
@@ -77,17 +77,17 @@ function getWcapSessionFor(calendar, uri
 
             // check and fix changing urls (autoconf) of subscribed calendars here:
             for (let regCal of registeredCalendars) {
                 if (!regCal.isDefaultCalendar) {
                     let [spec, params] = splitUriParams(regCal.uri);
                     if (spec != defaultSpec) {
                         log("fixing url of subscribed calendar: " + regCal.calId, session);
                         let caluri = regCal.uri.clone();
-                        caluri.spec = (defaultSpec + params);
+                        caluri.spec = defaultSpec + params;
                         regCal.uri = caluri;
                         regCal.setProperty("uri", caluri.spec);
                     }
                 }
             }
         } else { // no default calendar found, dump all subscribed calendars:
             registeredCalendars.forEach(cal.getCalendarManager().unregisterCalendar,
                                         cal.getCalendarManager());
@@ -119,19 +119,19 @@ calWcapSession.prototype = {
     classInfo: XPCOMUtils.generateCI({
         classID: calWcapSessionClassID,
         contractID: "@mozilla.org/calendar/wcap/session;1",
         classDescription: "Sun Java System Calendar Server WCAP Session",
         interfaces: calWcapSessionInterfaces
     }),
 
     toString: function calWcapSession_toString(msg) {
-        let str = ("context-id: " + this.m_contextId + ", uri: " + (this.uri ? this.uri.spec : "unknown"));
+        let str = "context-id: " + this.m_contextId + ", uri: " + (this.uri ? this.uri.spec : "unknown");
         if (this.credentials.userId) {
-            str += (", userId=" + this.credentials.userId);
+            str += ", userId=" + this.credentials.userId;
         }
         if (!this.m_sessionId) {
             str += (Services.io.offline ? ", offline" : ", not logged in");
         }
         return str;
     },
     notifyError: function calWcapSession_notifyError(err) {
         if (this.defaultCalendar) {
@@ -575,17 +575,17 @@ calWcapSession.prototype = {
                     checkWcapXmlErrno(node);
                     let ar = filterXmlNodes("X-NSCP-CALPROPS-RELATIVE-CALID", node);
                     if (ar.length > 0) {
                         let calId = ar[0];
                         let calendar = cals[calId];
                         if (calendar === null) {
                             calendar = new calWcapCalendar(this_);
                             let uri = this_.uri.clone();
-                            uri.path += ("?calid=" + encodeURIComponent(calId));
+                            uri.path += "?calid=" + encodeURIComponent(calId);
                             calendar.uri = uri;
                         }
                         if (calendar) {
                             calendar.m_calProps = node;
                             if (respFunc) {
                                 respFunc(calendar);
                             }
                         }
@@ -698,17 +698,17 @@ calWcapSession.prototype = {
                 log("installed timezones.", this_);
             },
             stringToIcal, "get_all_timezones", "&fmt-out=text%2Fcalendar",
             sessionId);
     },
 
     getCommandUrl: function calWcapSession_getCommandUrl(wcapCommand, params, sessionId) {
         let url = this.sessionUri.spec;
-        url += (wcapCommand + ".wcap?appid=mozilla-calendar&id=");
+        url += wcapCommand + ".wcap?appid=mozilla-calendar&id=";
         url += sessionId;
         url += params;
         return url;
     },
 
     issueNetworkRequest: function calWcapSession_issueNetworkRequest(
                     request, respFunc, dataConvFunc, wcapCommand, params) {
         let this_ = this;
@@ -879,22 +879,22 @@ calWcapSession.prototype = {
                     listener.onResult(oprequest, data);
                 }
             },
             log("searchForCalendars, searchString=" + searchString, this));
 
         try {
             let registeredCalendars = this.getRegisteredCalendars(true);
 
-            let params = ("&fmt-out=text%2Fxml&search-string=" + encodeURIComponent(searchString));
+            let params = "&fmt-out=text%2Fxml&search-string=" + encodeURIComponent(searchString);
             if (maxResults > 0) {
-                params += ("&maxResults=" + maxResults);
+                params += "&maxResults=" + maxResults;
             }
-            params += ("&name=1&calid=1&primaryOwner=1&searchOpts=" +
-                       ((hints & calICalendarSearchProvider.HINT_EXACT_MATCH) ? "3" : "0"));
+            params += "&name=1&calid=1&primaryOwner=1&searchOpts=" +
+                       (hints & calICalendarSearchProvider.HINT_EXACT_MATCH ? "3" : "0");
 
             this.issueNetworkRequest(
                 request,
                 function searchForCalendars_netResp(err, data) {
                     if (err) {
                         throw err;
                     }
                     // string to xml converter func without WCAP errno check:
@@ -913,17 +913,17 @@ calWcapSession.prototype = {
                             if (ar.length > 0) {
                                 let calId = ar[0];
                                 let calendar = registeredCalendars[calId];
                                 if (calendar) {
                                     calendar.m_calProps = node; // update calprops
                                 } else {
                                     calendar = new calWcapCalendar(this_, node);
                                     let uri = this_.uri.clone();
-                                    uri.path += ("?calid=" + encodeURIComponent(calId));
+                                    uri.path += "?calid=" + encodeURIComponent(calId);
                                     calendar.uri = uri;
                                 }
                                 ret.push(calendar);
                             }
                         } catch (exc) {
                             switch (getResultCode(exc)) {
                                 case calIWcapErrors.WCAP_NO_ERRNO: // workaround
                                 case calIWcapErrors.WCAP_ACCESS_DENIED_TO_CALENDAR:
@@ -982,20 +982,20 @@ calWcapSession.prototype = {
             if (!data || data.length == 0) { // assuming invalid user
                 throw new Components.Exception(errorToString(calIWcapErrors.WCAP_CALENDAR_DOES_NOT_EXIST),
                                                calIWcapErrors.WCAP_CALENDAR_DOES_NOT_EXIST);
             }
             return stringToXml(session, data);
         };
 
         try {
-            let params = ("&calid=" + encodeURIComponent(calId));
-            params += ("&busyonly=" + ((busyTypes & calIFreeBusyInterval.FREE) ? "0" : "1"));
-            params += ("&dtstart=" + zRangeStart);
-            params += ("&dtend=" + zRangeEnd);
+            let params = "&calid=" + encodeURIComponent(calId);
+            params += "&busyonly=" + (busyTypes & calIFreeBusyInterval.FREE ? "0" : "1");
+            params += "&dtstart=" + zRangeStart;
+            params += "&dtend=" + zRangeEnd;
             params += "&fmt-out=text%2Fxml";
 
             this.issueNetworkRequest(
                 request,
                 function net_resp(err, xml) {
                     if (err) {
                         throw err;
                     }
@@ -1146,17 +1146,17 @@ function confirmInsecureLogin(uri) {
         if (out_dontAskAgain.value) {
             // save decision for all running calendars and
             // all future confirmations:
             let newConfirmedLogins = getPref("calendar.wcap.confirmed_http_logins", "");
             if (newConfirmedLogins.length > 0) {
                 newConfirmedLogins += ",";
             }
             confirmedEntry = (bConfirmed ? "1" : "0");
-            newConfirmedLogins += (encodedHost + ":" + confirmedEntry);
+            newConfirmedLogins += encodedHost + ":" + confirmedEntry;
             Preferences.set("calendar.wcap.confirmed_http_logins", newConfirmedLogins);
             getPref("calendar.wcap.confirmed_http_logins"); // log written entry
             confirmInsecureLogin.m_confirmedHttpLogins[encodedHost] = confirmedEntry;
         }
     }
 
     log("returned: " + bConfirmed, "confirmInsecureLogin(" + host + ")");
     return bConfirmed;
--- a/calendar/providers/wcap/calWcapUtils.js
+++ b/calendar/providers/wcap/calWcapUtils.js
@@ -84,37 +84,37 @@ function initLogging() {
         Services.obs.addObserver(appObserver, "quit-application", false);
     }
 }
 
 function log(msg, context, bForce) {
     if (bForce || LOG_LEVEL > 0) {
         let ret = "";
         if (context) {
-            ret += ("[" + context + "]");
+            ret += "[" + context + "]";
         }
         if (ret.length > 0) {
             ret += "\n";
         }
         ret += msg;
         let now = getTime();
         if (now && initLogging.mLogTimezone) {
             now = now.getInTimezone(initLogging.mLogTimezone);
         }
-        let str = ("### WCAP log entry: " + now + "\n" + ret);
+        let str = "### WCAP log entry: " + now + "\n" + ret;
         Services.console.logStringMessage(str);
-        str = ("\n" + str + "\n");
+        str = "\n" + str + "\n";
         dump(str);
         if (initLogging.mLogFilestream) {
             try {
                 // xxx todo?
                 // assuming ANSI chars here, for logging sufficient:
                 initLogging.mLogFilestream.write(str, str.length);
             } catch (exc) { // catching any io errors here:
-                let err = ("error writing log file: " + errorToString(exc));
+                let err = "error writing log file: " + errorToString(exc);
                 Components.utils.reportError(exc);
                 Services.console.logStringMessage(err);
                 dump(err + "\n\n");
             }
         }
         return ret;
     } else {
         return msg;
@@ -156,17 +156,17 @@ function getDomParser() {
     }
     return getDomParser.m_obj;
 }
 
 function isParent(item) {
     if (item.id != item.parentItem.id) {
         throw new Components.Exception("proxy has different id than its parent!");
     }
-    return (!item.recurrenceId);
+    return !item.recurrenceId;
 }
 
 function filterXmlNodes(name, rootNode) {
     let ret = [];
     if (rootNode) {
         let nodeList = rootNode.getElementsByTagName(name);
         for (let i = 0; i < nodeList.length; ++i) {
             let node = nodeList.item(i);
--- a/calendar/resources/content/calendarCreation.js
+++ b/calendar/resources/content/calendarCreation.js
@@ -33,17 +33,17 @@ function initLocationPage() {
  * Initialize the customize page
  */
 function initCustomizePage() {
     initNameFromURI();
     checkRequired();
 
     let suppressAlarmsRow = document.getElementById("customize-suppressAlarms-row");
     suppressAlarmsRow.hidden =
-        (gCalendar && gCalendar.getProperty("capabilities.alarms.popup.supported") === false);
+        gCalendar && gCalendar.getProperty("capabilities.alarms.popup.supported") === false;
     document.getElementById("calendar-color").value = "#A8C2E1";
 }
 
 /**
  * Sets up notifications for the location page. On aReason == SUCCESS, all
  * notifications are removed. Otherwise, the respective notification is added to
  * the notification box. Only one notification per reason will be shown.
  *
--- a/calendar/resources/content/datetimepickers/datetimepickers.xml
+++ b/calendar/resources/content/datetimepickers/datetimepickers.xml
@@ -449,18 +449,18 @@
                 if (aEvent) {
                     aEvent.stopPropagation();
                 }
                 let date = this.parseDateTime(this.kTextBox.value);
                 if (date) {
                     this.update(date, aRefresh);
                 } else {
                     // Invalid date, revert to previous date.
-                    this.kTextBox.value = (this.mValue == "forever") ? this.mForeverStr
-                                                                     : this.formatDate(this.mValue);
+                    this.kTextBox.value = this.mValue == "forever" ? this.mForeverStr
+                                                                   : this.formatDate(this.mValue);
                 }
                 this.lastDateParseIncludedTime = false;
             }
           ]]>
         </body>
       </method>
 
       <method name="onMenuitemForever">
@@ -577,19 +577,19 @@
       <constructor>
         <![CDATA[
           let hbox = document.getAnonymousNodes(this)[0];
           this.kTextBox = hbox.childNodes[0];
           this.kTextBox.kTimePicker = this; // enable call back to method in Moz1.7
 
           let val = this.getAttribute("value");
           if (val) {
-            this.value = (new Date(val));
+            this.value = new Date(val);
           } else {
-            this.value = (new Date());
+            this.value = new Date();
           }
 
           // Change the grids in the timepicker-grids for 12-hours time format.
           if (this.ampmIndex) {
             // Find the locale strings for the AM/PM prefix/suffix.
             let amTime = new Date(2000, 0, 1, 6, 12, 34);
             let pmTime = new Date(2000, 0, 1, 18, 12, 34);
             amTime = amTime.toLocaleFormat(this.kTimeFormatString);
--- a/calendar/resources/content/mouseoverPreviews.js
+++ b/calendar/resources/content/mouseoverPreviews.js
@@ -126,17 +126,17 @@ function getPreviewForTask(toDoItem) {
     if (description) {
       // display wrapped description lines like body of message below headers
       if (hasHeader) {
         boxAppendBodySeparator(vbox);
       }
       boxAppendBody(vbox, description);
     }
 
-    return (vbox);
+    return vbox;
   } else {
     return null;
   }
 }
 
 /**
  *  Called when mouse moves over a different, or
  *  when mouse moves over event in event list.
@@ -186,17 +186,17 @@ function getPreviewForEvent(aEvent) {
     }
 
     let description = event.getProperty("DESCRIPTION");
     if (description) {
       boxAppendBodySeparator(vbox);
       // display wrapped description lines, like body of message below headers
       boxAppendBody(vbox, description);
     }
-    return (vbox);
+    return vbox;
   } else {
       return null;
   }
 }
 
 
 /** String for event status: (none), Tentative, Confirmed, or Cancelled **/
 function getEventStatusString(calendarEvent) {
--- a/calendar/test/mozmill/eventDialog/testEventDialog.js
+++ b/calendar/test/mozmill/eventDialog/testEventDialog.js
@@ -122,17 +122,17 @@ var testEventDialog = function() {
   md.start(handleAttendees);
   event.click(new elementslib.ID(event.window.document, "button-attendees"));
   event.assertValue(new elementslib.ID(event.window.document, "attendee-list"),
     attendee);
 
   // make it private and verify label visible
   event.click(new elementslib.ID(event.window.document, "button-privacy"));
   event.click(new elementslib.ID(event.window.document, "event-privacy-private-menuitem"));
-  let label = (new elementslib.ID(event.window.document, "status-privacy-private-box"));
+  let label = new elementslib.ID(event.window.document, "status-privacy-private-box");
   event.assertJS(event.window.getComputedStyle(label.getNode(), null).getPropertyValue("visibility") == "visible");
 
   // add attachment and verify added
   calUtils.handleAddingAttachment(event, url);
   event.click(new elementslib.ID(event.window.document, "button-url"));
   event.assertNode(new elementslib.Lookup(event.window.document, eventDialog +
     'id("event-grid-attachment-row")/id("attachment-link")/{"label":"mozilla.org"}'));
 
--- a/calendar/test/mozmill/shared-modules/calendar-utils.js
+++ b/calendar/test/mozmill/shared-modules/calendar-utils.js
@@ -101,45 +101,45 @@ function handleParentModification(contro
  *  @param view - day, week, multiweek or month
  */
 function switchToView(controller, view) {
   switch (view) {
     case "week":
       controller.waitThenClick(new elementslib.ID(controller.window.document,
         "calendar-week-view-button"));
       controller.waitFor(function() {
-        let button = (new elementslib.ID(controller.window.document,
-        "calendar-week-view-button"));
+        let button = new elementslib.ID(controller.window.document,
+        "calendar-week-view-button");
         return button.getNode().selected == true;
       });
       break;
     case "multiweek":
       controller.waitThenClick(new elementslib.ID(controller.window.document,
         "calendar-multiweek-view-button"));
       controller.waitFor(function() {
-        let button = (new elementslib.ID(controller.window.document,
-        "calendar-multiweek-view-button"));
+        let button = new elementslib.ID(controller.window.document,
+        "calendar-multiweek-view-button");
         return button.getNode().selected == true;
       });
       break;
     case "month":
       controller.waitThenClick(new elementslib.ID(controller.window.document,
         "calendar-month-view-button"));
       controller.waitFor(function() {
-        let button = (new elementslib.ID(controller.window.document,
-        "calendar-month-view-button"));
+        let button = new elementslib.ID(controller.window.document,
+        "calendar-month-view-button");
         return button.getNode().selected == true;
       });
       break;
     default:
       controller.waitThenClick(new elementslib.ID(controller.window.document,
         "calendar-day-view-button"));
       controller.waitFor(function() {
-        let button = (new elementslib.ID(controller.window.document,
-        "calendar-day-view-button"));
+        let button = new elementslib.ID(controller.window.document,
+        "calendar-day-view-button");
         return button.getNode().selected == true;
       });
   }
 }
 
 /**
  *  Go to a specific date using minimonth
  *  @param controller - main window controller
--- a/calendar/test/unit/test_alarmservice.js
+++ b/calendar/test/unit/test_alarmservice.js
@@ -45,19 +45,19 @@ var alarmObserver = {
             aOperation.call();
         } else {
             // the calendar hasn't been fully loaded yet, set as a pending operation
             this.pendingOps[aCalendar.id] = aOperation;
         }
     },
 
     getTimer: function obs_getTimer(aCalendarId, aItemId, aAlarmStr) {
-        return (aCalendarId in this.service.mTimerMap &&
-                aItemId in this.service.mTimerMap[aCalendarId] &&
-                aAlarmStr in this.service.mTimerMap[aCalendarId][aItemId]) ?
+        return aCalendarId in this.service.mTimerMap &&
+               aItemId in this.service.mTimerMap[aCalendarId] &&
+               aAlarmStr in this.service.mTimerMap[aCalendarId][aItemId] ?
                this.service.mTimerMap[aCalendarId][aItemId][aAlarmStr] : null;
     },
 
     expectResult: function obs_expectResult(aCalendar, aItem, aAlarm, aExpected) {
         this.expectedMap[aCalendar.id] = this.expectedMap[aCalendar.id] || {};
         this.expectedMap[aCalendar.id][aItem.hashId] = this.expectedMap[aCalendar.id][aItem.hashId] || {};
         this.expectedMap[aCalendar.id][aItem.hashId][aAlarm.icalString] = aExpected;
     },
--- a/calendar/test/unit/test_gdata_provider.js
+++ b/calendar/test/unit/test_gdata_provider.js
@@ -513,36 +513,36 @@ add_task(function* test_migrate_cache() 
     let unwrapped = client.wrappedJSObject;
     let migrateStorageCache = unwrapped.migrateStorageCache.bind(unwrapped);
 
     monkeyPatch(unwrapped, "resetSync", function(protofunc) {
         return Promise.resolve();
     });
 
     // No version, should not reset
-    equal((yield migrateStorageCache()), false);
+    equal(yield migrateStorageCache(), false);
     equal(client.getProperty("cache.version"), 3);
 
     // Check migrate 1 -> 2
     unwrapped.CACHE_DB_VERSION = 2;
     client.setProperty("cache.version", 1);
-    equal((yield migrateStorageCache()), true);
+    equal(yield migrateStorageCache(), true);
     equal(client.getProperty("cache.version"), 2);
 
     // Check migrate 2 -> 3 normal calendar
     unwrapped.CACHE_DB_VERSION = 3;
     client.setProperty("cache.version", 2);
-    equal((yield migrateStorageCache()), false);
+    equal(yield migrateStorageCache(), false);
 
     // Check migrate 2 -> 3 birthday calendar
     unwrapped.CACHE_DB_VERSION = 3;
     uri = "googleapi://xpcshell/?calendar=%23contacts%40group.v.calendar.google.com";
     unwrapped.uri = Services.io.newURI(uri, null, null);
     client.setProperty("cache.version", 2);
-    equal((yield migrateStorageCache()), true);
+    equal(yield migrateStorageCache(), true);
 });
 
 add_test(function test_migrate_uri() {
     function checkMigrate(fromUri, session, calendarId, tasksId) {
         let uri = Services.io.newURI(fromUri, null, null);
         let client = cal.getCalendarManager().createCalendar("gdata", uri);
 
         if (session) {
--- a/calendar/test/unit/test_timezone_definition.js
+++ b/calendar/test/unit/test_timezone_definition.js
@@ -7,17 +7,17 @@ function run_test() {
 }
 
 /**
  * Checks whether the pased string is a valid tz version number
  * @param    {String}         aVersionString
  * @returns  {boolean}
  */
 function valid_tz_version(aVersionString) {
-    return (aVersionString.match(/^2\.(\d{4})(z*[a-z])$/));
+    return aVersionString.match(/^2\.(\d{4})(z*[a-z])$/);
 }
 
 // check tz database version
 add_task(function* version_test() {
     let tzs = cal.getTimezoneService();
     ok(valid_tz_version(tzs.version), "timezone version");
 });