chore: update ESLint and plugins, simplify config, apply new rules#4052
Merged
sdetweil merged 4 commits intoMagicMirrorOrg:developfrom Mar 7, 2026
Merged
chore: update ESLint and plugins, simplify config, apply new rules#4052sdetweil merged 4 commits intoMagicMirrorOrg:developfrom
sdetweil merged 4 commits intoMagicMirrorOrg:developfrom
Conversation
- Remove explicit `plugins: {}` registrations; direct config objects
(e.g. `js.configs.recommended`) already register their plugin internally
- Use named import for eslint-plugin-package-json to resolve
`import-x/no-named-as-default-member` warning
- Disable `playwright/no-duplicate-hooks` for e2e tests: plain
`beforeAll()`/`afterAll()` calls (Vitest style) trigger false positives
because the rule only handles `test.beforeAll()` member-expression style
Collaborator
|
So, how much AI did you use on this and the bug report? |
Collaborator
Author
None for the PR - just Deepl translate for some wording. For the bug report I used AI, I described in German the problem I saw and had the text formulated. On the result I did some fine-tuning and code snippets. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates ESLint and the ESLint plugins to their latest versions and takes advantage of the new versions to simplify the config.
The main cleanup: removed all explicit
plugins: {}registrations fromeslint.config.mjs. When passing direct config objects likejs.configs.recommended, the plugin registration is already included – we were just doing it twice.Two lint warnings are also fixed:
eslint-plugin-package-json(named vs. default)playwright/no-duplicate-hooksis disabled for e2e tests – the rule doesn't handle plainbeforeAll()/afterAll()(Vitest style) correctly and produces false positives. I've created an issue for that:no-duplicate-hooks: plain hook calls (e.g.beforeAll()) all share the same empty string key, causing false positives mskelton/eslint-plugin-playwright#443.Built-in Node.js imports were manually updated to use the
node:prefix (e.g.require("fs")→require("node:fs")). Minor formatting fixes were applied automatically byeslint --fix.