Final fixes for eslint:recommended

This commit is contained in:
Veeck 2020-04-21 10:37:24 +02:00 committed by rejas
parent d08bd4e866
commit 9ec329b7ae
6 changed files with 11 additions and 11 deletions

View File

@ -14,6 +14,7 @@
}
},
"rules": {
"no-prototype-builtins": "off",
"no-undef": "off",
"no-unused-vars": "off"
}

View File

@ -344,13 +344,14 @@ var MM = (function() {
* Loads the core config and combines it with de system defaults.
*/
var loadConfig = function() {
let config = window.config;
if (typeof config === "undefined") {
config = defaults;
window.config = defaults;
Log.error("Config file is missing! Please create a config file.");
return;
}
config = Object.assign({}, defaults, config);
window.config = Object.assign({}, defaults, config);
};
/* setSelectionMethodsForModules()

View File

@ -81,8 +81,7 @@ var CalendarFetcher = function(url, reloadInterval, excludedEvents, maximumEntri
past = moment().startOf("day").subtract(maximumNumberOfDays, "days").toDate();
}
// FIXME:
// Ugly fix to solve the facebook birthday issue.
// FIXME: Ugly fix to solve the facebook birthday issue.
// Otherwise, the recurring events only show the birthday for next year.
var isFacebookBirthday = false;
if (typeof event.uid !== "undefined") {

View File

@ -25,8 +25,7 @@ WeatherProvider.register("ukmetoffice", {
fetchCurrentWeather() {
this.fetchData(this.getUrl("3hourly"))
.then(data => {
if (!data || !data.SiteRep || !data.SiteRep.DV || !data.SiteRep.DV.Location ||
!data.SiteRep.DV.Location.Period || data.SiteRep.DV.Location.Period.length == 0) {
if (!data || !data.SiteRep || !data.SiteRep.DV || !data.SiteRep.DV.Location || !data.SiteRep.DV.Location.Period || data.SiteRep.DV.Location.Period.length === 0) {
// Did not receive usable new data.
// Maybe this needs a better check?
return;
@ -47,8 +46,7 @@ WeatherProvider.register("ukmetoffice", {
fetchWeatherForecast() {
this.fetchData(this.getUrl("daily"))
.then(data => {
if (!data || !data.SiteRep || !data.SiteRep.DV || !data.SiteRep.DV.Location ||
!data.SiteRep.DV.Location.Period || data.SiteRep.DV.Location.Period.length == 0) {
if (!data || !data.SiteRep || !data.SiteRep.DV || !data.SiteRep.DV.Location || !data.SiteRep.DV.Location.Period || data.SiteRep.DV.Location.Period.length === 0) {
// Did not receive usable new data.
// Maybe this needs a better check?
return;

View File

@ -9,7 +9,6 @@
var config = {
port: 8080,
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
ipWhitelist: [],
language: "en",
timeFormat: 24,
@ -19,6 +18,7 @@ var config = {
nodeIntegration: true,
},
},
modules:
// Using exotic content. This is why dont accept go to JSON configuration file
(function() {

View File

@ -5,11 +5,11 @@ const describe = global.describe;
const it = global.it;
describe("Development console tests", function() {
// This tests fail and crash another tests
// FIXME: This tests fail and crash another tests
// Suspect problem with window focus
// FIXME
return false;
/* eslint-disable */
helpers.setupTimeout(this);
var app = null;
@ -58,4 +58,5 @@ describe("Development console tests", function() {
return expect(app.browserWindow.isDevToolsOpened()).to.eventually.equal(true);
});
});
/* eslint-enable */
});