mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Replace prettier by stylistic to lint JavaScript (#3303)
In the latest versions of ESLint, more and more formatting rules were removed or declared deprecated. These rules have been integrated into the new Stylistic package (https://eslint.style/guide/why) and expanded. Stylistic acts as a better formatter for JavaScript as Prettier. With this PR there are many changes that make the code more uniform, but it may be difficult to review due to the large amount. Even if I have no worries about the changes, perhaps this would be something for the release after next. Let me know what you think.
This commit is contained in:
committed by
GitHub
parent
4e7b68a69d
commit
0b70274a1a
@@ -7,6 +7,7 @@
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const Loader = (function () {
|
||||
|
||||
/* Create helper variables */
|
||||
|
||||
const loadedModuleFiles = [];
|
||||
@@ -196,10 +197,11 @@ const Loader = (function () {
|
||||
|
||||
/* Public Methods */
|
||||
return {
|
||||
|
||||
/**
|
||||
* Load all modules as defined in the config.
|
||||
*/
|
||||
loadModules: async function () {
|
||||
async loadModules () {
|
||||
let moduleData = getModuleData();
|
||||
|
||||
/**
|
||||
@@ -230,7 +232,7 @@ const Loader = (function () {
|
||||
* @param {Module} module The module that calls the loadFile function.
|
||||
* @returns {Promise} resolved when the file is loaded
|
||||
*/
|
||||
loadFileForModule: async function (fileName, module) {
|
||||
async loadFileForModule (fileName, module) {
|
||||
if (loadedFiles.indexOf(fileName.toLowerCase()) !== -1) {
|
||||
Log.log(`File already loaded: ${fileName}`);
|
||||
return;
|
||||
@@ -256,4 +258,4 @@ const Loader = (function () {
|
||||
return loadFile(module.file(fileName));
|
||||
}
|
||||
};
|
||||
})();
|
||||
}());
|
||||
|
Reference in New Issue
Block a user