diff --git a/.eslintignore b/.eslintignore index 675b6a8c..fa766882 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1 @@ -modules/default/alert/notificationFx.js -modules/default/alert/modernizr.custom.js -modules/default/alert/classie.js +modules/default/calendar/vendor/* diff --git a/modules/default/weather/providers/darksky.js b/modules/default/weather/providers/darksky.js index b24c4794..ea529954 100755 --- a/modules/default/weather/providers/darksky.js +++ b/modules/default/weather/providers/darksky.js @@ -16,8 +16,8 @@ WeatherProvider.register("darksky", { providerName: "Dark Sky", units: { - imperial: 'us', - metric: 'si' + imperial: "us", + metric: "si" }, fetchCurrentWeather() { @@ -33,7 +33,7 @@ WeatherProvider.register("darksky", { }).catch(function(request) { Log.error("Could not load data ... ", request); }) - .finally(() => this.updateAvailable()) + .finally(() => this.updateAvailable()); }, fetchWeatherForecast() { @@ -49,7 +49,7 @@ WeatherProvider.register("darksky", { }).catch(function(request) { Log.error("Could not load data ... ", request); }) - .finally(() => this.updateAvailable()) + .finally(() => this.updateAvailable()); }, // Create a URL from the config and base URL. diff --git a/modules/default/weather/providers/openweathermap.js b/modules/default/weather/providers/openweathermap.js index e99dc476..4f3569fd 100755 --- a/modules/default/weather/providers/openweathermap.js +++ b/modules/default/weather/providers/openweathermap.js @@ -34,7 +34,7 @@ WeatherProvider.register("openweathermap", { .catch(function(request) { Log.error("Could not load data ... ", request); }) - .finally(() => this.updateAvailable()) + .finally(() => this.updateAvailable()); }, // Overwrite the fetchCurrentWeather method. @@ -55,7 +55,7 @@ WeatherProvider.register("openweathermap", { .catch(function(request) { Log.error("Could not load data ... ", request); }) - .finally(() => this.updateAvailable()) + .finally(() => this.updateAvailable()); }, /** OpenWeatherMap Specific Methods - These are not part of the default provider methods */ @@ -223,7 +223,7 @@ WeatherProvider.register("openweathermap", { days.push(weather); } - return days; + return days; }, /* diff --git a/modules/default/weather/providers/ukmetoffice.js b/modules/default/weather/providers/ukmetoffice.js index 47785b3b..884b5d98 100755 --- a/modules/default/weather/providers/ukmetoffice.js +++ b/modules/default/weather/providers/ukmetoffice.js @@ -9,7 +9,6 @@ * This class is a provider for UK Met Office Datapoint. */ - WeatherProvider.register("ukmetoffice", { // Set the name of the provider. @@ -41,7 +40,7 @@ WeatherProvider.register("ukmetoffice", { .catch(function(request) { Log.error("Could not load data ... ", request); }) - .finally(() => this.updateAvailable()) + .finally(() => this.updateAvailable()); }, // Overwrite the fetchCurrentWeather method. @@ -63,11 +62,9 @@ WeatherProvider.register("ukmetoffice", { .catch(function(request) { Log.error("Could not load data ... ", request); }) - .finally(() => this.updateAvailable()) + .finally(() => this.updateAvailable()); }, - - /** UK Met Office Specific Methods - These are not part of the default provider methods */ /* * Gets the complete url for the request @@ -83,13 +80,13 @@ WeatherProvider.register("ukmetoffice", { const currentWeather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits); // data times are always UTC - let nowUtc = moment.utc() - let midnightUtc = nowUtc.clone().startOf("day") + let nowUtc = moment.utc(); + let midnightUtc = nowUtc.clone().startOf("day"); let timeInMins = nowUtc.diff(midnightUtc, "minutes"); // loop round each of the (5) periods, look for today (the first period may be yesterday) for (i in currentWeatherData.SiteRep.DV.Location.Period) { - let periodDate = moment.utc(currentWeatherData.SiteRep.DV.Location.Period[i].value.substr(0,10), "YYYY-MM-DD") + let periodDate = moment.utc(currentWeatherData.SiteRep.DV.Location.Period[i].value.substr(0,10), "YYYY-MM-DD"); // ignore if period is before today if (periodDate.isSameOrAfter(moment.utc().startOf("day"))) { @@ -116,7 +113,7 @@ WeatherProvider.register("ukmetoffice", { } // determine the sunrise/sunset times - not supplied in UK Met Office data - let times = this.calcAstroData(currentWeatherData.SiteRep.DV.Location) + let times = this.calcAstroData(currentWeatherData.SiteRep.DV.Location); currentWeather.sunrise = times[0]; currentWeather.sunset = times[1]; @@ -136,8 +133,8 @@ WeatherProvider.register("ukmetoffice", { const weather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits); // data times are always UTC - dateStr = forecasts.SiteRep.DV.Location.Period[j].value - let periodDate = moment.utc(dateStr.substr(0,10), "YYYY-MM-DD") + dateStr = forecasts.SiteRep.DV.Location.Period[j].value; + let periodDate = moment.utc(dateStr.substr(0,10), "YYYY-MM-DD"); // ignore if period is before today if (periodDate.isSameOrAfter(moment.utc().startOf("day"))) { diff --git a/modules/default/weather/providers/weathergov.js b/modules/default/weather/providers/weathergov.js index 74d95522..1d030d32 100755 --- a/modules/default/weather/providers/weathergov.js +++ b/modules/default/weather/providers/weathergov.js @@ -35,7 +35,7 @@ WeatherProvider.register("weathergov", { .catch(function(request) { Log.error("Could not load data ... ", request); }) - .finally(() => this.updateAvailable()) + .finally(() => this.updateAvailable()); }, // Overwrite the fetchCurrentWeather method. @@ -54,7 +54,7 @@ WeatherProvider.register("weathergov", { .catch(function(request) { Log.error("Could not load data ... ", request); }) - .finally(() => this.updateAvailable()) + .finally(() => this.updateAvailable()); }, /** Weather.gov Specific Methods - These are not part of the default provider methods */ @@ -77,7 +77,7 @@ WeatherProvider.register("weathergov", { currentWeather.weatherType = this.convertWeatherType(currentWeatherData.shortForecast, currentWeatherData.isDaytime); // determine the sunrise/sunset times - not supplied in weather.gov data - let times = this.calcAstroData(this.config.lat, this.config.lon) + let times = this.calcAstroData(this.config.lat, this.config.lon); currentWeather.sunrise = times[0]; currentWeather.sunset = times[1];