Run eslint over files, see what gets fixed automatically and clean up

This commit is contained in:
rejas
2020-07-27 14:24:30 +02:00
parent f4eae72c48
commit 43bcf4ab98
11 changed files with 72 additions and 24 deletions

View File

@@ -13,6 +13,9 @@
(function (window) {
/**
* extend obj function
*
* @param a
* @param b
*/
function extend(a, b) {
for (let key in b) {
@@ -25,6 +28,8 @@
/**
* NotificationFx function
*
* @param options
*/
function NotificationFx(options) {
this.options = extend({}, this.options);

View File

@@ -556,12 +556,11 @@ Module.register("calendar", {
},
/**
* symbolsForEvent(event)
* Retrieves the symbols for a specific event.
*
* argument event object - Event to look for.
* @param {object} event Event to look for.
*
* return array - The Symbols
* @returns {*} array The Symbols
*/
symbolsForEvent: function (event) {
let symbols = this.getCalendarPropertyAsArray(event.url, "symbol", this.config.defaultSymbol);

View File

@@ -152,6 +152,10 @@ Module.register("clock", {
timeWrapper.appendChild(periodWrapper);
}
/**
* @param config
* @param time
*/
function formatTime(config, time) {
var formatString = hourSymbol + ":mm";
if (config.showPeriod && config.timeFormat !== 24) {

View File

@@ -119,6 +119,9 @@ WeatherProvider.providers = [];
/**
* Static method to register a new weather provider.
*
* @param providerIdentifier
* @param providerDetails
*/
WeatherProvider.register = function (providerIdentifier, providerDetails) {
WeatherProvider.providers[providerIdentifier.toLowerCase()] = WeatherProvider.extend(providerDetails);
@@ -126,6 +129,9 @@ WeatherProvider.register = function (providerIdentifier, providerDetails) {
/**
* Static method to initialize a new weather provider.
*
* @param providerIdentifier
* @param delegate
*/
WeatherProvider.initialize = function (providerIdentifier, delegate) {
providerIdentifier = providerIdentifier.toLowerCase();