Update ignored files for eslint

This commit is contained in:
Veeck 2020-04-20 11:15:11 +02:00
parent b56a930f60
commit fb557b9130
5 changed files with 19 additions and 24 deletions

View File

@ -1,3 +1 @@
modules/default/alert/notificationFx.js
modules/default/alert/modernizr.custom.js
modules/default/alert/classie.js
modules/default/calendar/vendor/*

View File

@ -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.

View File

@ -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 */

View File

@ -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"))) {

View File

@ -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];