35 Commits

Author SHA1 Message Date
Kristjan ESPERANTO
0b70274a1a
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.
2023-12-25 08:17:11 +01:00
Karsten Hassel
6ffdc7b55b
enable eslint jest/expect-expect and jest/no-done-callback (#3272)
follow up to https://github.com/MichMich/MagicMirror/pull/3270
2023-11-22 23:37:17 +01:00
Kristjan ESPERANTO
7098f1e41f
Enable and apply ESLint Jest rules (#3270)
Jest was in the plugin array of the ESLint configuration, but no rules
were enabled. So ESLint hasn't checked any Jest rules yet.

So I activated the recommended Jest rules and added a few more. Then I
fixed the issues (mostly automatically). I have deactivated the rules
"jest/expect-expect" and "jest/no-done-callback" for the time being, as
they would have entailed major changes. I didn't want to make the PR too
big.

I'm not a Jest expert, but the changes so far look good to me. What do
you think of that @khassel? 🙂
2023-11-20 20:11:41 +01:00
Karsten Hassel
0e2da630d5
fix cloneObject() function to respect RegExp (#3240)
fixes #3237
2023-10-19 22:31:02 +02:00
Kristjan ESPERANTO
5f38c53260
Revise require imports (#3071)
- 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`))
2023-03-22 23:53:10 +01:00
Kristjan ESPERANTO
ab0876f07a
Update Eslint config, add new rule and handle issue (#3068) 2023-03-20 22:18:58 +01:00
Veeck
2b792cdbb8
Convert translator callbacks to async/await (#3048)
Co-authored-by: veeck <michael@veeck.de>
2023-02-21 22:58:18 +01:00
Veeck
a328ce537f
Cleanup test directory (#2937)
Moves files around and renames some so that the structure is cleaner and
more consistent
2022-10-07 12:16:37 -05:00
Karsten Hassel
f04d578704
improve tests (#2923)
use es6 syntax in all tests, split weather tests, remove callbacks
2022-10-04 10:15:24 +02:00
rejas
f84f590f1d Start filling last gaps of jsdoc 2021-08-03 08:25:57 +02:00
veeck
39aa2dfe01 Run linter over all files again 2021-07-14 10:41:29 +02:00
karsten13
1a244726aa run prettier 2021-06-11 22:24:21 +02:00
Karsten Hassel
0e14d3d6e8 snapshot e2e 2021-06-09 00:19:43 +02:00
Karsten Hassel
16bbb42b8d remove chai from unit tests 2021-06-08 00:47:15 +02:00
Karsten Hassel
66759a33fa unit tests 2021-06-07 00:16:53 +02:00
rejas
d736dd92be Use es6 notation in tests 2021-04-18 14:51:28 +02:00
Jake Mulley
a6386bd60e
Update npm packages and resolve package changes 2020-11-08 21:18:19 +00:00
rejas
2d7c5a827f Cleanup test expectation 2020-07-09 20:44:52 +02:00
Veeck
85c32ef843 Use const in test requires 2020-07-09 20:30:43 +02:00
rejas
dc089d7db9 Remove stripCommentsFromJson code and test
Since we dont allow comments in the json anymore anyway
2020-07-09 20:30:26 +02:00
Veeck
abb5dc5739 Run prettier over ALL files once
No other changes done in this commit
2020-05-11 22:22:32 +02:00
rejas
702b98f510 Cleanup imports 2019-06-04 10:43:06 +02:00
fewieden
38f7716738 linting 2018-02-17 09:20:34 +01:00
fewieden
3ccdb64833 deprecated unit tests 2018-02-16 22:09:15 +01:00
fewieden
78d8bff599 clone array, clone nested object, add safe checks for objects (memory address) 2018-02-16 19:58:28 +01:00
fewieden
a756fed70b fixed and reenabled lockstring test 2018-02-16 08:43:27 +01:00
fewieden
3e2a1e3548 linting 2018-02-16 00:08:11 +01:00
fewieden
96b2f2b3a4 clone object unit test 2018-02-16 00:01:02 +01:00
fewieden
d709a44960 strip comments unit test 2018-02-13 07:17:46 +01:00
fewieden
d775bc9d7e loadCoreTranslationsFallback unit test 2018-02-11 09:08:09 +01:00
fewieden
ad3eac9ddb loadcoretransations unit test 2018-02-11 08:58:02 +01:00
fewieden
26be14ba67 load unit test 2018-02-10 20:33:22 +01:00
fewieden
305d60e09b translator unit tests 2018-02-10 12:32:43 +01:00
fewieden
d0029efd02 utils unit tests 2018-02-10 12:30:33 +01:00
fewieden
fb4d42bf5b moved test 2018-02-10 12:28:30 +01:00