diff --git a/.eslintrc.json b/.eslintrc.json index cf4de832..65b99e6e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,6 +14,7 @@ } }, "rules": { + "no-prototype-builtins": "off", "no-undef": "off", "no-unused-vars": "off" } diff --git a/js/main.js b/js/main.js index 465f1d45..7801ae3c 100644 --- a/js/main.js +++ b/js/main.js @@ -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() diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index c393d5d6..1e629a28 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -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") { diff --git a/modules/default/weather/providers/ukmetoffice.js b/modules/default/weather/providers/ukmetoffice.js index 884b5d98..dc617dd0 100755 --- a/modules/default/weather/providers/ukmetoffice.js +++ b/modules/default/weather/providers/ukmetoffice.js @@ -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; diff --git a/tests/configs/modules/positions.js b/tests/configs/modules/positions.js index d56fab91..d2bf5ee9 100644 --- a/tests/configs/modules/positions.js +++ b/tests/configs/modules/positions.js @@ -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() { diff --git a/tests/e2e/dev_console.js b/tests/e2e/dev_console.js index 42f8ac99..8cddee1d 100644 --- a/tests/e2e/dev_console.js +++ b/tests/e2e/dev_console.js @@ -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 */ });