mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Final fixes for eslint:recommended
This commit is contained in:
parent
d08bd4e866
commit
9ec329b7ae
@ -14,6 +14,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"no-prototype-builtins": "off",
|
||||||
"no-undef": "off",
|
"no-undef": "off",
|
||||||
"no-unused-vars": "off"
|
"no-unused-vars": "off"
|
||||||
}
|
}
|
||||||
|
@ -344,13 +344,14 @@ var MM = (function() {
|
|||||||
* Loads the core config and combines it with de system defaults.
|
* Loads the core config and combines it with de system defaults.
|
||||||
*/
|
*/
|
||||||
var loadConfig = function() {
|
var loadConfig = function() {
|
||||||
|
let config = window.config;
|
||||||
if (typeof config === "undefined") {
|
if (typeof config === "undefined") {
|
||||||
config = defaults;
|
window.config = defaults;
|
||||||
Log.error("Config file is missing! Please create a config file.");
|
Log.error("Config file is missing! Please create a config file.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
config = Object.assign({}, defaults, config);
|
window.config = Object.assign({}, defaults, config);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* setSelectionMethodsForModules()
|
/* setSelectionMethodsForModules()
|
||||||
|
@ -81,8 +81,7 @@ var CalendarFetcher = function(url, reloadInterval, excludedEvents, maximumEntri
|
|||||||
past = moment().startOf("day").subtract(maximumNumberOfDays, "days").toDate();
|
past = moment().startOf("day").subtract(maximumNumberOfDays, "days").toDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME:
|
// FIXME: Ugly fix to solve the facebook birthday issue.
|
||||||
// Ugly fix to solve the facebook birthday issue.
|
|
||||||
// Otherwise, the recurring events only show the birthday for next year.
|
// Otherwise, the recurring events only show the birthday for next year.
|
||||||
var isFacebookBirthday = false;
|
var isFacebookBirthday = false;
|
||||||
if (typeof event.uid !== "undefined") {
|
if (typeof event.uid !== "undefined") {
|
||||||
|
@ -25,8 +25,7 @@ WeatherProvider.register("ukmetoffice", {
|
|||||||
fetchCurrentWeather() {
|
fetchCurrentWeather() {
|
||||||
this.fetchData(this.getUrl("3hourly"))
|
this.fetchData(this.getUrl("3hourly"))
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (!data || !data.SiteRep || !data.SiteRep.DV || !data.SiteRep.DV.Location ||
|
if (!data || !data.SiteRep || !data.SiteRep.DV || !data.SiteRep.DV.Location || !data.SiteRep.DV.Location.Period || data.SiteRep.DV.Location.Period.length === 0) {
|
||||||
!data.SiteRep.DV.Location.Period || data.SiteRep.DV.Location.Period.length == 0) {
|
|
||||||
// Did not receive usable new data.
|
// Did not receive usable new data.
|
||||||
// Maybe this needs a better check?
|
// Maybe this needs a better check?
|
||||||
return;
|
return;
|
||||||
@ -47,8 +46,7 @@ WeatherProvider.register("ukmetoffice", {
|
|||||||
fetchWeatherForecast() {
|
fetchWeatherForecast() {
|
||||||
this.fetchData(this.getUrl("daily"))
|
this.fetchData(this.getUrl("daily"))
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (!data || !data.SiteRep || !data.SiteRep.DV || !data.SiteRep.DV.Location ||
|
if (!data || !data.SiteRep || !data.SiteRep.DV || !data.SiteRep.DV.Location || !data.SiteRep.DV.Location.Period || data.SiteRep.DV.Location.Period.length === 0) {
|
||||||
!data.SiteRep.DV.Location.Period || data.SiteRep.DV.Location.Period.length == 0) {
|
|
||||||
// Did not receive usable new data.
|
// Did not receive usable new data.
|
||||||
// Maybe this needs a better check?
|
// Maybe this needs a better check?
|
||||||
return;
|
return;
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
var config = {
|
var config = {
|
||||||
port: 8080,
|
port: 8080,
|
||||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||||
ipWhitelist: [],
|
|
||||||
|
|
||||||
language: "en",
|
language: "en",
|
||||||
timeFormat: 24,
|
timeFormat: 24,
|
||||||
@ -19,6 +18,7 @@ var config = {
|
|||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
modules:
|
modules:
|
||||||
// Using exotic content. This is why dont accept go to JSON configuration file
|
// Using exotic content. This is why dont accept go to JSON configuration file
|
||||||
(function() {
|
(function() {
|
||||||
|
@ -5,11 +5,11 @@ const describe = global.describe;
|
|||||||
const it = global.it;
|
const it = global.it;
|
||||||
|
|
||||||
describe("Development console tests", function() {
|
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
|
// Suspect problem with window focus
|
||||||
// FIXME
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
/* eslint-disable */
|
||||||
helpers.setupTimeout(this);
|
helpers.setupTimeout(this);
|
||||||
|
|
||||||
var app = null;
|
var app = null;
|
||||||
@ -58,4 +58,5 @@ describe("Development console tests", function() {
|
|||||||
return expect(app.browserWindow.isDevToolsOpened()).to.eventually.equal(true);
|
return expect(app.browserWindow.isDevToolsOpened()).to.eventually.equal(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
/* eslint-enable */
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user