[linter] Enable ESLint rule no-console (#3810)

In PR #3806 I noticed that ESLint did not complain about the use of
`console`. Then I realised that the rule `no-console` was not activated.
I have now changed this and replaced a few places where `console` was
used.

We can't apply the rule to all .js files because not all of them use our
logger. Therefore I had to add an extra config block for it.
This commit is contained in:
Kristjan ESPERANTO
2025-06-09 16:43:45 +02:00
committed by GitHub
parent 2194ffd929
commit 6501aabd2d
5 changed files with 14 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ module.exports = {
fs.writeFileSync(discoveredPositionsJSFilename, `const modulePositions=${JSON.stringify(modulePositions)}`);
}
catch (error) {
console.error("unable to write js/positions.js with the discovered module positions\nmake the MagicMirror/js folder writeable by the user starting MagicMirror");
Log.error("unable to write js/positions.js with the discovered module positions\nmake the MagicMirror/js folder writeable by the user starting MagicMirror");
}
}
// return the list to the caller