Bug 1283384 - Implement time picker UI w/ message passing: Fix eslint errors. r=eslint
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 25 Oct 2016 09:32:56 +0200
changeset 362129 67b4815aa4060ef34d4a0595c6da15c159c2e3d8
parent 362128 6a52e0212b16b9115a688420872c81ab15cfd594
child 362130 efba37187d2d41078def06a75991770f6058f26d
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseslint
bugs1283384
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1283384 - Implement time picker UI w/ message passing: Fix eslint errors. r=eslint
toolkit/content/widgets/spinner.js
toolkit/content/widgets/timekeeper.js
toolkit/content/widgets/timepicker.js
--- a/toolkit/content/widgets/spinner.js
+++ b/toolkit/content/widgets/spinner.js
@@ -10,17 +10,17 @@
  * when it detects a change in value triggered by scroll event.
  * Supports scrolling, clicking on up or down, clicking on item, and
  * dragging.
  */
 
 function Spinner(props, context) {
   this.context = context;
   this._init(props);
-};
+}
 
 {
   const debug = 0 ? console.log.bind(console, '[spinner]') : function() {};
 
   const ITEM_HEIGHT = 20,
         VIEWPORT_SIZE = 5,
         VIEWPORT_COUNT = 5;
 
--- a/toolkit/content/widgets/timekeeper.js
+++ b/toolkit/content/widgets/timekeeper.js
@@ -16,17 +16,17 @@
  *          {Date} max
  *          {Number} stepInMs
  *          {String} format: Either "12" or "24"
  *        }
  */
 function TimeKeeper(props) {
   this.props = props;
   this.state = { time: new Date(0), ranges: {} };
-};
+}
 
 {
   const debug = 0 ? console.log.bind(console, '[timekeeper]') : function() {};
 
   const DAY_PERIOD_IN_HOURS = 12,
         SECOND_IN_MS = 1000,
         MINUTE_IN_MS = 60000,
         HOUR_IN_MS = 3600000,
--- a/toolkit/content/widgets/timepicker.js
+++ b/toolkit/content/widgets/timepicker.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
 function TimePicker(context) {
   this.context = context;
   this._attachEventListeners();
-};
+}
 
 {
   const debug = 0 ? console.log.bind(console, '[timepicker]') : function() {};
 
   const DAY_PERIOD_IN_HOURS = 12,
         SECOND_IN_MS = 1000,
         MINUTE_IN_MS = 60000,
         DAY_IN_MS = 86400000;
@@ -97,22 +97,21 @@ function TimePicker(context) {
         hour: new Spinner({
           setValue: wrapSetValueFn(value => {
             timeKeeper.setHour(value);
             this.state.isHourSet = true;
           }),
           getDisplayString: hour => {
             if (format == "24") {
               return numberFormat(hour);
-            } else {
-              // Hour 0 in 12 hour format is displayed as 12.
-              const hourIn12 = hour % DAY_PERIOD_IN_HOURS;
-              return hourIn12 == 0 ? numberFormat(12)
-                : numberFormat(hourIn12);
             }
+            // Hour 0 in 12 hour format is displayed as 12.
+            const hourIn12 = hour % DAY_PERIOD_IN_HOURS;
+            return hourIn12 == 0 ? numberFormat(12)
+              : numberFormat(hourIn12);
           }
         }, this.context),
         minute: new Spinner({
           setValue: wrapSetValueFn(value => {
             timeKeeper.setMinute(value);
             this.state.isMinuteSet = true;
           }),
           getDisplayString: minute => numberFormat(minute)