From c04fa496bf4e140b36d65e3991e42f6b068a993c Mon Sep 17 00:00:00 2001 From: rejas Date: Sun, 3 May 2020 18:59:26 +0200 Subject: [PATCH] Second round of undef fixes --- js/class.js | 8 +++++--- js/defaults.js | 2 +- js/loader.js | 2 +- js/logger.js | 10 +++------- js/module.js | 2 +- js/translator.js | 2 +- js/utils.js | 3 --- modules/default/calendar/calendar.js | 2 +- vendor/vendor.js | 3 --- 9 files changed, 13 insertions(+), 21 deletions(-) diff --git a/js/class.js b/js/class.js index 835e48f2..aab1799e 100644 --- a/js/class.js +++ b/js/class.js @@ -1,10 +1,12 @@ +/* global Class, xyz */ + /* Simple JavaScript Inheritance * By John Resig https://johnresig.com/ + * + * Inspired by base2 and Prototype + * * MIT Licensed. */ - - -// Inspired by base2 and Prototype (function () { var initializing = false; var fnTest = /xyz/.test(function () { xyz; }) ? /\b_super\b/ : /.*/; diff --git a/js/defaults.js b/js/defaults.js index d01082ee..36275e6c 100644 --- a/js/defaults.js +++ b/js/defaults.js @@ -1,4 +1,4 @@ -/* exported defaults */ +/* global mmPort */ /* Magic Mirror * Config Defaults diff --git a/js/loader.js b/js/loader.js index 3f618742..7199fe88 100644 --- a/js/loader.js +++ b/js/loader.js @@ -1,4 +1,4 @@ -/* global Module, vendor */ +/* global defaultModules, Module, vendor */ /* Magic Mirror * Module and File loaders. diff --git a/js/logger.js b/js/logger.js index 876826e8..60d91b2f 100644 --- a/js/logger.js +++ b/js/logger.js @@ -1,16 +1,12 @@ -/* exported Log */ - /* Magic Mirror * Logger + * This logger is very simple, but needs to be extended. + * This system can eventually be used to push the log messages to an external target. * * By Michael Teeuw https://michaelteeuw.nl * MIT Licensed. */ - -// This logger is very simple, but needs to be extended. -// This system can eventually be used to push the log messages to an external target. - -var Log = (function() { +const Log = (function() { return { info: Function.prototype.bind.call(console.info, console), log: Function.prototype.bind.call(console.log, console), diff --git a/js/module.js b/js/module.js index 8619742b..6ac218bf 100644 --- a/js/module.js +++ b/js/module.js @@ -1,4 +1,4 @@ -/* global Class, Loader, MMSocket, nunjucks, Translator */ +/* global Class, cloneObject, Loader, MMSocket, nunjucks, Translator */ /* Magic Mirror * Module Blueprint. diff --git a/js/translator.js b/js/translator.js index 36034b47..1ebf9fbf 100644 --- a/js/translator.js +++ b/js/translator.js @@ -1,4 +1,4 @@ -/* exported Translator */ +/* global translations */ /* Magic Mirror * Translator (l10n) diff --git a/js/utils.js b/js/utils.js index bdd81e57..df11d0b2 100644 --- a/js/utils.js +++ b/js/utils.js @@ -1,12 +1,9 @@ -/* exported Utils */ - /* Magic Mirror * Utils * * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - var colors = require("colors/safe"); var Utils = { diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index a245e543..0f042051 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -1,4 +1,4 @@ -/* global Module */ +/* global cloneObject, Module */ /* Magic Mirror * Module: Calendar diff --git a/vendor/vendor.js b/vendor/vendor.js index fa2abd6f..7cc7d130 100755 --- a/vendor/vendor.js +++ b/vendor/vendor.js @@ -1,12 +1,9 @@ -/* exported vendor */ - /* Magic Mirror * Vendor File Definition * * By Michael Teeuw https://michaelteeuw.nl * MIT Licensed. */ - var vendor = { "moment.js" : "node_modules/moment/min/moment-with-locales.js", "moment-timezone.js" : "node_modules/moment-timezone/builds/moment-timezone-with-data.js",