Skip to content

Commit 5eeb50b

Browse files
refactor: narrow no-eval suppression to per-line instead of file-wide
1 parent 6fd670e commit 5eeb50b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

MMM-CalendarExt2.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable no-eval */
21
/* global Module Scene config dayjs */
32

43
Module.register("MMM-CalendarExt2", {
@@ -338,14 +337,17 @@ Module.register("MMM-CalendarExt2", {
338337
};
339338

340339
if (typeof this.config.firstDrawingDelay === "string") {
340+
// eslint-disable-next-line no-eval
341341
this.config.firstDrawingDelay = eval(this.config.firstDrawingDelay);
342342
}
343343

344344
if (typeof this.config.updateInterval === "string") {
345+
// eslint-disable-next-line no-eval
345346
this.config.updateInterval = eval(this.config.updateInterval);
346347
}
347348

348349
if (typeof this.config.rotateInterval === "string") {
350+
// eslint-disable-next-line no-eval
349351
this.config.rotateInterval = eval(this.config.rotateInterval);
350352
}
351353

@@ -376,6 +378,7 @@ Module.register("MMM-CalendarExt2", {
376378
arrs[i].filter = JSON.stringify({filter: arrs[i].filter.toString()});
377379
}
378380
if (typeof arrs[i].scanInterval === "string") {
381+
// eslint-disable-next-line no-eval
379382
arrs[i].scanInterval = eval(arrs[i].scanInterval);
380383
}
381384
}

0 commit comments

Comments
 (0)