Adding date to the clock module when displayType is "analog" and
"showDate" is true. The setting in analogShowDate is respected.
Fixes#3100
---------
Co-authored-by: Michael Teeuw <michael@xonaymedia.nl>
Co-authored-by: Veeck <github@veeck.de>
- order (external first)
- remove superfluous file extensions
- new line after imports
- deconstruct (only one time (in `check_config.js`))
- fix path (only one time (in `global-setup.js`))
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.
1. Update `stylelint` dependencies
- As of stylelint v15, we do not need `stylelint-config-prettier`
anymore:
https://github.com/prettier/stylelint-config-prettier/releases/tag/v9.0.5
2. Switch to `stylelint-config-standard`:
`stylelint-prettier/recommended` has not been updated for a long time
and still needs the old `stylelint-config-prettier`
3. Handle new `stylelint` issues
When trying to debug why the tests broke for
https://github.com/MichMich/MagicMirror/pull/2946 I found that the tests
does not wait for the app to start and close. So if the startup isn't
blocking that would fail.
So I added a callback for `close()` too and converted them to promises
for the `startApplication()` and `stopApplication()` and updated all the
e2e tests to await both. Will try to refactor all these callbacks to
promises in a later PR.
- separated tests into e2e and unit directories
- created configs directory structure to support test framework
- added/modified `npm run test`, `npm run test:unit` and `npm run test:e2e` to target all, unit and e2e tests respectively
- modified some of the test names to be more descriptive
New structure of the Test Suite has following directory tree:
```
tests
├── configs
│ ├── env.js
│ └── modules
│ ├── clock
│ │ ├── clock_12hr.js
│ │ ├── clock_24hr.js
│ │ └── clock_showPeriodUpper.js
│ └── helloworld
│ └── helloworld.js
├── e2e
│ ├── env_spec.js
│ └── modules
│ ├── clock_spec.js
│ └── helloworld_spec.js
└── unit
├── functions
│ └── cmp_versions_spec.js
└── global_vars
└── root_path_spec.js
```