Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ To run ESLint, use `node --run lint:js`.

### CSS: Run StyleLint

We use [StyleLint](https://stylelint.io) to lint our CSS. The configuration is in our `.stylelintrc.json` file.
We use [StyleLint](https://stylelint.io) to lint our CSS. The configuration is in our `stylelint.config.mjs` file.

To run StyleLint, use `node --run lint:css`.

### Markdown: Run markdownlint

We use [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) to lint our markdown files. The configuration is in our `.markdownlint.json` file.

To run markdownlint, use `node --run markdownlint:css`.
To run markdownlint, use `node --run lint:markdown`.

## Testing

Expand Down
7 changes: 0 additions & 7 deletions .stylelintrc.json

This file was deleted.

24 changes: 17 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,29 @@ planned for 2025-07-01

### Added

- [config] Allow to change module order for final renderer (or dynamicaly with CSS): Feature `order` in config. (#3762)
- [config] Allow to change module order for final renderer (or dynamically with CSS): Feature `order` in config (#3762)
- [clock] Added option 'disableNextEvent' to hide next sun event (#3769)

### Changed

- [refactor] Simplify module loading process (#3766)
- Use `node --run` instead of `npm run` (#3764) and adapt `start:dev` script.
- [workflow] Run linter und spellcheck with LTS node version (#3767)
- Use `node --run` instead of `npm run` (#3764) and adapt `start:dev` script (#3773)
- [workflow] Run linter and spellcheck with LTS node version (#3767)
- [workflow] Split "Run test" step into two steps for more clarity (#3767)
- [linter] Review linter setup (#3783)
- Fix command to lint markdown in `CONTRIBUTING.md`
- Re-activate JSDoc linting and fix linting issues
- Refactor ESLint config to use `defineConfig` and `globalIgnores`
- Replace `eslint-plugin-import` with `eslint-plugin-import-x`
- Switch Stylelint config to flat format and simplify Stylelint scripts

### Fixed

- [fix] Handle spellcheck issues (#3783)

### Updated

- [core] Update dependencies
- [core] Update dependencies (#3774)

## [2.31.0] - 2025-04-01

Expand All @@ -36,7 +46,7 @@ Thanks to: @Developer-Incoming, @eltociear, @geraki, @khassel, @KristjanESPERANT
### Added

- Add CSS support to the digital clock hour/minute/second through the use of the classes `clock-hour-digital`, `clock-minute-digital`, and `clock-second-digital`.
- Add Arabic (#3719) and Esperanto translation.
- Add Arabic (#3719) and Esperanto translation (#3740)
- Mark option `secondsColor` as deprecated in clock module.
- Add Greek translation to Alerts module.
- [newsfeed] Add specific ignoreOlderThan value (override) per feed (#3360)
Expand All @@ -46,7 +56,7 @@ Thanks to: @Developer-Incoming, @eltociear, @geraki, @khassel, @KristjanESPERANT

### Changed

- [core] Starting clientonly now checks for needed env var `WAYLAND_DISPLAY` or `DISPLAY` and starts electron with needed parameters (if both are set wayland is used) (#3677)
- [core] Starting clientonly now checks for needed env var `WAYLAND_DISPLAY` or `DISPLAY` and starts electron with needed parameters (if both are set Wayland is used) (#3677)
- [core] Optimize systeminformation calls and output (#3689)
- [core] Add issue templates for feature requests and bug reports (#3695)
- [core] Adapt `start:x11:dev` script
Expand Down Expand Up @@ -84,7 +94,7 @@ Thanks to: @xsorifc28, @HeikoGr, @bugsounet, @khassel, @KristjanESPERANTO, @reja

### Added

- [core] Add wayland and windows start options to `package.json` (#3594)
- [core] Add Wayland and Windows start options to `package.json` (#3594)
- [docs] Add step for npm publishing in release process (#3595)
- [core] Add GitHub workflow to run spellcheck a few days before each release (#3623)
- [core] Add test flag to `index.html` to pass to module js for test mode detection (needed by #3630)
Expand Down
4 changes: 4 additions & 0 deletions cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"Edgardos",
"Ekristoffe",
"elec",
"eltociear",
"envcanada",
"envsub",
"envsubst",
Expand All @@ -82,6 +83,7 @@
"fulldate",
"fullday",
"fullscreen",
"geraki",
"Gevoelstemperatuur",
"GHSA",
"ghsas",
Expand Down Expand Up @@ -143,6 +145,7 @@
"Midori",
"mirontoli",
"MISSINGLANG",
"mixasgr",
"MMPM",
"modernizr",
"modulename",
Expand Down Expand Up @@ -183,6 +186,7 @@
"rohitdharavath",
"Rosso",
"rrule",
"savvadam",
"sdetweil",
"sendheaders",
"serveronly",
Expand Down
54 changes: 26 additions & 28 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
import eslintPluginImport from "eslint-plugin-import";
import eslintPluginJest from "eslint-plugin-jest";
import eslintPluginJs from "@eslint/js";
import eslintPluginPackageJson from "eslint-plugin-package-json";
import eslintPluginStylistic from "@stylistic/eslint-plugin";
import {defineConfig, globalIgnores} from "eslint/config";
import globals from "globals";
import {flatConfigs as importX} from "eslint-plugin-import-x";
import jest from "eslint-plugin-jest";
import js from "@eslint/js";
import jsdoc from "eslint-plugin-jsdoc";
import packageJson from "eslint-plugin-package-json";
import stylistic from "@stylistic/eslint-plugin";

const config = [
eslintPluginImport.flatConfigs.recommended,
eslintPluginJest.configs["flat/recommended"],
eslintPluginJs.configs.recommended,
eslintPluginPackageJson.configs.recommended,
eslintPluginStylistic.configs.all,
export default defineConfig([
globalIgnores(["config/**", "modules/**/*", "!modules/default/**", "js/positions.js"]),
{
files: ["**/*.js"],
languageOptions: {
ecmaVersion: "latest",
globals: {
...globals.browser,
...globals.node,
...globals.jest,
Log: "readonly",
MM: "readonly",
Module: "readonly",
config: "readonly",
moment: "readonly"
}
},
plugins: {js, jsdoc, stylistic},
extends: [importX.recommended, jest.configs["flat/recommended"], "js/recommended", jsdoc.configs["flat/recommended"], "stylistic/all"],
rules: {
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/arrow-parens": ["error", "always"],
Expand Down Expand Up @@ -54,9 +53,9 @@ const config = [
"dot-notation": "error",
eqeqeq: "error",
"id-length": "off",
"import/extensions": "error",
"import/newline-after-import": "error",
"import/order": "error",
"import-x/extensions": "error",
"import-x/newline-after-import": "error",
"import-x/order": "error",
"init-declarations": "off",
"jest/consistent-test-it": "warn",
"jest/no-done-callback": "warn",
Expand All @@ -81,11 +80,15 @@ const config = [
"no-warning-comments": "off",
"object-shorthand": ["error", "methods"],
"one-var": "off",
"prefer-destructuring": "off",
"prefer-template": "error",
"sort-keys": "off"
}
},
{
files: ["**/package.json"],
plugins: {packageJson},
extends: ["packageJson/recommended"]
},
{
files: ["**/*.mjs"],
languageOptions: {
Expand All @@ -95,30 +98,25 @@ const config = [
},
sourceType: "module"
},
plugins: {js, stylistic},
extends: [importX.recommended, "js/all", "stylistic/all"],
rules: {
"@stylistic/array-element-newline": "off",
"@stylistic/indent": ["error", "tab"],
"@stylistic/object-property-newline": ["error", {allowAllPropertiesOnSameLine: true}],
"@stylistic/padded-blocks": ["error", "never"],
"@stylistic/quote-props": ["error", "as-needed"],
"func-style": "off",
"import/namespace": "off",
"import/no-unresolved": "off",
"import-x/no-unresolved": ["error", {ignore: ["eslint/config"]}],
"max-lines-per-function": ["error", 100],
"no-magic-numbers": "off",
"one-var": "off",
"prefer-destructuring": "off",
"sort-keys": "error"
"one-var": ["error", "never"],
"sort-keys": "off"
}
},
{
files: ["tests/configs/modules/weather/*.js"],
rules: {
"@stylistic/quotes": "off"
}
},
{
ignores: ["config/**", "modules/**/*", "!modules/default/**", "js/positions.js"]
}
];

export default config;
]);
4 changes: 4 additions & 0 deletions js/check_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ function checkConfigFile () {
}
}

/**
*
* @param {string} configFileName - The path and filename of the configuration file to validate.
*/
function validateModulePositions (configFileName) {
Log.info("Checking modules structure configuration ...");

Expand Down
29 changes: 14 additions & 15 deletions modules/default/calendar/calendarfetcherutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,10 @@ const CalendarFetcherUtils = {
},

/**
* fixup thew event fields that have dates to use local time
* BEFORE calling rrule.between
* @param the event being processed
* @returns nothing
* Fixes the event fields that have dates to use local time
* before calling rrule.between.
* @param {object} event - The event being processed.
* @returns {void}
*/
fixEventtoLocal (event) {
// if there are excluded dates, their date is incorrect and possibly key as well.
Expand Down Expand Up @@ -542,9 +542,9 @@ const CalendarFetcherUtils = {
/**
* convert a UTC date to local time
* BEFORE calling rrule.between
* @param date ti conert
* tz event is currently in
* @returns updated date object
* @param {Date} date The date to convert
* @param {string} tz The timezone string to convert the date to.
* @returns {Date} updated date object
*/
convertDateToLocalTime (date, tz) {
let delta_tz_offset = 0;
Expand Down Expand Up @@ -585,8 +585,8 @@ const CalendarFetcherUtils = {
/**
* get the exdate/recurrence hash key from the date object
* BEFORE calling rrule.between
* @param the date of the event
* @returns string date key YYYY-MM-DD
* @param {Date} date The date of the event
* @returns {string} date key in the format YYYY-MM-DD
*/
getDateKeyFromDate (date) {
// get our runtime timezone offset
Expand All @@ -611,9 +611,8 @@ const CalendarFetcherUtils = {

/**
* get the timezone offset from the timezone string
*
* @param the timezone string
* @returns the numerical offset
* @param {string} timeZone The timezone string
* @returns {number} The numerical offset in minutes from UTC.
*/
getTimezoneOffsetFromTimezone (timeZone) {
const str = new Date().toLocaleString("en", { timeZone, timeZoneName: "longOffset" });
Expand All @@ -624,10 +623,10 @@ const CalendarFetcherUtils = {

/**
* fixup the date start moment after rrule.between returns date array
*
* @param date object from rrule.between results
* @param {Date} date object from rrule.between results
* the event object it came from
* @returns moment object
* @param {object} event - The event object it came from.
* @returns {Moment} moment object
*/
getAdjustedStartMoment (date, event) {

Expand Down
1 change: 1 addition & 0 deletions modules/default/newsfeed/newsfeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ Module.register("newsfeed", {
* Gets a feed property by name
* @param {object} feed A feed object.
* @param {string} property The name of the property.
* @returns {*} The value of the specified property for the feed.
*/
getFeedProperty (feed, property) {
let res = this.config[property];
Expand Down
4 changes: 2 additions & 2 deletions modules/default/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @param {boolean} useCorsProxy A flag to indicate
* @param {Array.<{name: string, value:string}>} requestHeaders the HTTP headers to send
* @param {Array.<string>} expectedResponseHeaders the expected HTTP headers to receive
* @param {string} basePath, default /
* @param {string} basePath The base path, default is "/"
* @returns {Promise} resolved when the fetch is done. The response headers is placed in a headers-property (provided the response does not already contain a headers-property).
*/
async function performWebRequest (url, type = "json", useCorsProxy = false, requestHeaders = undefined, expectedResponseHeaders = undefined, basePath = "/") {
Expand Down Expand Up @@ -38,7 +38,7 @@ async function performWebRequest (url, type = "json", useCorsProxy = false, requ
* @param {string} url the url to fetch from
* @param {Array.<{name: string, value:string}>} requestHeaders the HTTP headers to send
* @param {Array.<string>} expectedResponseHeaders the expected HTTP headers to receive
* @param {string} basePath, default /
* @param {string} basePath The base path, default is "/"
* @returns {string} to be used as URL when calling CORS-method on server.
*/
const getCorsUrl = function (url, requestHeaders, expectedResponseHeaders, basePath = "/") {
Expand Down
Loading