mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 03:39:55 +00:00
We have used it inconsistently till now. Template literals are more modern and easier to maintain in my opinion. Because that's a large amount of changes, here's a way to reproduce it: I added the rule `"prefer-template": "error"` to the `.eslintrc.json` and did an autofix. Since this caused a new problem in line 409 of `newsfeed.js`, I reversed it in that line and also removed the rule from the eslint config file. The rule is described here: https://eslint.org/docs/latest/rules/prefer-template Note: I've played around with some other linter rules as well, and some seem to point to some specific, non-cosmetic, issues. But before I dive even deeper and then introduce even bigger and hardly understandable changes at once, I thought I'd start with this simple cosmetic rule.
29 lines
874 B
JavaScript
29 lines
874 B
JavaScript
/* MagicMirror² Test config for position setters module using the helloworld module
|
|
*
|
|
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
|
* MIT Licensed.
|
|
*/
|
|
let config = {
|
|
modules:
|
|
// Using exotic content. This is why don't accept go to JSON configuration file
|
|
(() => {
|
|
let positions = ["top_bar", "top_left", "top_center", "top_right", "upper_third", "middle_center", "lower_third", "bottom_left", "bottom_center", "bottom_right", "bottom_bar", "fullscreen_above", "fullscreen_below"];
|
|
let modules = Array();
|
|
for (let idx in positions) {
|
|
modules.push({
|
|
module: "helloworld",
|
|
position: positions[idx],
|
|
config: {
|
|
text: `Text in ${positions[idx]}`
|
|
}
|
|
});
|
|
}
|
|
return modules;
|
|
})()
|
|
};
|
|
|
|
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
|
if (typeof module !== "undefined") {
|
|
module.exports = config;
|
|
}
|