[core] configure cspell to check default modules only and fix typos (#3955)

When I saw PR #3951, I wondered why `cspell` didn't catch these typos
before. Unfortunately, the default modules were excluded from the check.
I have corrected this with these changes.

This even revealed a code error in
`modules/default/weather/providers/overrideWrapper.js`:

- before: `fetchEatherHourly`
- after: `fetchWeatherHourly`
This commit is contained in:
Kristjan ESPERANTO
2025-11-08 20:27:34 +01:00
committed by GitHub
parent 8e9ee8953a
commit 2b08288346
17 changed files with 127 additions and 26 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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.