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/calendar/vendor/*
modules/default/alert/modernizr.custom.js
modules/default/alert/classie.js

View File

@ -16,8 +16,8 @@ WeatherProvider.register("darksky", {
providerName: "Dark Sky", providerName: "Dark Sky",
units: { units: {
imperial: 'us', imperial: "us",
metric: 'si' metric: "si"
}, },
fetchCurrentWeather() { fetchCurrentWeather() {
@ -33,7 +33,7 @@ WeatherProvider.register("darksky", {
}).catch(function(request) { }).catch(function(request) {
Log.error("Could not load data ... ", request); Log.error("Could not load data ... ", request);
}) })
.finally(() => this.updateAvailable()) .finally(() => this.updateAvailable());
}, },
fetchWeatherForecast() { fetchWeatherForecast() {
@ -49,7 +49,7 @@ WeatherProvider.register("darksky", {
}).catch(function(request) { }).catch(function(request) {
Log.error("Could not load data ... ", request); Log.error("Could not load data ... ", request);
}) })
.finally(() => this.updateAvailable()) .finally(() => this.updateAvailable());
}, },
// Create a URL from the config and base URL. // Create a URL from the config and base URL.

View File

@ -34,7 +34,7 @@ WeatherProvider.register("openweathermap", {
.catch(function(request) { .catch(function(request) {
Log.error("Could not load data ... ", request); Log.error("Could not load data ... ", request);
}) })
.finally(() => this.updateAvailable()) .finally(() => this.updateAvailable());
}, },
// Overwrite the fetchCurrentWeather method. // Overwrite the fetchCurrentWeather method.
@ -55,7 +55,7 @@ WeatherProvider.register("openweathermap", {
.catch(function(request) { .catch(function(request) {
Log.error("Could not load data ... ", 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 */ /** OpenWeatherMap Specific Methods - These are not part of the default provider methods */
@ -223,7 +223,7 @@ WeatherProvider.register("openweathermap", {
days.push(weather); days.push(weather);
} }
return days; return days;
}, },
/* /*

View File

@ -9,7 +9,6 @@
* This class is a provider for UK Met Office Datapoint. * This class is a provider for UK Met Office Datapoint.
*/ */
WeatherProvider.register("ukmetoffice", { WeatherProvider.register("ukmetoffice", {
// Set the name of the provider. // Set the name of the provider.
@ -41,7 +40,7 @@ WeatherProvider.register("ukmetoffice", {
.catch(function(request) { .catch(function(request) {
Log.error("Could not load data ... ", request); Log.error("Could not load data ... ", request);
}) })
.finally(() => this.updateAvailable()) .finally(() => this.updateAvailable());
}, },
// Overwrite the fetchCurrentWeather method. // Overwrite the fetchCurrentWeather method.
@ -63,11 +62,9 @@ WeatherProvider.register("ukmetoffice", {
.catch(function(request) { .catch(function(request) {
Log.error("Could not load data ... ", 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 */ /** UK Met Office Specific Methods - These are not part of the default provider methods */
/* /*
* Gets the complete url for the request * 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); const currentWeather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits);
// data times are always UTC // data times are always UTC
let nowUtc = moment.utc() let nowUtc = moment.utc();
let midnightUtc = nowUtc.clone().startOf("day") let midnightUtc = nowUtc.clone().startOf("day");
let timeInMins = nowUtc.diff(midnightUtc, "minutes"); let timeInMins = nowUtc.diff(midnightUtc, "minutes");
// loop round each of the (5) periods, look for today (the first period may be yesterday) // loop round each of the (5) periods, look for today (the first period may be yesterday)
for (i in currentWeatherData.SiteRep.DV.Location.Period) { 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 // ignore if period is before today
if (periodDate.isSameOrAfter(moment.utc().startOf("day"))) { 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 // 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.sunrise = times[0];
currentWeather.sunset = times[1]; currentWeather.sunset = times[1];
@ -136,8 +133,8 @@ WeatherProvider.register("ukmetoffice", {
const weather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits); const weather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits);
// data times are always UTC // data times are always UTC
dateStr = forecasts.SiteRep.DV.Location.Period[j].value dateStr = forecasts.SiteRep.DV.Location.Period[j].value;
let periodDate = moment.utc(dateStr.substr(0,10), "YYYY-MM-DD") let periodDate = moment.utc(dateStr.substr(0,10), "YYYY-MM-DD");
// ignore if period is before today // ignore if period is before today
if (periodDate.isSameOrAfter(moment.utc().startOf("day"))) { if (periodDate.isSameOrAfter(moment.utc().startOf("day"))) {

View File

@ -35,7 +35,7 @@ WeatherProvider.register("weathergov", {
.catch(function(request) { .catch(function(request) {
Log.error("Could not load data ... ", request); Log.error("Could not load data ... ", request);
}) })
.finally(() => this.updateAvailable()) .finally(() => this.updateAvailable());
}, },
// Overwrite the fetchCurrentWeather method. // Overwrite the fetchCurrentWeather method.
@ -54,7 +54,7 @@ WeatherProvider.register("weathergov", {
.catch(function(request) { .catch(function(request) {
Log.error("Could not load data ... ", 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 */ /** 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); currentWeather.weatherType = this.convertWeatherType(currentWeatherData.shortForecast, currentWeatherData.isDaytime);
// determine the sunrise/sunset times - not supplied in weather.gov data // 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.sunrise = times[0];
currentWeather.sunset = times[1]; currentWeather.sunset = times[1];