Skip to content

Commit 4e7b68a

Browse files
Remove some unused variables (#3301)
I have noticed unused variables that seem superfluous.
1 parent 786ea86 commit 4e7b68a

File tree

6 files changed

+4
-7
lines changed

6 files changed

+4
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ _This release is scheduled to be released on 2024-01-01._
2121
- Removed Codecov workflow (not working anymore, other workflow required) (#3107)
2222
- Removed titleReplace from calendar, replaced + extended by customEvents (backward compatibility included) (#3249)
2323
- Removed failing unit test (#3254)
24+
- Removed some unused variables
2425

2526
### Updated
2627

js/logger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
logLevel.setLogLevel = function (newLevel) {
5252
if (newLevel) {
53-
Object.keys(logLevel).forEach(function (key, index) {
53+
Object.keys(logLevel).forEach(function (key) {
5454
if (!newLevel.includes(key.toLocaleUpperCase())) {
5555
logLevel[key] = function () {};
5656
}

modules/default/calendar/calendar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* global CalendarUtils, cloneObject */
1+
/* global CalendarUtils */
22

33
/* MagicMirror²
44
* Module: Calendar

modules/default/calendar/calendarfetcherutils.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ const CalendarFetcherUtils = {
248248

249249
if (typeof event.rrule !== "undefined" && event.rrule !== null && !isFacebookBirthday) {
250250
const rule = event.rrule;
251-
let addedEvents = 0;
252251

253252
const pastMoment = moment(past);
254253
const futureMoment = moment(future);
@@ -442,7 +441,6 @@ const CalendarFetcherUtils = {
442441

443442
if (showRecurrence === true) {
444443
Log.debug(`saving event: ${description}`);
445-
addedEvents++;
446444
newEvents.push({
447445
title: recurrenceTitle,
448446
startDate: (adjustDays ? (adjustDays > 0 ? startDate.add(adjustDays, "hours") : startDate.subtract(Math.abs(adjustDays), "hours")) : startDate).format("x"),

modules/default/weather/providers/openmeteo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ WeatherProvider.register("openmeteo", {
397397
generateWeatherObjectsFromForecast(weathers) {
398398
const days = [];
399399

400-
weathers.daily.forEach((weather, i) => {
400+
weathers.daily.forEach((weather) => {
401401
const currentWeather = new WeatherObject();
402402

403403
currentWeather.date = weather.time;

tests/e2e/serveronly_spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const helpers = require("./helpers/global-setup");
2-
31
const delay = (time) => {
42
return new Promise((resolve) => setTimeout(resolve, time));
53
};

0 commit comments

Comments
 (0)