Skip to content

Commit 1f2d1b9

Browse files
authored
update jsdoc and other deps (#3896)
other cosmetic code changes because of new `eslint-plugin-jsdoc` version v60
1 parent fbca0a0 commit 1f2d1b9

File tree

11 files changed

+6825
-8019
lines changed

11 files changed

+6825
-8019
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Thanks to: @dathbe.
4545
### Updated
4646

4747
- [calendar] Update defaultSymbol name and also the link to the icon search site (#3879)
48-
- [core] Update dependencies including electron to v38 as well as github actions (#3831, #3849, #3857, #3858, #3872, #3876, #3882, #3891)
48+
- [core] Update dependencies including electron to v38 as well as github actions (#3831, #3849, #3857, #3858, #3872, #3876, #3882, #3891, #3896)
4949
- [weather] Update feels_like temperature calculation formula (#3869)
5050
- [weather] Update null value handling for weather type (#3892)
5151
- [layout] Update styles for weather and calendar (#3894)

js/main.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const MM = (function () {
9090
/**
9191
* Send a notification to all modules.
9292
* @param {string} notification The identifier of the notification.
93-
* @param {*} payload The payload of the notification.
93+
* @param {object} payload The payload of the notification.
9494
* @param {Module} sender The module that sent the notification.
9595
* @param {Module} [sendTo] The (optional) module to send the notification to.
9696
*/
@@ -262,7 +262,7 @@ const MM = (function () {
262262
* Hide the module.
263263
* @param {Module} module The module to hide.
264264
* @param {number} speed The speed of the hide animation.
265-
* @param {Function} callback Called when the animation is done.
265+
* @param {Promise} callback Called when the animation is done.
266266
* @param {object} [options] Optional settings for the hide method.
267267
*/
268268
const hideModule = function (module, speed, callback, options = {}) {
@@ -347,7 +347,7 @@ const MM = (function () {
347347
* Show the module.
348348
* @param {Module} module The module to show.
349349
* @param {number} speed The speed of the show animation.
350-
* @param {Function} callback Called when the animation is done.
350+
* @param {Promise} callback Called when the animation is done.
351351
* @param {object} [options] Optional settings for the show method.
352352
*/
353353
const showModule = function (module, speed, callback, options = {}) {
@@ -552,7 +552,7 @@ const MM = (function () {
552552

553553
/**
554554
* Walks thru a collection of modules and executes the callback with the module as an argument.
555-
* @param {Function} callback The function to execute with the module as an argument.
555+
* @param {module} callback The function to execute with the module as an argument.
556556
*/
557557
const enumerate = function (callback) {
558558
modules.map(function (module) {
@@ -629,7 +629,7 @@ const MM = (function () {
629629
/**
630630
* Send a notification to all modules.
631631
* @param {string} notification The identifier of the notification.
632-
* @param {*} payload The payload of the notification.
632+
* @param {object} payload The payload of the notification.
633633
* @param {Module} sender The module that sent the notification.
634634
*/
635635
sendNotification (notification, payload, sender) {
@@ -688,7 +688,7 @@ const MM = (function () {
688688
* Hide the module.
689689
* @param {Module} module The module to hide.
690690
* @param {number} speed The speed of the hide animation.
691-
* @param {Function} callback Called when the animation is done.
691+
* @param {Promise} callback Called when the animation is done.
692692
* @param {object} [options] Optional settings for the hide method.
693693
*/
694694
hideModule (module, speed, callback, options) {
@@ -700,7 +700,7 @@ const MM = (function () {
700700
* Show the module.
701701
* @param {Module} module The module to show.
702702
* @param {number} speed The speed of the show animation.
703-
* @param {Function} callback Called when the animation is done.
703+
* @param {Promise} callback Called when the animation is done.
704704
* @param {object} [options] Optional settings for the show method.
705705
*/
706706
showModule (module, speed, callback, options) {

js/module.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const Module = Class.extend({
6868
* Returns a map of translation files the module requires to be loaded.
6969
*
7070
* return Map<String, String> -
71-
* @returns {*} A map with langKeys and filenames.
71+
* @returns {Map} A map with langKeys and filenames.
7272
*/
7373
getTranslations () {
7474
return false;
@@ -140,7 +140,7 @@ const Module = Class.extend({
140140
/**
141141
* Called by the MagicMirror² core when a notification arrives.
142142
* @param {string} notification The identifier of the notification.
143-
* @param {*} payload The payload of the notification.
143+
* @param {object} payload The payload of the notification.
144144
* @param {Module} sender The module that sent the notification.
145145
*/
146146
notificationReceived (notification, payload, sender) {
@@ -176,7 +176,7 @@ const Module = Class.extend({
176176
/**
177177
* Called when a socket notification arrives.
178178
* @param {string} notification The identifier of the notification.
179-
* @param {*} payload The payload of the notification.
179+
* @param {object} payload The payload of the notification.
180180
*/
181181
socketNotificationReceived (notification, payload) {
182182
Log.log(`${this.name} received a socket notification: ${notification} - Payload: ${payload}`);
@@ -344,7 +344,7 @@ const Module = Class.extend({
344344
/**
345345
* Send a notification to all modules.
346346
* @param {string} notification The identifier of the notification.
347-
* @param {*} payload The payload of the notification.
347+
* @param {object} payload The payload of the notification.
348348
*/
349349
sendNotification (notification, payload) {
350350
MM.sendNotification(notification, payload, this);
@@ -353,7 +353,7 @@ const Module = Class.extend({
353353
/**
354354
* Send a socket notification to the node helper.
355355
* @param {string} notification The identifier of the notification.
356-
* @param {*} payload The payload of the notification.
356+
* @param {object} payload The payload of the notification.
357357
*/
358358
sendSocketNotification (notification, payload) {
359359
this.socket().sendNotification(notification, payload);
@@ -362,7 +362,7 @@ const Module = Class.extend({
362362
/**
363363
* Hide this module.
364364
* @param {number} speed The speed of the hide animation.
365-
* @param {Function} callback Called when the animation is done.
365+
* @param {Promise} callback Called when the animation is done.
366366
* @param {object} [options] Optional settings for the hide method.
367367
*/
368368
hide (speed, callback, options = {}) {
@@ -389,7 +389,7 @@ const Module = Class.extend({
389389
/**
390390
* Show this module.
391391
* @param {number} speed The speed of the show animation.
392-
* @param {Function} callback Called when the animation is done.
392+
* @param {Promise} callback Called when the animation is done.
393393
* @param {object} [options] Optional settings for the show method.
394394
*/
395395
show (speed, callback, options) {

js/module_functions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Schedule the timer for the next update
33
* @param {object} timer The timer of the module
44
* @param {bigint} intervalMS interval in milliseconds
5-
* @param {Function} callback function to call when the timer expires
5+
* @param {Promise} callback function to call when the timer expires
66
*/
77
const scheduleTimer = function (timer, intervalMS, callback) {
88
if (process.env.JEST_WORKER_ID === undefined) {

js/node_helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const NodeHelper = Class.extend({
2727
/**
2828
* This method is called when a socket notification arrives.
2929
* @param {string} notification The identifier of the notification.
30-
* @param {*} payload The payload of the notification.
30+
* @param {object} payload The payload of the notification.
3131
*/
3232
socketNotificationReceived (notification, payload) {
3333
Log.log(`${this.name} received a socket notification: ${notification} - Payload: ${payload}`);

modules/default/calendar/calendar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ Module.register("calendar", {
876876
* @param {string} url The calendar url
877877
* @param {string} property The property to look for
878878
* @param {string} defaultValue The value if the property is not found
879-
* @returns {*} The property
879+
* @returns {property} The property
880880
*/
881881
getCalendarProperty (url, property, defaultValue) {
882882
for (const calendar of this.config.calendars) {

modules/default/calendar/calendarfetcher.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
9797

9898
/**
9999
* Sets the on success callback
100-
* @param {Function} callback The on success callback.
100+
* @param {eventsReceivedCallback} callback The on success callback.
101101
*/
102102
this.onReceive = function (callback) {
103103
eventsReceivedCallback = callback;
104104
};
105105

106106
/**
107107
* Sets the on error callback
108-
* @param {Function} callback The on error callback.
108+
* @param {fetchFailedCallback} callback The on error callback.
109109
*/
110110
this.onError = function (callback) {
111111
fetchFailedCallback = callback;

modules/default/newsfeed/newsfeed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Module.register("newsfeed", {
181181
* Gets a feed property by name
182182
* @param {object} feed A feed object.
183183
* @param {string} property The name of the property.
184-
* @returns {*} The value of the specified property for the feed.
184+
* @returns {property} The value of the specified property for the feed.
185185
*/
186186
getFeedProperty (feed, property) {
187187
let res = this.config[property];

modules/default/weather/providers/smhi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ WeatherProvider.register("smhi", {
254254
* Helper method to get a property from the returned data set.
255255
* @param {object} currentWeatherData Weatherdata to get from
256256
* @param {string} name The name of the property
257-
* @returns {*} The value of the property in the weatherdata
257+
* @returns {string} The value of the property in the weatherdata
258258
*/
259259
paramValue (currentWeatherData, name) {
260260
return currentWeatherData.parameters.filter((p) => p.name === name).flatMap((p) => p.values)[0];

0 commit comments

Comments
 (0)