diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a1da1d9..7c6170f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ planned for 2026-01-01 - [ci] Add concurrency to automated tests workflow to cancel outdated runs (#3943) - [tests] replace `node-libgpiod` with `serialport` in electron-rebuild workflow (#3945) - [calendar] hide repeatingCountTitle if the event count is zero (#3949) +- [core] configure cspell to check default modules only and fix typos (#3955) ### Fixed diff --git a/cspell.config.json b/cspell.config.json index 35442b2f..109eb777 100644 --- a/cspell.config.json +++ b/cspell.config.json @@ -3,19 +3,25 @@ "language": "en", "words": [ "aarch", + "Adak", "Alvinger", "Ampio", "andrezibaia", "angeldeejay", + "apikey", "apiontek", "armv", "ashishtank", "autoplay", + "Autorestart", "beada", + "Behaviour", "Binney", "bluemanos", "bnitkin", "bokmål", + "bouncyflip", + "boxspinner", "Brasileiro", "Brento", "browserwindow", @@ -25,14 +31,22 @@ "bugsounet", "buxxi", "byday", + "calcage", + "calendarfetcher", "calendarfetcherutils", "calendarutils", + "calevents", "chamakura", + "Citypage", "cjbrunner", + "clearsky", "clientonly", "clockfaces", + "cloudcover", "cmdline", "codac", + "Codrops", + "cornerexpand", "Crazylegstoo", "crazyscot", "Creepin", @@ -43,14 +57,23 @@ "Cymraeg", "dariom", "darksky", + "dataheaders", + "Datamart", "dateheader", "dateheaders", + "datekey", "dathbe", "davide", "DAYAFTERTOMORROW", "DAYBEFOREYESTERDAY", "defaultmodules", + "Deificit", + "Descr", + "dewpoint", "dgoth", + "difflink", + "dismissttl", + "Displayer", "dkallen", "drivelist", "DTEND", @@ -63,18 +86,26 @@ "Edgardos", "Ekristoffe", "elec", + "elif", "eltociear", + "endfor", + "endmacro", "envcanada", "envsub", "envsubst", "eouia", + "Evapotranspration", "exdate", + "exdates", "expectedheaders", + "exploader", "ezeholz", + "Fadesteps", "Faizan", "feedme", "feelslike", "Fenner", + "Feuchte", "fewieden", "fixuppm", "flopp", @@ -83,7 +114,9 @@ "forecastweather", "fortawesome", "frameguard", + "freezinglevel", "Frysk", + "fullarticle", "fulldate", "fullday", "fullscreen", @@ -92,9 +125,19 @@ "GHSA", "ghsas", "grenagit", + "Halfclear", + "heavyrain", + "heavyrainandthunder", + "heavyrainshowers", + "heavyrainshowersandthunder", + "heavysleet", + "heavysleetshowersandthunder", + "heavysnow", + "heavysnowandthunder", "Heiko", "Hirschberger", "hourlyweather", + "humidex", "Hwind", "ical", "illimarkangur", @@ -123,15 +166,18 @@ "Knapoc", "Koepke", "kolbyjack", + "Komplex", "krekos", "Kristjan", "krukle", "labwc", "Landis", "larryare", + "Lastberechnung", "letsencrypt", "libgpiod", "Lightspeed", + "loadingcircle", "locationforecast", "lockstring", "lstrip", @@ -159,9 +205,12 @@ "Ñandú", "nathannaveen", "naveensrinivasan", + "nbsp", "ndom", "Nerfzooka", "NEWSFEED", + "newsfeedfetcher", + "newsfetcher", "newsitems", "nfogal", "njwilliams", @@ -170,42 +219,61 @@ "nunjuck", "odroid", "oemel", + "oldconfig", "onecall", "onevent", "openmeteo", + "openmeto", "openweathermap", "oraclesean", "oscarb", + "pcat", "philnagel", + "pirateweather", + "plained", "plebcity", + "pmax", + "pmean", + "pmedian", + "pmin", "Português", "PRECIP", "Problema", "psieg", + "pubdate", "radokristof", "rajniszp", "rebuilded", "Reis", "rejas", + "relativehumidity", "Resig", "roboto", "rohitdharavath", "Rosso", + "Rothfusz", "rrule", "savvadam", "sdetweil", + "searchstr", "sendheaders", "serveronly", "sexualized", + "Sitecode", "skpanagiotis", "SMHI", "Snille", + "snowandthunder", + "snowshowersandthunder", "socketclient", "socketio", "spectron", "Starinvest", + "stationid", + "STEADMAN", "sthuber", "Stieber", + "strinner", "stylelintrc", "subclassing", "sunaction", @@ -216,22 +284,36 @@ "tada", "taglist", "Teeuw", + "Teil", "TESTMODE", "thomasrockhu", + "thumbslider", + "timeformat", + "titlereplacestr", + "titlesearchstr", + "todaytemp", "tomzt", + "trunc", + "ttlms", "ukmetoffice", "ukmetofficedatahub", "unitless", + "unixtime", "unparseable", "updatenotification", + "uxdt", "Vaice", "veeck", + "verjaardag", "VEVENT", "vgtu", + "Vitest", "Voelt", + "Vorberechnung", "vppencilsharpener", "Wallys", "Weatherbit", + "weathercode", "WEATHERDATA", "Weatherflow", "weatherforecast", @@ -239,19 +321,37 @@ "weathericon", "weathericons", "weatherobject", + "weatherprovider", "weatherutils", + "webcal", + "winddirection", + "windgusts", "windspeed", "Woolridge", "worktree", + "Wsymb", "xlarge", + "xmark", "xrandr", "xsmall", "xsorifc", "xwindows", "xxxe", "Ybbet", + "yearmatch", "yearmatchgroup" ], - "ignorePaths": ["node_modules/**", "modules/**", "translations/**", "tests/mocks/**", "tests/e2e/modules/clock_es_spec.js", "css/roboto.css"], + "ignorePaths": [ + "css/roboto.css", + "node_modules/**", + "modules/!(default)/**", + "modules/default/**/translations/!(en).json", + "modules/default/calendar/windowsZones.json", + "modules/default/clock/faces/*.svg", + "modules/default/weather/providers/yr.js", + "tests/mocks/**", + "tests/e2e/modules/clock_es_spec.js", + "translations/**" + ], "dictionaries": ["node"] } diff --git a/modules/default/alert/notificationFx.js b/modules/default/alert/notificationFx.js index fcf7f345..a25f1bf6 100644 --- a/modules/default/alert/notificationFx.js +++ b/modules/default/alert/notificationFx.js @@ -59,7 +59,7 @@ // notice, warning, error, success // will add class ns-type-warning, ns-type-error or ns-type-success type: "notice", - // if the user doesn´t close the notification then we remove it + // if the user doesn't close the notification then we remove it // after the following time ttl: 6000, al_no: "ns-box", diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 05278c43..07a20697 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -411,7 +411,7 @@ Module.register("calendar", { timeWrapper.innerHTML = CalendarUtils.capFirst(eventStartDateMoment.format(this.config.dateFormat)); // Add end time if showEnd if (this.config.showEnd) { - // and has a duation + // and has a duration if (event.startDate !== event.endDate) { timeWrapper.innerHTML += "-"; timeWrapper.innerHTML += CalendarUtils.capFirst(eventEndDateMoment.format(this.config.dateEndFormat)); @@ -493,7 +493,7 @@ Module.register("calendar", { } Log.info("[calendar] event fullday"); } else if (eventStartDateMoment.diff(now, "h") < this.config.getRelative) { - Log.info("[calendar] not full day but within getrelative size"); + Log.info("[calendar] not full day but within getRelative size"); // If event is within getRelative hours, display 'in xxx' time format or moment.fromNow() timeWrapper.innerHTML = `${CalendarUtils.capFirst(eventStartDateMoment.fromNow())}`; } @@ -721,7 +721,7 @@ Module.register("calendar", { } events = newEvents; } - Log.info(`[calendar] slicing events total maxcount=${this.config.maximumEntries}`); + Log.info(`[calendar] slicing events total maxCount=${this.config.maximumEntries}`); return events.slice(0, this.config.maximumEntries); }, @@ -909,7 +909,7 @@ Module.register("calendar", { /** * Broadcasts the events to all other modules for reuse. - * The all events available in one array, sorted on startdate. + * The all events available in one array, sorted on startDate. */ broadcastEvents () { const eventList = this.createEventList(false); diff --git a/modules/default/calendar/calendarfetcherutils.js b/modules/default/calendar/calendarfetcherutils.js index c0ff354a..ecbe31b2 100644 --- a/modules/default/calendar/calendarfetcherutils.js +++ b/modules/default/calendar/calendarfetcherutils.js @@ -121,7 +121,7 @@ const CalendarFetcherUtils = { return JSON.stringify(d) !== "null"; }); - // Dates are returned in UTC timezone but with localdatetime because tzid is null. + // Dates are returned in UTC timezone but with local datetime because tzid is null. // So we map the date to a moment using the original timezone of the event. return dates.map((d) => (event.start.tz ? moment.tz(d, "UTC").tz(event.start.tz, true) : moment.tz(d, "UTC").tz(CalendarFetcherUtils.getLocalTimezone(), true))); }, @@ -202,7 +202,7 @@ const CalendarFetcherUtils = { const geo = event.geo || false; const description = event.description || false; - // TODO This should be a seperate function. + // TODO This should be a separate function. if (event.rrule && typeof event.rrule !== "undefined" && !isFacebookBirthday) { // Recurring event. let moments = CalendarFetcherUtils.getMomentsFromRecurringEvent(event, pastLocalMoment, futureLocalMoment, durationMs); diff --git a/modules/default/calendar/calendarutils.js b/modules/default/calendar/calendarutils.js index 5cbc8d68..9b43de85 100644 --- a/modules/default/calendar/calendarutils.js +++ b/modules/default/calendar/calendarutils.js @@ -88,7 +88,7 @@ const CalendarUtils = { * @param {string} title The title to transform. * @param {object} titleReplace object definition of parts to be replaced in the title * object definition: - * search: {string,required} RegEx in format //x or simple string to be searched. For (birthday) year calcluation, the element matching the year must be in a RegEx group + * search: {string,required} RegEx in format //x or simple string to be searched. For (birthday) year calculation, the element matching the year must be in a RegEx group * replace: {string,required} Replacement string, may contain match group references (latter is required for year calculation) * yearmatchgroup: {number,optional} match group for year element * @returns {string} The transformed title. diff --git a/modules/default/compliments/compliments.js b/modules/default/compliments/compliments.js index 4ceda012..481a0854 100644 --- a/modules/default/compliments/compliments.js +++ b/modules/default/compliments/compliments.js @@ -81,7 +81,7 @@ Module.register("compliments", { minute_sync_delay); }, - // check to see if this entry could be a cron entry wich contains spaces + // check to see if this entry could be a cron entry which contains spaces isCronEntry (entry) { return entry.includes(" "); }, diff --git a/modules/default/helloworld/helloworld.njk b/modules/default/helloworld/helloworld.njk index 05e5edd3..828506fe 100644 --- a/modules/default/helloworld/helloworld.njk +++ b/modules/default/helloworld/helloworld.njk @@ -1,5 +1,5 @@
{{ text | safe }}
diff --git a/modules/default/updatenotification/updatenotification.njk b/modules/default/updatenotification/updatenotification.njk index b08346f3..6a705e64 100644 --- a/modules/default/updatenotification/updatenotification.njk +++ b/modules/default/updatenotification/updatenotification.njk @@ -24,7 +24,7 @@ {% for name, status in updatesList %}
{% if status.done %} - + {% set updateTextLabel = "UPDATE_NOTIFICATION_DONE" %} {{ updateTextLabel | translate({MODULE_NAME: name}) | safe }} diff --git a/modules/default/utils.js b/modules/default/utils.js index c4ca6671..d9eab5c5 100644 --- a/modules/default/utils.js +++ b/modules/default/utils.js @@ -1,7 +1,7 @@ /** * A function to make HTTP requests via the server to avoid CORS-errors. * @param {string} url the url to fetch from - * @param {string} type what contenttype to expect in the response, can be "json" or "xml" + * @param {string} type what content-type to expect in the response, can be "json" or "xml" * @param {boolean} useCorsProxy A flag to indicate * @param {Array.<{name: string, value:string}>} requestHeaders the HTTP headers to send * @param {Array.} expectedResponseHeaders the expected HTTP headers to receive diff --git a/modules/default/weather/providers/envcanada.js b/modules/default/weather/providers/envcanada.js index 4b1d68d1..d3d7cd5d 100644 --- a/modules/default/weather/providers/envcanada.js +++ b/modules/default/weather/providers/envcanada.js @@ -101,7 +101,7 @@ WeatherProvider.register("envcanada", { * city specified in the Weather module Config information */ fetchCommon (target) { - const forecastURL = this.getUrl(); // Get the approriate URL for the MSC Datamart Index page + const forecastURL = this.getUrl(); // Get the appropriate URL for the MSC Datamart Index page Log.debug(`[weatherprovider.envcanada] ${target} Index url: ${forecastURL}`); @@ -127,7 +127,7 @@ WeatherProvider.register("envcanada", { const fileSuffix = `${this.config.siteCode}_en.xml`; // Build city filename const nextFile = indexData.body.innerHTML.split(fileSuffix); // Find filename on Index page - if (nextFile.length > 1) { // Parse out the full unqiue file city filename + if (nextFile.length > 1) { // Parse out the full unique file city filename // Find the last occurrence forecastFile = nextFile[nextFile.length - 2].slice(-41) + fileSuffix; forecastFileURL = forecastURL + forecastFile; // Create full URL to the city's weather data @@ -325,7 +325,7 @@ WeatherProvider.register("envcanada", { * off and Element 0 will contain Current Tonight. From there, the next 5 days will be contained in * Elements 1/2, 3/4, 5/6, 7/8, and 9/10. As well, Element 11 will contain a forecast for a 6th day, * but only for the Today portion (not Tonight). This module will create a 6-day forecast using - * Elements 0 to 11, and will ignore the additional Todat forecast in Element 11. + * Elements 0 to 11, and will ignore the additional Today forecast in Element 11. * * We need to determine if Element 0 is showing the forecast for Current Today or Current Tonight. * This is required to understand how Min and Max temperature will be determined, and to understand @@ -431,7 +431,7 @@ WeatherProvider.register("envcanada", { /* * The EC hourly forecast is held in a 24-element array - Elements 0 to 23 - with Element 0 holding - * the forecast for the next 'on the hour' timeslot. This means the array is a rolling 24 hours. + * the forecast for the next 'on the hour' time slot. This means the array is a rolling 24 hours. */ const hourGroup = ECdoc.querySelectorAll("siteData hourlyForecastGroup hourlyForecast"); @@ -464,7 +464,7 @@ WeatherProvider.register("envcanada", { }, /* - * Determine Min and Max temp based on a supplied Forecast Element index and a boolen that denotes if + * Determine Min and Max temp based on a supplied Forecast Element index and a boolean that denotes if * the next Forecast element should be considered - i.e. look at Today *and* Tonight vs.Tonight-only */ setMinMaxTemps (weather, foreGroup, today, fullDay, currentTemp) { diff --git a/modules/default/weather/providers/openmeteo.js b/modules/default/weather/providers/openmeteo.js index 08c68686..c9aaaf56 100644 --- a/modules/default/weather/providers/openmeteo.js +++ b/modules/default/weather/providers/openmeteo.js @@ -296,7 +296,7 @@ WeatherProvider.register("openmeteo", { return data.time.map((_, index) => Object.keys(data).reduce((row, key) => { return { ...row, - // Parse time values as momentjs instances + // Parse time values as moment.js instances [key]: ["time", "sunrise", "sunset"].includes(key) ? this.checkDST(data[key][index]) : data[key][index] }; }, {})); diff --git a/modules/default/weather/providers/openweathermap.js b/modules/default/weather/providers/openweathermap.js index 93a3e1f3..5ad0fa14 100644 --- a/modules/default/weather/providers/openweathermap.js +++ b/modules/default/weather/providers/openweathermap.js @@ -427,7 +427,7 @@ WeatherProvider.register("openweathermap", { } else if (this.firstEvent && this.firstEvent.location) { params += `q=${this.firstEvent.location}`; } else { - // TODO hide doesnt exist! + // TODO hide doesn't exist! this.hide(this.config.animationSpeed, { lockString: this.identifier }); return; } diff --git a/modules/default/weather/providers/overrideWrapper.js b/modules/default/weather/providers/overrideWrapper.js index a9002809..61afa101 100644 --- a/modules/default/weather/providers/overrideWrapper.js +++ b/modules/default/weather/providers/overrideWrapper.js @@ -46,7 +46,7 @@ const OverrideWrapper = Class.extend({ this.baseProvider.fetchWeatherForecast(); }, fetchWeatherHourly () { - this.baseProvider.fetchEatherHourly(); + this.baseProvider.fetchWeatherHourly(); }, weatherForecast () { this.baseProvider.weatherForecast(); @@ -84,7 +84,7 @@ const OverrideWrapper = Class.extend({ }, /** - * Override to combine the overrideWeatherObejct provided in the + * Override to combine the overrideWeatherObject provided in the * notificationReceived method with the currentOverrideWeatherObject provided by the * api provider fetchData implementation. * @param {WeatherObject} currentWeatherObject - the api provider weather object diff --git a/modules/default/weather/providers/smhi.js b/modules/default/weather/providers/smhi.js index 4b25008b..bcb873a9 100644 --- a/modules/default/weather/providers/smhi.js +++ b/modules/default/weather/providers/smhi.js @@ -141,7 +141,7 @@ WeatherProvider.register("smhi", { /* * Determine the precipitation amount and category and update the - * weatherObject with it, the valuetype to use can be configured or uses + * weatherObject with it, the value type to use can be configured or uses * median as default. */ let precipitationValue = this.paramValue(weatherData, this.config.precipitationValue); @@ -173,7 +173,7 @@ WeatherProvider.register("smhi", { * @param {object[]} allWeatherData Array of weatherdata * @param {object} coordinates Coordinates of the locations of the weather * @param {string} groupBy The interval to use for grouping the data (day, hour) - * @returns {WeatherObject[]} Array of weatherobjects + * @returns {WeatherObject[]} Array of weather objects */ convertWeatherDataGroupedBy (allWeatherData, coordinates, groupBy = "day") { let currentWeather; diff --git a/modules/default/weather/providers/ukmetofficedatahub.js b/modules/default/weather/providers/ukmetofficedatahub.js index d3e3d619..4f77a368 100644 --- a/modules/default/weather/providers/ukmetofficedatahub.js +++ b/modules/default/weather/providers/ukmetofficedatahub.js @@ -27,7 +27,7 @@ * - Pressures are in Pascals (Pa) * - Distances are in metres (m) * - Probabilities and humidity are given as percentages (%) - * - Precipitation is measured in millimetres (mm) with rates per hour (mm/h) + * - Precipitation is measured in millimeters (mm) with rates per hour (mm/h) * * See the PDFs linked above for more information on the data their corresponding units. */ diff --git a/modules/default/weather/weatherprovider.js b/modules/default/weather/weatherprovider.js index 1c562f15..32395598 100644 --- a/modules/default/weather/weatherprovider.js +++ b/modules/default/weather/weatherprovider.js @@ -107,7 +107,7 @@ const WeatherProvider = Class.extend({ /** * A convenience function to make requests. * @param {string} url the url to fetch from - * @param {string} type what contenttype to expect in the response, can be "json" or "xml" + * @param {string} type what content-type to expect in the response, can be "json" or "xml" * @param {Array.<{name: string, value:string}>} requestHeaders the HTTP headers to send * @param {Array.} expectedResponseHeaders the expected HTTP headers to receive * @returns {Promise} resolved when the fetch is done