chore: upgrade ESLint to v10 and fix newly surfaced issues#4057
Merged
rejas merged 4 commits intoMagicMirrorOrg:developfrom Mar 12, 2026
Merged
chore: upgrade ESLint to v10 and fix newly surfaced issues#4057rejas merged 4 commits intoMagicMirrorOrg:developfrom
rejas merged 4 commits intoMagicMirrorOrg:developfrom
Conversation
Remove useless initial values from several `let` declarations across weather providers, http_fetcher and weatherutils, and move maxEntries/maxEntriesLimit into the if-block where they're actually used. Also drop `Translator` from the `/* global */` comments in main.js and module.js since ESLint already treats it as a built-in.
openmeteo never reads this.config.maxEntries anywhere. The default is already set in weather.js for all providers, so the one in the openmeteo constructor was just a duplicate.
rejas
approved these changes
Mar 12, 2026
Collaborator
|
We have a problem introduced with this PR or #4056 Tested a fresh install of docker run --rm -it node:25-alpine sh
cd
apk add git
git clone -b develop https://github.com/MagicMirrorOrg/MagicMirror.git
cd MagicMirror/
node --run install-mm
node --run server
node:internal/modules/cjs/loader:1478
throw err;
^
Error: Cannot find module 'globals'
Require stack:
- /root/MagicMirror/js/utils.js
- /root/MagicMirror/js/app.js
- /root/MagicMirror/serveronly/index.js
at Module.<anonymous> (node:internal/modules/cjs/loader:1475:15)
at Module._resolveFilename (/root/MagicMirror/js/alias-resolver.js:28:30)
at wrapResolveFilename (node:internal/modules/cjs/loader:1048:27)
at defaultResolveImplForCJSLoading (node:internal/modules/cjs/loader:1072:10)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1093:12)
at Module._load (node:internal/modules/cjs/loader:1261:25)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at Module.require (node:internal/modules/cjs/loader:1575:12)
at require (node:internal/modules/helpers:191:16)
at Object.<anonymous> (/root/MagicMirror/js/utils.js:12:17) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/root/MagicMirror/js/utils.js',
'/root/MagicMirror/js/app.js',
'/root/MagicMirror/serveronly/index.js'
]
}
Node.js v25.8.1If I run Any idea to this @KristjanESPERANTO ? |
Collaborator
Author
|
Try 'npm Install globals'. I'm not at my computer for some hours. |
Collaborator
|
Thanks, that works. Was already preparing a PR for new electron version, will add |
rejas
pushed a commit
that referenced
this pull request
Mar 12, 2026
- update to electron v41 - update other deps - add missing `globals` dep, see #4057 (comment)
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.
eslint-plugin-import-xwas the last thing blocking the ESLint v10 upgrade - it just got v10 support. So here we go.The upgrade itself is tiny. The rest of the diff is cleanup from issues ESLint v10 now catches: a few
letdeclarations with initial values that were immediately overwritten anyway (no-useless-assignment), andTranslatorlisted in/* global */inmain.jsandmodule.js.Working through those
no-useless-assignmentwarnings also surfaced a dead default inopenmeteo:maxEntries: 5in the constructor, which was never actually doing anything -openmeteonever readsthis.config.maxEntriesanywhere. Andweather.jsalready sets that default for all providers, so it was just a redundant duplicate. Removed that too.No runtime behavior changes.