Kristjan ESPERANTO d81386f3d9 chore: use prettier --write --ignore-unknown in lint-staged to avoid errors on unsupported files (#3888)
This prevents `prettier` from failing when `lint-staged` passes
unknown/binary files, making the pre-commit hook more robust.

In concrete terms this could happen, when we, for example, add a new PNG
file. Since we rarely do this, it has not been noticed so far.

This is recommended when using asterisk:
https://github.com/lint-staged/lint-staged#automatically-fix-code-style-with-prettier-for-any-format-prettier-supports

## before

```bash
$ npx lint-staged <-- after staging a new PNG file
✔ Backed up original state in git stash (c3247d4b)
✔ Hiding unstaged changes to partially staged files...
⚠ Running tasks for staged files...
  ❯ package.json — 2 files
    ❯ * — 2 files
      ✖ prettier --write [FAILED]
    ↓ *.js — no files
    ↓ *.css — no files
↓ Skipped because of errors from tasks.
↓ Skipped because of errors from tasks.
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...

✖ prettier --write:
[error] No parser could be inferred for file "~/MagicMirror/test.png".
...
```

## after

```bash
$ npx lint-staged <-- after staging a new PNG file
✔ Backed up original state in git stash (0c3fe285)
✔ Running tasks for staged files...
✔ Applying modifications from tasks...
✔ Cleaning up temporary files...
```
2025-09-11 18:34:08 +02:00
2025-01-01 08:27:27 -06:00
2025-04-01 20:11:02 +02:00
2025-01-01 08:27:27 -06:00
2025-07-01 00:10:47 +02:00
2025-04-01 20:11:02 +02:00
2025-09-11 13:08:56 +02:00
2025-07-01 00:10:47 +02:00
2023-07-01 21:17:31 +02:00
2025-07-01 00:10:47 +02:00
2025-01-01 08:27:27 -06:00
2024-04-01 22:03:20 +02:00
2024-10-01 00:02:17 +02:00
2025-07-01 00:10:47 +02:00
2025-07-01 00:10:47 +02:00
2020-05-11 22:22:32 +02:00
2025-04-01 20:11:02 +02:00
2024-04-01 22:03:20 +02:00
2023-10-01 20:13:41 +02:00
2025-01-01 08:27:27 -06:00
2025-07-01 00:10:47 +02:00

MagicMirror²: The open source modular smart mirror platform.

License GitHub Actions Build Status GitHub Stars

MagicMirror² is an open source modular smart mirror platform. With a growing list of installable modules, the MagicMirror² allows you to convert your hallway or bathroom mirror into your personal assistant. MagicMirror² is built by the creator of the original MagicMirror with the incredible help of a growing community of contributors.

MagicMirror² focuses on a modular plugin system and uses Electron as an application wrapper. So no more web server or browser installs necessary!

Documentation

For the full documentation including installation instructions, please visit our dedicated documentation website: https://docs.magicmirror.builders.

Contributing Guidelines

Contributions of all kinds are welcome, not only in the form of code but also with regards to

  • bug reports
  • documentation
  • translations

For the full contribution guidelines, check out: https://docs.magicmirror.builders/about/contributing.html

Enjoying MagicMirror? Consider a donation!

MagicMirror² is Open Source and free. That doesn't mean we don't need any money.

Please consider a donation to help us cover the ongoing costs like webservers and email services. If we receive enough donations we might even be able to free up some working hours and spend some extra time improving the MagicMirror² core.

To donate, please follow this link.

MagPi Top 50

Description
MagicMirror² is an open source modular smart mirror platform. With a growing list of installable modules, the MagicMirror² allows you to convert your hallway or bathroom mirror into your personal assistant.
Readme 55 MiB
Languages
JavaScript 88.7%
CSS 8.1%
Nunjucks 2.6%
HTML 0.5%
TypeScript 0.1%