Skip to content

Commit 669f972

Browse files
committed
replace console with Log in calendar debug.js to avoid exception in eslint config
1 parent 02e76da commit 669f972

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Thanks to: @dathbe.
2020
- [refactor] Add new file `js/module_functions.js` to move code used in several modules to one place (#3837)
2121
- [tests] refactor: simplify jest config file (#3844)
2222
- [tests] refactor: extract constants for weather electron tests (#3845)
23+
- [tests] replace `console` with `Log` in calendar `debug.js` to avoid exception in eslint config (#3846)
2324

2425
### Updated
2526

eslint.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ export default defineConfig([
8888
files: ["**/*.js"],
8989
ignores: [
9090
"clientonly/index.js",
91-
"modules/default/calendar/debug.js",
9291
"js/logger.js",
9392
"tests/**/*.js"
9493
],

modules/default/calendar/debug.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
// Alias modules mentioned in package.js under _moduleAliases.
77
require("module-alias/register");
8+
const Log = require("../../../js/logger");
89

910
const CalendarFetcher = require("./calendarfetcher");
1011

@@ -20,22 +21,22 @@ const auth = {
2021
pass: pass
2122
};
2223

23-
console.log("Create fetcher ...");
24+
Log.log("Create fetcher ...");
2425

2526
const fetcher = new CalendarFetcher(url, fetchInterval, [], maximumEntries, maximumNumberOfDays, auth);
2627

2728
fetcher.onReceive(function (fetcher) {
28-
console.log(fetcher.events());
29-
console.log("------------------------------------------------------------");
29+
Log.log(fetcher.events());
30+
Log.log("------------------------------------------------------------");
3031
process.exit(0);
3132
});
3233

3334
fetcher.onError(function (fetcher, error) {
34-
console.log("Fetcher error:");
35-
console.log(error);
35+
Log.log("Fetcher error:");
36+
Log.log(error);
3637
process.exit(1);
3738
});
3839

3940
fetcher.startFetch();
4041

41-
console.log("Create fetcher done! ");
42+
Log.log("Create fetcher done! ");

0 commit comments

Comments
 (0)