From f0d4042b705b50cb2b8d943592a6793a9cae66fa Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Wed, 24 Sep 2025 06:45:18 +0200 Subject: [PATCH 01/16] chore: upgrade to eslint 9 #1426 --- .eslintignore | 1 - .eslintrc.js | 45 - eslint.config.mjs | 149 +++ package-lock.json | 1218 ++++++++++++-------- package.json | 24 +- packages/binding-coap/.eslintrc.json | 3 - packages/binding-coap/src/coap-client.ts | 1 - packages/binding-file/.eslintrc.json | 3 - packages/binding-http/.eslintrc.json | 3 - packages/binding-mbus/.eslintrc.json | 3 - packages/binding-modbus/.eslintrc.json | 3 - packages/binding-mqtt/.eslintrc.json | 3 - packages/binding-netconf/.eslintrc.json | 3 - packages/binding-opcua/.eslintrc.json | 3 - packages/binding-websockets/.eslintrc.json | 3 - packages/cli/.eslintrc.json | 3 - packages/core/.eslintrc.json | 3 - packages/core/src/protocol-helpers.ts | 2 +- packages/examples/.eslintrc.json | 3 - 19 files changed, 882 insertions(+), 594 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.js create mode 100644 eslint.config.mjs delete mode 100644 packages/binding-coap/.eslintrc.json delete mode 100644 packages/binding-file/.eslintrc.json delete mode 100644 packages/binding-http/.eslintrc.json delete mode 100644 packages/binding-mbus/.eslintrc.json delete mode 100644 packages/binding-modbus/.eslintrc.json delete mode 100644 packages/binding-mqtt/.eslintrc.json delete mode 100644 packages/binding-netconf/.eslintrc.json delete mode 100644 packages/binding-opcua/.eslintrc.json delete mode 100644 packages/binding-websockets/.eslintrc.json delete mode 100644 packages/cli/.eslintrc.json delete mode 100644 packages/core/.eslintrc.json delete mode 100644 packages/examples/.eslintrc.json diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index f7fc1a853..000000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -packages/browser-bundle/web-test-runner.config.mjs diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 198d43d5c..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,45 +0,0 @@ -module.exports = { - parser: "@typescript-eslint/parser", - parserOptions: { - tsconfigRootDir: __dirname, - project: ["./tsconfig.eslint.json"], - }, - extends: [ - "eslint:recommended", - "standard", - "prettier", - "plugin:@typescript-eslint/recommended", - "plugin:workspaces/recommended", - ], - plugins: ["@typescript-eslint", "unused-imports", "workspaces", "notice"], - env: { - es6: true, - node: true, - }, - ignorePatterns: [".eslintrc.js", "dist", "node_modules", "/examples", "bin", "*.js"], - rules: { - "notice/notice": [ - "error", - { - mustMatch: "Copyright \\(c\\) [0-9]{0,4} Contributors to the Eclipse Foundation", - templateFile: __dirname + "/license.template.txt", - onNonMatchingHeader: "replace", - }, - ], - "@typescript-eslint/no-unused-vars": "off", // or "@typescript-eslint/no-unused-vars": "off", - "no-use-before-define": "off", - "@typescript-eslint/no-use-before-define": ["error"], - "@typescript-eslint/prefer-nullish-coalescing": "error", - "unused-imports/no-unused-imports": "error", - "@typescript-eslint/strict-boolean-expressions": "error", - "import/no-extraneous-dependencies": "error", - "guard-for-in": "error", - "unused-imports/no-unused-vars": [ - "warn", - { - args: "none", - varsIgnorePattern: "Test", // Ignore test suites from unused-imports - }, - ], - }, -}; diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 000000000..c2caf9a4e --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,149 @@ +import path from "path"; +import { fileURLToPath } from "url"; + +import { defineConfig, globalIgnores } from "eslint/config"; + +import tsParser from "@typescript-eslint/parser"; +import typescriptEslint from "@typescript-eslint/eslint-plugin"; +import unusedImports from "eslint-plugin-unused-imports"; +import workspaces from "eslint-plugin-workspaces"; +import notice from "eslint-plugin-notice"; +import globals from "globals"; +import js from "@eslint/js"; +import reactNamingConvention from "eslint-plugin-react-naming-convention"; +import extraneousDependencies from "eslint-plugin-import"; +import { FlatCompat } from "@eslint/eslintrc"; +import nodePlugin from "eslint-plugin-n"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all, +}); + +export default defineConfig([ + ...compat.extends( + "eslint:recommended", + "prettier", + "plugin:@typescript-eslint/recommended", + "plugin:workspaces/recommended", + "plugin:n/recommended" + ), + // + nodePlugin.configs["flat/recommended-script"], + { + languageOptions: { + parser: tsParser, + parserOptions: { + tsconfigRootDir: __dirname, + project: ["./tsconfig.eslint.json"], + }, + globals: { + ...globals.node, + }, + }, + plugins: { + "@typescript-eslint": typescriptEslint, + "unused-imports": unusedImports, + workspaces, + notice, + "react-naming-convention": reactNamingConvention, + "extraneous-dependencies": extraneousDependencies, + n: nodePlugin, + }, + + rules: { + // *************** Ensure that copyright notice is present *************** + "notice/notice": [ + "error", + { + mustMatch: "Copyright \\(c\\) [0-9]{0,4} Contributors to the Eclipse Foundation", + templateFile: __dirname + "/license.template.txt", + onNonMatchingHeader: "replace", + }, + ], + + // *************** NodeJS specific rules - relaxing default setting of n *************** + "n/no-path-concat": "error", + "n/no-unsupported-features/es-syntax": [ + "error", + { + ignores: ["modules"], + }, + ], + + // relax missing import rule to warning, as we sometimes have optional dependencies + // import "../foo" will braise a warning , + // import "../foo.js" is the correct way to import a file that may not exist + "n/no-missing-import": "warn", + + "n/no-unsupported-features/node-builtins": "warn", + "n/no-extraneous-import": "warn", + "n/no-deprecated-api": "warn", + "n/no-unpublished-import": "warn", + "n/no-process-exit": "warn", + "n/hashbang": "warn", + + // *************** Ensure that only used dependencies are imported *************** + "extraneous-dependencies/no-extraneous-dependencies": "warn", + + // *************** Code style and best practices *************** + "unused-imports/no-unused-imports": "error", + "unused-imports/no-unused-vars": [ + "warn", + { + args: "none", + varsIgnorePattern: "Test", + }, + ], + + // **************** enforece kebab-case for filenames **************** + "react-naming-convention/filename": [ + "warn", + { + rule: "kebab-case", + }, + ], + + // *************** Customization of other typescript rules *************** + "@typescript-eslint/no-use-before-define": "error", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-unused-expressions": "off", + "@typescript-eslint/no-require-imports": "warn", + "@typescript-eslint/prefer-nullish-coalescing": "warn", + "@typescript-eslint/no-empty-object-type": "warn", + + // **************** Enforce usage of `const` over `let` wherever possible, to prevent accidental reassignments + "prefer-const": "warn", + + // *************** Other rules *************** + "no-restricted-globals": "error", + "no-restricted-properties": "error", + + "no-use-before-define": "error", + + "no-unused-private-class-members": "warn", + "no-prototype-builtins": "off", + "no-case-declarations": "off", + + // ***************** Enforce that for-in loops include an if statement to filter properties from the prototype chain + "guard-for-in": "error", + }, + }, + globalIgnores([ + "utils/*", + "packages/browser-bundle/types/index.d.ts", + "packages/*/eslint.config.mjs", + "eslint.config.mjs", + "packages/browser-bundle/web-test-runner.config.mjs", + "**/.eslintrc.js", + "**/dist", + "**/node_modules", + "examples", + "**/bin", + "**/*.js", + ]), +]); diff --git a/package-lock.json b/package-lock.json index 6c0535b04..91ce136e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,21 +22,22 @@ "@types/node": "^18.19.76", "@types/readable-stream": "^4.0.15", "@types/sinon": "10.0.2", - "@typescript-eslint/eslint-plugin": "^6.7.3", - "@typescript-eslint/parser": "^6.7.3", + "@typescript-eslint/eslint-plugin": "^8.44.1", + "@typescript-eslint/parser": "^8.44.1", "c8": "^7.11.0", "chai": "^4.3.4", "chai-as-promised": "^7.1.1", "chai-spies": "^1.0.0", - "eslint": "^8.50.0", - "eslint-config-prettier": "^9.0.0", - "eslint-config-standard": "^17.1.0", - "eslint-plugin-import": "^2.24.2", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-notice": "^0.9.10", - "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-unused-imports": "^3.0.0", - "eslint-plugin-workspaces": "^0.9.0", + "eslint": "^9.36.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-n": "^17.23.1", + "eslint-plugin-notice": "^1.0.0", + "eslint-plugin-prettier": "^5.5.4", + "eslint-plugin-react-naming-convention": "^1.53.1", + "eslint-plugin-unused-imports": "^4.2.0", + "eslint-plugin-workspaces": "^0.11.0", + "globals": "^16.4.0", "husky": "^7.0.4", "mocha": "^11.7.2", "prettier": "3.3.3", @@ -46,6 +47,7 @@ "ts-node": "^10.9.1", "tslint": "5.12.1", "typescript": "^5.7.3", + "typescript-eslint": "^8.44.1", "typescript-standard": "^0.3.36", "wot-typescript-definitions": "0.8.0-SNAPSHOT.31" } @@ -110,7 +112,7 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", + "version": "4.9.0", "dev": true, "license": "MIT", "dependencies": { @@ -134,15 +136,174 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint-react/ast": { + "version": "1.53.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-react/eff": "1.53.1", + "@typescript-eslint/types": "^8.43.0", + "@typescript-eslint/typescript-estree": "^8.43.0", + "@typescript-eslint/utils": "^8.43.0", + "string-ts": "^2.2.1", + "ts-pattern": "^5.8.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@eslint-react/core": { + "version": "1.53.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-react/ast": "1.53.1", + "@eslint-react/eff": "1.53.1", + "@eslint-react/kit": "1.53.1", + "@eslint-react/shared": "1.53.1", + "@eslint-react/var": "1.53.1", + "@typescript-eslint/scope-manager": "^8.43.0", + "@typescript-eslint/type-utils": "^8.43.0", + "@typescript-eslint/types": "^8.43.0", + "@typescript-eslint/utils": "^8.43.0", + "birecord": "^0.1.1", + "ts-pattern": "^5.8.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@eslint-react/eff": { + "version": "1.53.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@eslint-react/kit": { + "version": "1.53.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-react/eff": "1.53.1", + "@typescript-eslint/utils": "^8.43.0", + "ts-pattern": "^5.8.0", + "zod": "^4.1.5" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@eslint-react/kit/node_modules/zod": { + "version": "4.1.11", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/@eslint-react/shared": { + "version": "1.53.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-react/eff": "1.53.1", + "@eslint-react/kit": "1.53.1", + "@typescript-eslint/utils": "^8.43.0", + "ts-pattern": "^5.8.0", + "zod": "^4.1.5" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@eslint-react/shared/node_modules/zod": { + "version": "4.1.11", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/@eslint-react/var": { + "version": "1.53.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-react/ast": "1.53.1", + "@eslint-react/eff": "1.53.1", + "@typescript-eslint/scope-manager": "^8.43.0", + "@typescript-eslint/types": "^8.43.0", + "@typescript-eslint/utils": "^8.43.0", + "string-ts": "^2.2.1", + "ts-pattern": "^5.8.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.3.1", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.15.2", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", + "version": "3.3.1", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -150,7 +311,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -180,6 +341,25 @@ "concat-map": "0.0.1" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { "version": "0.4.1", "dev": true, @@ -197,11 +377,34 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.1", + "version": "9.36.0", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@esm-bundle/chai": { @@ -222,37 +425,24 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", + "node_modules/@humanfs/core": { + "version": "0.19.1", "dev": true, "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, "engines": { - "node": ">=10.10.0" + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", + "node_modules/@humanfs/node": { + "version": "0.16.7", "dev": true, - "license": "ISC", + "license": "Apache-2.0", "dependencies": { - "brace-expansion": "^1.1.7" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" }, "engines": { - "node": "*" + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -267,10 +457,17 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -678,6 +875,17 @@ "node": ">=14" } }, + "node_modules/@pkgr/core": { + "version": "0.2.9", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" + } + }, "node_modules/@puppeteer/browsers": { "version": "2.6.1", "dev": true, @@ -1566,114 +1774,136 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.21.0", + "version": "8.44.1", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/type-utils": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/type-utils": "8.44.1", + "@typescript-eslint/utils": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", "graphemer": "^1.4.0", - "ignore": "^5.2.4", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "@typescript-eslint/parser": "^8.44.1", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "6.21.0", + "version": "8.44.1", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", "debug": "^4.3.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.44.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.44.1", + "@typescript-eslint/types": "^8.44.1", + "debug": "^4.3.4" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.21.0", + "version": "8.44.1", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0" + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.44.1", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.21.0", + "version": "8.44.1", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/utils": "8.44.1", "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/types": { - "version": "6.21.0", + "version": "8.44.1", "dev": true, "license": "MIT", "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -1681,76 +1911,80 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.21.0", + "version": "8.44.1", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", + "@typescript-eslint/project-service": "8.44.1", + "@typescript-eslint/tsconfig-utils": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/utils": { - "version": "6.21.0", + "version": "8.44.1", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "semver": "^7.5.4" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.21.0", + "version": "8.44.1", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "6.21.0", - "eslint-visitor-keys": "^3.4.1" + "@typescript-eslint/types": "8.44.1", + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", "dev": true, - "license": "ISC" + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } }, "node_modules/@web/browser-logs": { "version": "0.4.1", @@ -2014,7 +2248,7 @@ } }, "node_modules/acorn": { - "version": "8.14.1", + "version": "8.15.0", "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -2232,16 +2466,18 @@ "license": "MIT" }, "node_modules/array-includes": { - "version": "3.1.8", + "version": "3.1.9", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" + "es-abstract": "^1.24.0", + "es-object-atoms": "^1.1.1", + "get-intrinsic": "^1.3.0", + "is-string": "^1.1.1", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -2643,6 +2879,11 @@ "file-uri-to-path": "1.0.0" } }, + "node_modules/birecord": { + "version": "0.1.1", + "dev": true, + "license": "(MIT OR Apache-2.0)" + }, "node_modules/bl": { "version": "6.1.0", "license": "MIT", @@ -2786,27 +3027,6 @@ "version": "1.1.2", "license": "MIT" }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/builtins": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "semver": "^7.0.0" - } - }, "node_modules/bulk-write-stream": { "version": "2.0.1", "license": "MIT", @@ -3778,14 +3998,14 @@ } }, "node_modules/doctrine": { - "version": "3.0.0", + "version": "2.1.0", "dev": true, "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=0.10.0" } }, "node_modules/dotenv": { @@ -3852,6 +4072,18 @@ "once": "^1.4.0" } }, + "node_modules/enhanced-resolve": { + "version": "5.18.3", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/env-paths": { "version": "2.2.1", "license": "MIT", @@ -3865,7 +4097,7 @@ "license": "MIT" }, "node_modules/es-abstract": { - "version": "1.23.9", + "version": "1.24.0", "dev": true, "license": "MIT", "dependencies": { @@ -3873,18 +4105,18 @@ "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.8", - "call-bound": "^1.0.3", + "call-bound": "^1.0.4", "data-view-buffer": "^1.0.2", "data-view-byte-length": "^1.0.2", "data-view-byte-offset": "^1.0.1", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", + "es-object-atoms": "^1.1.1", "es-set-tostringtag": "^2.1.0", "es-to-primitive": "^1.3.0", "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.0", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", "get-symbol-description": "^1.1.0", "globalthis": "^1.0.4", "gopd": "^1.2.0", @@ -3896,21 +4128,24 @@ "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", "is-regex": "^1.2.1", + "is-set": "^2.0.3", "is-shared-array-buffer": "^1.0.4", "is-string": "^1.1.1", "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.0", + "is-weakref": "^1.1.1", "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.3", + "object-inspect": "^1.13.4", "object-keys": "^1.1.1", "object.assign": "^4.1.7", "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.3", + "regexp.prototype.flags": "^1.5.4", "safe-array-concat": "^1.1.3", "safe-push-apply": "^1.0.0", "safe-regex-test": "^1.1.0", "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", "string.prototype.trim": "^1.2.10", "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", @@ -3919,7 +4154,7 @@ "typed-array-byte-offset": "^1.0.4", "typed-array-length": "^1.0.7", "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.18" + "which-typed-array": "^1.1.19" }, "engines": { "node": ">= 0.4" @@ -4102,64 +4337,68 @@ } }, "node_modules/eslint": { - "version": "8.57.1", + "version": "9.36.0", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.36.0", + "@eslint/plugin-kit": "^0.3.5", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-compat-utils": { "version": "0.5.1", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "semver": "^7.5.4" }, @@ -4171,42 +4410,17 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.1.0", + "version": "10.1.8", "dev": true, "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-config-standard": { - "version": "17.1.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "engines": { - "node": ">=12.0.0" + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" }, "peerDependencies": { - "eslint": "^8.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", - "eslint-plugin-promise": "^6.0.0" + "eslint": ">=7.0.0" } }, "node_modules/eslint-import-resolver-node": { @@ -4228,7 +4442,7 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.12.0", + "version": "2.12.1", "dev": true, "license": "MIT", "dependencies": { @@ -4251,24 +4465,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-es": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" - } - }, "node_modules/eslint-plugin-es-x": { "version": "7.8.0", "dev": true, @@ -4277,7 +4473,6 @@ "https://opencollective.com/eslint" ], "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.1.2", "@eslint-community/regexpp": "^4.11.0", @@ -4291,28 +4486,28 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.31.0", + "version": "2.32.0", "dev": true, "license": "MIT", "dependencies": { "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.8", - "array.prototype.findlastindex": "^1.2.5", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", + "array-includes": "^3.1.9", + "array.prototype.findlastindex": "^1.2.6", + "array.prototype.flat": "^1.3.3", + "array.prototype.flatmap": "^1.3.3", "debug": "^3.2.7", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.0", + "eslint-module-utils": "^2.12.1", "hasown": "^2.0.2", - "is-core-module": "^2.15.1", + "is-core-module": "^2.16.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", "object.fromentries": "^2.0.8", "object.groupby": "^1.0.3", - "object.values": "^1.2.0", + "object.values": "^1.2.1", "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.8", + "string.prototype.trimend": "^1.0.9", "tsconfig-paths": "^3.15.0" }, "engines": { @@ -4339,17 +4534,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint-plugin-import/node_modules/minimatch": { "version": "3.1.2", "dev": true, @@ -4370,167 +4554,149 @@ } }, "node_modules/eslint-plugin-n": { - "version": "16.6.2", + "version": "17.23.1", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "builtins": "^5.0.1", - "eslint-plugin-es-x": "^7.5.0", - "get-tsconfig": "^4.7.0", - "globals": "^13.24.0", - "ignore": "^5.2.4", - "is-builtin-module": "^3.2.1", - "is-core-module": "^2.12.1", - "minimatch": "^3.1.2", - "resolve": "^1.22.2", - "semver": "^7.5.3" + "@eslint-community/eslint-utils": "^4.5.0", + "enhanced-resolve": "^5.17.1", + "eslint-plugin-es-x": "^7.8.0", + "get-tsconfig": "^4.8.1", + "globals": "^15.11.0", + "globrex": "^0.1.2", + "ignore": "^5.3.2", + "semver": "^7.6.3", + "ts-declaration-location": "^1.0.6" }, "engines": { - "node": ">=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" + "url": "https://opencollective.com/eslint" }, "peerDependencies": { - "eslint": ">=7.0.0" + "eslint": ">=8.23.0" } }, - "node_modules/eslint-plugin-n/node_modules/brace-expansion": { - "version": "1.1.12", + "node_modules/eslint-plugin-n/node_modules/globals": { + "version": "15.15.0", "dev": true, "license": "MIT", - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-n/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-node": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", - "ignore": "^5.1.1", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" - }, - "engines": { - "node": ">=8.10.0" + "node": ">=18" }, - "peerDependencies": { - "eslint": ">=5.16.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-plugin-node/node_modules/brace-expansion": { - "version": "1.1.12", + "node_modules/eslint-plugin-n/node_modules/ignore": { + "version": "5.3.2", "dev": true, "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-node/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-node/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "node": ">= 4" } }, "node_modules/eslint-plugin-notice": { - "version": "0.9.10", + "version": "1.0.0", "dev": true, "license": "MIT", "dependencies": { "find-root": "^1.1.0", - "lodash": "^4.17.15", + "lodash": "^4.17.21", "metric-lcs": "^0.1.2" }, "peerDependencies": { "eslint": ">=3.0.0" } }, - "node_modules/eslint-plugin-promise": { - "version": "6.6.0", + "node_modules/eslint-plugin-prettier": { + "version": "5.5.4", "dev": true, - "license": "ISC", + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.11.7" + }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://opencollective.com/eslint-plugin-prettier" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } } }, - "node_modules/eslint-plugin-unused-imports": { - "version": "3.2.0", + "node_modules/eslint-plugin-react-naming-convention": { + "version": "1.53.1", "dev": true, "license": "MIT", "dependencies": { - "eslint-rule-composer": "^0.3.0" + "@eslint-react/ast": "1.53.1", + "@eslint-react/core": "1.53.1", + "@eslint-react/eff": "1.53.1", + "@eslint-react/kit": "1.53.1", + "@eslint-react/shared": "1.53.1", + "@eslint-react/var": "1.53.1", + "@typescript-eslint/scope-manager": "^8.43.0", + "@typescript-eslint/type-utils": "^8.43.0", + "@typescript-eslint/types": "^8.43.0", + "@typescript-eslint/utils": "^8.43.0", + "string-ts": "^2.2.1", + "ts-pattern": "^5.8.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=18.18.0" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "6 - 7", - "eslint": "8" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": "^4.9.5 || ^5.3.3" }, "peerDependenciesMeta": { - "@typescript-eslint/eslint-plugin": { + "eslint": { + "optional": false + }, + "typescript": { "optional": true } } }, - "node_modules/eslint-plugin-workspaces": { - "version": "0.9.0", + "node_modules/eslint-plugin-unused-imports": { + "version": "4.2.0", "dev": true, "license": "MIT", - "dependencies": { - "find-workspaces": "^0.2.0" + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", + "eslint": "^9.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + } } }, - "node_modules/eslint-rule-composer": { - "version": "0.3.0", + "node_modules/eslint-plugin-workspaces": { + "version": "0.11.0", "dev": true, "license": "MIT", - "engines": { - "node": ">=4.0.0" + "dependencies": { + "find-workspaces": "^0.3.1" } }, "node_modules/eslint-scope": { - "version": "7.2.2", + "version": "8.4.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -4538,34 +4704,12 @@ "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-utils": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=4" - } - }, "node_modules/eslint-visitor-keys": { "version": "3.4.3", "dev": true, @@ -4601,6 +4745,25 @@ "concat-map": "0.0.1" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/eslint/node_modules/json-schema-traverse": { "version": "0.4.1", "dev": true, @@ -4618,16 +4781,27 @@ } }, "node_modules/espree": { - "version": "9.6.1", + "version": "10.4.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4873,6 +5047,11 @@ "version": "3.1.3", "license": "MIT" }, + "node_modules/fast-diff": { + "version": "1.3.0", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/fast-fifo": { "version": "1.3.2", "dev": true, @@ -4985,14 +5164,14 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", + "version": "8.0.0", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/file-uri-to-path": { @@ -5091,13 +5270,13 @@ } }, "node_modules/find-workspaces": { - "version": "0.2.0", + "version": "0.3.1", "dev": true, "license": "MIT", "dependencies": { - "fast-glob": "^3.2.12", + "fast-glob": "^3.3.2", "pkg-types": "^1.0.3", - "yaml": "^2.3.1" + "yaml": "^2.3.4" } }, "node_modules/flat": { @@ -5109,16 +5288,15 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", + "version": "4.0.1", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { @@ -5332,10 +5510,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.10.0", + "version": "4.10.1", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -5408,20 +5585,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob/node_modules/minimatch": { - "version": "9.0.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/glob/node_modules/signal-exit": { "version": "4.1.0", "dev": true, @@ -5434,14 +5597,11 @@ } }, "node_modules/globals": { - "version": "13.24.0", + "version": "16.4.0", "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5481,6 +5641,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globby/node_modules/ignore": { + "version": "5.3.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/globrex": { + "version": "0.1.2", + "dev": true, + "license": "MIT" + }, "node_modules/gopd": { "version": "1.2.0", "license": "MIT", @@ -5777,7 +5950,7 @@ "license": "BSD-3-Clause" }, "node_modules/ignore": { - "version": "5.3.2", + "version": "7.0.5", "dev": true, "license": "MIT", "engines": { @@ -5978,21 +6151,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-builtin-module": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "builtin-modules": "^3.3.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-callable": { "version": "1.2.7", "license": "MIT", @@ -6164,6 +6322,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "dev": true, @@ -6187,14 +6356,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "2.1.0", "dev": true, @@ -7003,7 +7164,7 @@ } }, "node_modules/minimatch": { - "version": "9.0.3", + "version": "9.0.5", "dev": true, "license": "ISC", "dependencies": { @@ -7046,14 +7207,14 @@ } }, "node_modules/mlly": { - "version": "1.7.4", + "version": "1.8.0", "dev": true, "license": "MIT", "dependencies": { - "acorn": "^8.14.0", - "pathe": "^2.0.1", - "pkg-types": "^1.3.0", - "ufo": "^1.5.4" + "acorn": "^8.15.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.1" } }, "node_modules/mocha": { @@ -7116,20 +7277,6 @@ "dev": true, "license": "MIT" }, - "node_modules/mocha/node_modules/minimatch": { - "version": "9.0.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/mocha/node_modules/string-width": { "version": "4.2.3", "dev": true, @@ -7504,8 +7651,6 @@ }, "node_modules/node-mbus": { "version": "2.2.6", - "resolved": "https://registry.npmjs.org/node-mbus/-/node-mbus-2.2.6.tgz", - "integrity": "sha512-pfbuZSuY1428G7WHubI4Kwq3QBgJ/E4OAQ9MFyxf3gm3M+/aU2AO+ds/HjYPdfbNKCugmX0+HUAmoX1Qpqqo8g==", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -7519,8 +7664,6 @@ }, "node_modules/node-mbus/node_modules/nan": { "version": "2.23.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.23.0.tgz", - "integrity": "sha512-1UxuyYGdoQHcGg87Lkqm3FzefucTa0NAiOcuRsDmysep3c1LVCRK2krrUDafMWtjSG04htvAmvg96+SDknOmgQ==", "license": "MIT" }, "node_modules/node-netconf": { @@ -9214,6 +9357,17 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/pretty-quick": { "version": "4.1.1", "dev": true, @@ -9237,14 +9391,6 @@ "prettier": "^3.0.0" } }, - "node_modules/pretty-quick/node_modules/ignore": { - "version": "7.0.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/pretty-quick/node_modules/picomatch": { "version": "4.0.2", "dev": true, @@ -9575,17 +9721,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/require-directory": { "version": "2.1.1", "license": "MIT", @@ -9687,7 +9822,6 @@ "version": "1.0.0", "dev": true, "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } @@ -10439,6 +10573,18 @@ "version": "2.1.2", "license": "MIT" }, + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/streamsearch": { "version": "0.1.2", "engines": { @@ -10489,6 +10635,11 @@ ], "license": "MIT" }, + "node_modules/string-ts": { + "version": "2.2.1", + "dev": true, + "license": "MIT" + }, "node_modules/string-width": { "version": "5.1.2", "dev": true, @@ -10679,6 +10830,20 @@ "node": ">=0.10.0" } }, + "node_modules/synckit": { + "version": "0.11.11", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.2.9" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/synckit" + } + }, "node_modules/table-layout": { "version": "4.1.1", "dev": true, @@ -10699,6 +10864,18 @@ "node": ">=12.17" } }, + "node_modules/tapable": { + "version": "2.2.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/tar-fs": { "version": "3.0.8", "dev": true, @@ -10782,11 +10959,6 @@ "b4a": "^1.6.4" } }, - "node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, "node_modules/thenify-ex": { "version": "4.4.0", "license": "MIT" @@ -10858,14 +11030,46 @@ } }, "node_modules/ts-api-utils": { - "version": "1.4.3", + "version": "2.1.0", "dev": true, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/ts-declaration-location": { + "version": "1.0.7", + "dev": true, + "funding": [ + { + "type": "ko-fi", + "url": "https://ko-fi.com/rebeccastevens" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/ts-declaration-location" + } + ], + "license": "BSD-3-Clause", + "dependencies": { + "picomatch": "^4.0.2" }, "peerDependencies": { - "typescript": ">=4.2.0" + "typescript": ">=4.0.0" + } + }, + "node_modules/ts-declaration-location/node_modules/picomatch": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/ts-expect": { @@ -10922,6 +11126,11 @@ "node": ">=0.3.1" } }, + "node_modules/ts-pattern": { + "version": "5.8.0", + "dev": true, + "license": "MIT" + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "dev": true, @@ -11195,17 +11404,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/type-is": { "version": "1.6.18", "dev": true, @@ -11309,6 +11507,28 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.44.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.44.1", + "@typescript-eslint/parser": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/utils": "8.44.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, "node_modules/typescript-standard": { "version": "0.3.36", "dev": true, @@ -11920,14 +12140,14 @@ } }, "node_modules/yaml": { - "version": "2.7.1", + "version": "2.8.1", "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" } }, "node_modules/yargs": { diff --git a/package.json b/package.json index 3848e3cd9..51fbb8abe 100644 --- a/package.json +++ b/package.json @@ -54,21 +54,22 @@ "@types/node": "^18.19.76", "@types/readable-stream": "^4.0.15", "@types/sinon": "10.0.2", - "@typescript-eslint/eslint-plugin": "^6.7.3", - "@typescript-eslint/parser": "^6.7.3", + "@typescript-eslint/eslint-plugin": "^8.44.1", + "@typescript-eslint/parser": "^8.44.1", "c8": "^7.11.0", "chai": "^4.3.4", "chai-as-promised": "^7.1.1", "chai-spies": "^1.0.0", - "eslint": "^8.50.0", - "eslint-config-prettier": "^9.0.0", - "eslint-config-standard": "^17.1.0", - "eslint-plugin-import": "^2.24.2", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-notice": "^0.9.10", - "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-unused-imports": "^3.0.0", - "eslint-plugin-workspaces": "^0.9.0", + "eslint": "^9.36.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-n": "^17.23.1", + "eslint-plugin-notice": "^1.0.0", + "eslint-plugin-prettier": "^5.5.4", + "eslint-plugin-react-naming-convention": "^1.53.1", + "eslint-plugin-unused-imports": "^4.2.0", + "eslint-plugin-workspaces": "^0.11.0", + "globals": "^16.4.0", "husky": "^7.0.4", "mocha": "^11.7.2", "prettier": "3.3.3", @@ -78,6 +79,7 @@ "ts-node": "^10.9.1", "tslint": "5.12.1", "typescript": "^5.7.3", + "typescript-eslint": "^8.44.1", "typescript-standard": "^0.3.36", "wot-typescript-definitions": "0.8.0-SNAPSHOT.31" }, diff --git a/packages/binding-coap/.eslintrc.json b/packages/binding-coap/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/binding-coap/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} diff --git a/packages/binding-coap/src/coap-client.ts b/packages/binding-coap/src/coap-client.ts index 0fd3f0cf3..d264c7cfe 100644 --- a/packages/binding-coap/src/coap-client.ts +++ b/packages/binding-coap/src/coap-client.ts @@ -209,7 +209,6 @@ export default class CoapClient implements ProtocolClient { public setSecurity = (metadata: Array): boolean => true; private uriToOptions(uri: string): CoapRequestParams { - // eslint-disable-next-line n/no-deprecated-api const requestUri = url.parse(uri); const agentOptions = this.agentOptions; agentOptions.type = net.isIPv6(requestUri.hostname ?? "") ? "udp6" : "udp4"; diff --git a/packages/binding-file/.eslintrc.json b/packages/binding-file/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/binding-file/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} diff --git a/packages/binding-http/.eslintrc.json b/packages/binding-http/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/binding-http/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} diff --git a/packages/binding-mbus/.eslintrc.json b/packages/binding-mbus/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/binding-mbus/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} diff --git a/packages/binding-modbus/.eslintrc.json b/packages/binding-modbus/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/binding-modbus/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} diff --git a/packages/binding-mqtt/.eslintrc.json b/packages/binding-mqtt/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/binding-mqtt/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} diff --git a/packages/binding-netconf/.eslintrc.json b/packages/binding-netconf/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/binding-netconf/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} diff --git a/packages/binding-opcua/.eslintrc.json b/packages/binding-opcua/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/binding-opcua/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} diff --git a/packages/binding-websockets/.eslintrc.json b/packages/binding-websockets/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/binding-websockets/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} diff --git a/packages/cli/.eslintrc.json b/packages/cli/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/cli/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} diff --git a/packages/core/.eslintrc.json b/packages/core/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/core/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} diff --git a/packages/core/src/protocol-helpers.ts b/packages/core/src/protocol-helpers.ts index ca6de64ed..6c9076fcf 100644 --- a/packages/core/src/protocol-helpers.ts +++ b/packages/core/src/protocol-helpers.ts @@ -25,7 +25,7 @@ export interface IManagedStream { nodeStream: Readable; wotStream: ReadableStream; } -// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types +// eslint-disable-next-line @typescript-eslint/no-explicit-any function ManagedStream {}>(Base: TBase) { return class extends Base implements IManagedStream { _nodeStream?: Readable; diff --git a/packages/examples/.eslintrc.json b/packages/examples/.eslintrc.json deleted file mode 100644 index c4237119e..000000000 --- a/packages/examples/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.eslintrc.js" -} From d3424c00287362376db1a5e0154fffd8a2e2c0c3 Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Wed, 24 Sep 2025 07:24:06 +0200 Subject: [PATCH 02/16] chore(cli): fix filename to follow convention #1423 --- packages/cli/test/{RuntimeTest.ts => runtime-test.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/cli/test/{RuntimeTest.ts => runtime-test.ts} (100%) diff --git a/packages/cli/test/RuntimeTest.ts b/packages/cli/test/runtime-test.ts similarity index 100% rename from packages/cli/test/RuntimeTest.ts rename to packages/cli/test/runtime-test.ts From 3508e7690ee1475fe7c0992751e1734a0c7f121a Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Wed, 24 Sep 2025 07:30:14 +0200 Subject: [PATCH 03/16] chore(core): fix filename to follow convention #1423 --- packages/core/test/{ClientTest.ts => client-test.ts} | 0 .../core/test/{ContentSerdesTest.ts => content-serdes-test.ts} | 0 packages/core/test/{DiscoveryTest.ts => discovery-test.ts} | 0 packages/core/test/{HelpersTest.ts => helpers-test.ts} | 0 .../{InteractionOutputTest.ts => interaction-output-test.ts} | 2 +- ...ocolHelpersStreamTest.ts => protocol-helpers-stream-test.ts} | 0 .../test/{ProtocolHelpersTest.ts => protocol-helpers-test.ts} | 2 +- ...stenerRegistryTest.ts => protocol-listener-registry-test.ts} | 0 packages/core/test/{SerDesTest.ts => ser-des-test.ts} | 0 packages/core/test/{ServerTest.ts => server-test.ts} | 0 10 files changed, 2 insertions(+), 2 deletions(-) rename packages/core/test/{ClientTest.ts => client-test.ts} (100%) rename packages/core/test/{ContentSerdesTest.ts => content-serdes-test.ts} (100%) rename packages/core/test/{DiscoveryTest.ts => discovery-test.ts} (100%) rename packages/core/test/{HelpersTest.ts => helpers-test.ts} (100%) rename packages/core/test/{InteractionOutputTest.ts => interaction-output-test.ts} (99%) rename packages/core/test/{ProtocolHelpersStreamTest.ts => protocol-helpers-stream-test.ts} (100%) rename packages/core/test/{ProtocolHelpersTest.ts => protocol-helpers-test.ts} (99%) rename packages/core/test/{ProtocolListenerRegistryTest.ts => protocol-listener-registry-test.ts} (100%) rename packages/core/test/{SerDesTest.ts => ser-des-test.ts} (100%) rename packages/core/test/{ServerTest.ts => server-test.ts} (100%) diff --git a/packages/core/test/ClientTest.ts b/packages/core/test/client-test.ts similarity index 100% rename from packages/core/test/ClientTest.ts rename to packages/core/test/client-test.ts diff --git a/packages/core/test/ContentSerdesTest.ts b/packages/core/test/content-serdes-test.ts similarity index 100% rename from packages/core/test/ContentSerdesTest.ts rename to packages/core/test/content-serdes-test.ts diff --git a/packages/core/test/DiscoveryTest.ts b/packages/core/test/discovery-test.ts similarity index 100% rename from packages/core/test/DiscoveryTest.ts rename to packages/core/test/discovery-test.ts diff --git a/packages/core/test/HelpersTest.ts b/packages/core/test/helpers-test.ts similarity index 100% rename from packages/core/test/HelpersTest.ts rename to packages/core/test/helpers-test.ts diff --git a/packages/core/test/InteractionOutputTest.ts b/packages/core/test/interaction-output-test.ts similarity index 99% rename from packages/core/test/InteractionOutputTest.ts rename to packages/core/test/interaction-output-test.ts index a7b247286..4ab0f41ae 100644 --- a/packages/core/test/InteractionOutputTest.ts +++ b/packages/core/test/interaction-output-test.ts @@ -19,7 +19,7 @@ import promised from "chai-as-promised"; import { expect, use } from "chai"; import { Readable } from "stream"; import { InteractionOutput, ActionInteractionOutput } from "../src/interaction-output"; -import { Content } from ".."; +import { Content } from "../dist/core"; import { fail } from "assert"; use(promised); diff --git a/packages/core/test/ProtocolHelpersStreamTest.ts b/packages/core/test/protocol-helpers-stream-test.ts similarity index 100% rename from packages/core/test/ProtocolHelpersStreamTest.ts rename to packages/core/test/protocol-helpers-stream-test.ts diff --git a/packages/core/test/ProtocolHelpersTest.ts b/packages/core/test/protocol-helpers-test.ts similarity index 99% rename from packages/core/test/ProtocolHelpersTest.ts rename to packages/core/test/protocol-helpers-test.ts index 4ae26ec96..bd03520bd 100644 --- a/packages/core/test/ProtocolHelpersTest.ts +++ b/packages/core/test/protocol-helpers-test.ts @@ -23,7 +23,7 @@ import { suite, test } from "@testdeck/mocha"; import { Form } from "../src/thing-description"; import { expect } from "chai"; -import { ProtocolHelpers } from ".."; +import { ProtocolHelpers } from "../dist/core"; import { ActionElement, EventElement, PropertyElement } from "wot-thing-description-types"; @suite("Protocol Helpers") diff --git a/packages/core/test/ProtocolListenerRegistryTest.ts b/packages/core/test/protocol-listener-registry-test.ts similarity index 100% rename from packages/core/test/ProtocolListenerRegistryTest.ts rename to packages/core/test/protocol-listener-registry-test.ts diff --git a/packages/core/test/SerDesTest.ts b/packages/core/test/ser-des-test.ts similarity index 100% rename from packages/core/test/SerDesTest.ts rename to packages/core/test/ser-des-test.ts diff --git a/packages/core/test/ServerTest.ts b/packages/core/test/server-test.ts similarity index 100% rename from packages/core/test/ServerTest.ts rename to packages/core/test/server-test.ts From ffec196df630db73a394c8dfa71388b40117157c Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Wed, 24 Sep 2025 07:30:52 +0200 Subject: [PATCH 04/16] chore(eslint): enforce filenaming convention check #1423 --- eslint.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index c2caf9a4e..e2db4b368 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -102,7 +102,7 @@ export default defineConfig([ // **************** enforece kebab-case for filenames **************** "react-naming-convention/filename": [ - "warn", + "error", { rule: "kebab-case", }, From 2af73e295fecbc71ab7c0f65a35db4267c9f3d39 Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 08:12:00 +0200 Subject: [PATCH 05/16] chore(eslint): activate @typescript-eslint/no-floating-promises rule as warning --- eslint.config.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index e2db4b368..a1639dded 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -115,6 +115,7 @@ export default defineConfig([ "@typescript-eslint/no-require-imports": "warn", "@typescript-eslint/prefer-nullish-coalescing": "warn", "@typescript-eslint/no-empty-object-type": "warn", + "@typescript-eslint/no-floating-promises": "warn", // **************** Enforce usage of `const` over `let` wherever possible, to prevent accidental reassignments "prefer-const": "warn", From 95b0fd0c48f1038a846379c48abce7b784cd2cd8 Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 08:12:34 +0200 Subject: [PATCH 06/16] chore(binding-opcua): fix floating promise issues --- packages/binding-opcua/package.json | 3 ++- .../src/certificate-manager-singleton.ts | 4 ++-- packages/binding-opcua/src/factory.ts | 6 ++++-- .../binding-opcua/src/opcua-protocol-client.ts | 4 ++-- packages/binding-opcua/test/client-test.ts | 16 ++++++++++++---- .../test/fixture/basic-opcua-server.ts | 12 +++++++----- .../binding-opcua/test/full-opcua-thing-test.ts | 6 ++++-- .../binding-opcua/test/opcua-security-test.ts | 6 +++--- packages/binding-opcua/test/who-am-i-test.ts | 4 +++- 9 files changed, 39 insertions(+), 22 deletions(-) diff --git a/packages/binding-opcua/package.json b/packages/binding-opcua/package.json index c2271f923..7ec0a8c60 100644 --- a/packages/binding-opcua/package.json +++ b/packages/binding-opcua/package.json @@ -15,7 +15,8 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "devDependencies": { - "should": "^13.2.3" + "should": "^13.2.3", + "chai": "^4.3.4" }, "dependencies": { "@node-wot/core": "0.9.2", diff --git a/packages/binding-opcua/src/certificate-manager-singleton.ts b/packages/binding-opcua/src/certificate-manager-singleton.ts index c1d3356a8..b25718793 100644 --- a/packages/binding-opcua/src/certificate-manager-singleton.ts +++ b/packages/binding-opcua/src/certificate-manager-singleton.ts @@ -43,11 +43,11 @@ export class CertificateManagerSingleton { return certificateManager; } - public static releaseCertificateManager(): void { + public static async releaseCertificateManager(): Promise { if (CertificateManagerSingleton._certificateManager) { CertificateManagerSingleton._certificateManager.referenceCounter--; // dispose is degined to free resources if referenceCounter==0; - CertificateManagerSingleton._certificateManager.dispose(); + await CertificateManagerSingleton._certificateManager.dispose(); CertificateManagerSingleton._certificateManager = null; } } diff --git a/packages/binding-opcua/src/factory.ts b/packages/binding-opcua/src/factory.ts index efd6d1f25..b0fa3e7d7 100644 --- a/packages/binding-opcua/src/factory.ts +++ b/packages/binding-opcua/src/factory.ts @@ -17,7 +17,7 @@ import { ProtocolClientFactory, ProtocolClient, ContentSerdes, createLoggers } f import { OpcuaJSONCodec, OpcuaBinaryCodec } from "./codec"; import { OPCUAProtocolClient } from "./opcua-protocol-client"; -const { debug } = createLoggers("binding-opcua", "factory"); +const { debug, error } = createLoggers("binding-opcua", "factory"); export class OPCUAClientFactory implements ProtocolClientFactory { readonly scheme: string = "opc.tcp"; @@ -54,7 +54,9 @@ export class OPCUAClientFactory implements ProtocolClientFactory { for (const client of clients) { await client.stop(); } - })(); + })().catch((err) => { + error("Error destroying clients", err); + }); return true; } } diff --git a/packages/binding-opcua/src/opcua-protocol-client.ts b/packages/binding-opcua/src/opcua-protocol-client.ts index f3141f67c..08bb99278 100644 --- a/packages/binding-opcua/src/opcua-protocol-client.ts +++ b/packages/binding-opcua/src/opcua-protocol-client.ts @@ -495,7 +495,7 @@ export class OPCUAProtocolClient implements ProtocolClient { async unlinkResource(form: OPCUAForm): Promise { debug(`unlinkResource: form ${OPCUAProtocolClient.getNodeId(form)}`); - this._withSubscription(form, async (session, subscription) => { + await this._withSubscription(form, async (session, subscription) => { const nodeId = await this._resolveNodeId(form); await this._unmonitor(nodeId); }); @@ -520,7 +520,7 @@ export class OPCUAProtocolClient implements ProtocolClient { await connection.session.close(); await connection.client.disconnect(); } - CertificateManagerSingleton.releaseCertificateManager(); + await CertificateManagerSingleton.releaseCertificateManager(); } #setChannelSecurity(security: OPCUAChannelSecurityScheme): boolean { diff --git a/packages/binding-opcua/test/client-test.ts b/packages/binding-opcua/test/client-test.ts index d776b5259..9daab33a2 100644 --- a/packages/binding-opcua/test/client-test.ts +++ b/packages/binding-opcua/test/client-test.ts @@ -170,10 +170,18 @@ describe("OPCUA Client", function () { resolve(); } }; - client.subscribeResource(form, onSubscribedValueChanged); - client.subscribeResource(form, onSubscribedValueChanged); - client.subscribeResource(form, onSubscribedValueChanged); - client.subscribeResource(form, onSubscribedValueChanged); + client.subscribeResource(form, onSubscribedValueChanged).catch((err) => { + debug("Error in subscribeResource 1:", err); + }); + client.subscribeResource(form, onSubscribedValueChanged).catch((err) => { + debug("Error in subscribeResource 2:", err); + }); + client.subscribeResource(form, onSubscribedValueChanged).catch((err) => { + debug("Error in subscribeResource 3:", err); + }); + client.subscribeResource(form, onSubscribedValueChanged).catch((err) => { + debug("Error in subscribeResource 4:", err); + }); }); }); diff --git a/packages/binding-opcua/test/fixture/basic-opcua-server.ts b/packages/binding-opcua/test/fixture/basic-opcua-server.ts index e8c03fba3..2ed547142 100644 --- a/packages/binding-opcua/test/fixture/basic-opcua-server.ts +++ b/packages/binding-opcua/test/fixture/basic-opcua-server.ts @@ -295,10 +295,12 @@ export async function startServer(): Promise { } if (require.main === module) { - (async () => { + const main = async () => { const server = await startServer(); - process.once("SIGINT", () => { - server.shutdown(); - }); - })(); + await new Promise((resolve) => process.once("SIGINT", resolve)); + await server.shutdown(); + }; + main().catch((err) => { + info("Error = ", err); + }); } diff --git a/packages/binding-opcua/test/full-opcua-thing-test.ts b/packages/binding-opcua/test/full-opcua-thing-test.ts index 1d49f30d1..ce5e6a34d 100644 --- a/packages/binding-opcua/test/full-opcua-thing-test.ts +++ b/packages/binding-opcua/test/full-opcua-thing-test.ts @@ -25,7 +25,7 @@ import { OPCUAClientFactory } from "../src"; import { startServer } from "./fixture/basic-opcua-server"; const endpoint = "opc.tcp://localhost:7890"; -const { debug } = createLoggers("binding-opcua", "full-opcua-thing-test"); +const { debug, info } = createLoggers("binding-opcua", "full-opcua-thing-test"); const thingDescription: WoT.ThingDescription = { "@context": "https://www.w3.org/2019/wot/td/v1", @@ -345,7 +345,9 @@ describe("Full OPCUA Thing Test", () => { const wot = await servient.start(); const thing = await wot.produce(thingDescription); - thing.expose(); + thing.expose().catch((err) => { + info(`Cannot expose thing: ${err.message}`); + }); let temperature = 10; const readHandler = async () => temperature; diff --git a/packages/binding-opcua/test/opcua-security-test.ts b/packages/binding-opcua/test/opcua-security-test.ts index eb615f224..8763b06db 100644 --- a/packages/binding-opcua/test/opcua-security-test.ts +++ b/packages/binding-opcua/test/opcua-security-test.ts @@ -337,13 +337,13 @@ describe("Testing OPCUA Security Combination", () => { // Client should trust client certificate const serverCertificate = opcuaServer.getCertificate(); - clientCertificateManager.trustCertificate(serverCertificate); + await clientCertificateManager.trustCertificate(serverCertificate); // Server should trust application client certificate const client = OPCUAClient.create({ clientCertificateManager }); await client.createDefaultCertificate(); const clientCertificate = client.getCertificateChain(); - serverCertificateManager.trustCertificate(clientCertificate); + await serverCertificateManager.trustCertificate(clientCertificate); // let's create the x509 Certificate for User JoeDoe const joedoeX509CertificateFilename = path.join( @@ -363,7 +363,7 @@ describe("Testing OPCUA Security Combination", () => { // server should trust x509 User certificate const userCertificateManager = opcuaServer.userCertificateManager; - userCertificateManager.trustCertificate(joedoeX509Cerficate); + await userCertificateManager.trustCertificate(joedoeX509Cerficate); // adjust thingDescription x509 parameters with generated certficate info const joedoeX509CertificatePem = readCertificatePEM(joedoeX509CertificateFilename); diff --git a/packages/binding-opcua/test/who-am-i-test.ts b/packages/binding-opcua/test/who-am-i-test.ts index 65e98addf..11ec6c8ff 100644 --- a/packages/binding-opcua/test/who-am-i-test.ts +++ b/packages/binding-opcua/test/who-am-i-test.ts @@ -13,7 +13,6 @@ * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ import { expect } from "chai"; -import debug from "debug"; import { OPCUAServer } from "node-opcua"; import { @@ -26,6 +25,9 @@ import { UserTokenType, } from "node-opcua-client"; import { startServer } from "./fixture/basic-opcua-server"; +import { createLoggers } from "@node-wot/core"; + +const { debug } = createLoggers("binding-opcua", "who-am-i-test"); interface WhoAmIResult { userName?: string; From bdde9769df25051cbcfa4491e4797ed2b478c963 Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 10:55:34 +0200 Subject: [PATCH 07/16] chore(binding-http): remove console.log from tests (eslint) --- packages/binding-http/test/http-server-oauth-tests.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/binding-http/test/http-server-oauth-tests.ts b/packages/binding-http/test/http-server-oauth-tests.ts index 5ccc206b7..d15386c09 100644 --- a/packages/binding-http/test/http-server-oauth-tests.ts +++ b/packages/binding-http/test/http-server-oauth-tests.ts @@ -26,13 +26,6 @@ should(); class OAuthServerTests { private server!: HttpServer; async before() { - // eslint-disable-next-line @typescript-eslint/no-empty-function - console.debug = () => {}; - // eslint-disable-next-line @typescript-eslint/no-empty-function - console.warn = () => {}; - // eslint-disable-next-line @typescript-eslint/no-empty-function - console.info = () => {}; - const method: IntrospectionEndpoint = { name: "introspection_endpoint", endpoint: "http://localhost:4242", From 9ca66ae78b001b1d9d630b042abcb6a9da4c10b8 Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 10:58:24 +0200 Subject: [PATCH 08/16] chore(binding-mbus): remove console.log from tests (eslint) --- packages/binding-mbus/test/mbus-client-test.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/packages/binding-mbus/test/mbus-client-test.ts b/packages/binding-mbus/test/mbus-client-test.ts index 114a464ed..839d1f823 100644 --- a/packages/binding-mbus/test/mbus-client-test.ts +++ b/packages/binding-mbus/test/mbus-client-test.ts @@ -25,25 +25,12 @@ chai.use(chaiAsPromised); describe("mbus client test", () => { let client: MBusClient; - before(() => { - // Turn off logging to have a clean test log - console.debug = () => { - /* nothing */ - }; - console.warn = () => { - /* nothing */ - }; - }); - beforeEach(() => { client = new MBusClient(); }); afterEach(() => { client.stop(); }); - after(() => { - /* nothing */ - }); it("should override form values with URL", function () { if (process.platform === "win32") { From 5d0df778caa67bfcb80d33548981ae648ef68a82 Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 10:59:01 +0200 Subject: [PATCH 09/16] chore(binding-http): remove console.log from tests (eslint) --- packages/binding-http/test/oauth-token-validation-tests.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/binding-http/test/oauth-token-validation-tests.ts b/packages/binding-http/test/oauth-token-validation-tests.ts index aaa94e304..ef1a2b5cd 100644 --- a/packages/binding-http/test/oauth-token-validation-tests.ts +++ b/packages/binding-http/test/oauth-token-validation-tests.ts @@ -44,13 +44,6 @@ describe("OAuth2.0 Validator tests", () => { private validator!: Validator; static server: http.Server; static before() { - // eslint-disable-next-line @typescript-eslint/no-empty-function - console.debug = () => {}; - // eslint-disable-next-line @typescript-eslint/no-empty-function - console.warn = () => {}; - // eslint-disable-next-line @typescript-eslint/no-empty-function - console.info = () => {}; - const tokens = ["active", "noScopes", "notActive"]; const introspectEndpoint: express.Express = express(); From b70c51f2f851d5899c1d8d203467d5fd7e86694e Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 10:59:38 +0200 Subject: [PATCH 10/16] chore(binding-modbus): remove console.log from tests (eslint) --- packages/binding-modbus/test/modbus-client-test.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/binding-modbus/test/modbus-client-test.ts b/packages/binding-modbus/test/modbus-client-test.ts index ea3197e2a..f9e22b321 100644 --- a/packages/binding-modbus/test/modbus-client-test.ts +++ b/packages/binding-modbus/test/modbus-client-test.ts @@ -31,14 +31,6 @@ describe("Modbus client test", () => { let testServer: ModbusServer; before(async () => { - // Turn off logging to have a clean test log - console.debug = () => { - // Do nothing. - }; - console.warn = () => { - // Do nothing. - }; - testServer = new ModbusServer(1); await testServer.start(); }); From 5e617d422c716ac2759167a328f1e25bd386f905 Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 11:04:36 +0200 Subject: [PATCH 11/16] chore(cli): fix eslint console.log issue --- packages/cli/src/cli-default-servient.ts | 1 + packages/cli/test/runtime-test.ts | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/cli-default-servient.ts b/packages/cli/src/cli-default-servient.ts index dfb798235..fdba4ea7b 100644 --- a/packages/cli/src/cli-default-servient.ts +++ b/packages/cli/src/cli-default-servient.ts @@ -13,6 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ // global W3C WoT Scripting API definitions import * as WoT from "wot-typescript-definitions"; diff --git a/packages/cli/test/runtime-test.ts b/packages/cli/test/runtime-test.ts index 46e5d21d5..3030e4d61 100644 --- a/packages/cli/test/runtime-test.ts +++ b/packages/cli/test/runtime-test.ts @@ -25,6 +25,7 @@ import { should, assert } from "chai"; import DefaultServient from "../src/cli-default-servient"; import fs from "fs"; +import { EventEmitter } from "stream"; // should must be called to augment all variables should(); @@ -39,13 +40,7 @@ class WoTRuntimeTest { }; static async before() { - // We need to disable this check for killing servient logs - /* eslint-disable @typescript-eslint/no-empty-function */ - console.error = () => {}; - console.debug = () => {}; - console.warn = () => {}; - console.info = () => {}; - /* eslint-enable @typescript-eslint/no-empty-function */ + EventEmitter.setMaxListeners(20); this.servient = new DefaultServient(true); await this.servient.start(); } From 78b893eee322ff7dc971b70f9877246472cf347a Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 11:10:01 +0200 Subject: [PATCH 12/16] chore(examples): fix eslint console.log issue --- .../src/bindings/coap/example-client.ts | 2 +- .../src/bindings/coap/example-server.ts | 1 + .../src/bindings/http/example-client.ts | 1 + .../bindings/http/example-server-secure.ts | 1 + .../src/bindings/http/example-server.ts | 1 + .../src/bindings/opcua/demo-opcua1.ts | 5 +- .../src/bindings/opcua/demo-opcua2.ts | 22 ++- .../opcua/opcua-coffee-machine-demo.ts | 40 ++++-- .../src/quickstart/presence-sensor.ts | 1 + .../src/quickstart/simple-coffee-machine.ts | 1 + .../examples/src/quickstart/smart-clock.ts | 1 + packages/examples/src/scripts/countdown.ts | 1 + .../examples/src/scripts/counter-client.ts | 1 + packages/examples/src/scripts/counter.ts | 1 + .../scripts/smart-coffee-machine-client.ts | 131 ++++++++++-------- .../src/scripts/smart-coffee-machine.ts | 12 +- .../examples/src/security/oauth/consumer.ts | 22 +-- .../examples/src/security/oauth/exposer.ts | 17 ++- packages/examples/src/testthing/testclient.ts | 1 + packages/examples/src/testthing/testthing.ts | 12 +- 20 files changed, 170 insertions(+), 104 deletions(-) diff --git a/packages/examples/src/bindings/coap/example-client.ts b/packages/examples/src/bindings/coap/example-client.ts index 6e03307fd..93449c781 100644 --- a/packages/examples/src/bindings/coap/example-client.ts +++ b/packages/examples/src/bindings/coap/example-client.ts @@ -12,7 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ - +/* eslint no-console: "off" */ import { Servient } from "@node-wot/core"; import { CoapClientFactory } from "@node-wot/binding-coap"; diff --git a/packages/examples/src/bindings/coap/example-server.ts b/packages/examples/src/bindings/coap/example-server.ts index 4e7f528f9..1da883c2b 100644 --- a/packages/examples/src/bindings/coap/example-server.ts +++ b/packages/examples/src/bindings/coap/example-server.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ import { Servient } from "@node-wot/core"; import { CoapServer } from "@node-wot/binding-coap"; diff --git a/packages/examples/src/bindings/http/example-client.ts b/packages/examples/src/bindings/http/example-client.ts index 417f83de3..22b468b78 100644 --- a/packages/examples/src/bindings/http/example-client.ts +++ b/packages/examples/src/bindings/http/example-client.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ import { Servient } from "@node-wot/core"; import { HttpClientFactory } from "@node-wot/binding-http"; diff --git a/packages/examples/src/bindings/http/example-server-secure.ts b/packages/examples/src/bindings/http/example-server-secure.ts index ee69cd675..a608f5b0f 100644 --- a/packages/examples/src/bindings/http/example-server-secure.ts +++ b/packages/examples/src/bindings/http/example-server-secure.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ import { Servient } from "@node-wot/core"; import { HttpServer } from "@node-wot/binding-http"; diff --git a/packages/examples/src/bindings/http/example-server.ts b/packages/examples/src/bindings/http/example-server.ts index a1441017e..f80f54dae 100644 --- a/packages/examples/src/bindings/http/example-server.ts +++ b/packages/examples/src/bindings/http/example-server.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ import { Servient } from "@node-wot/core"; import { HttpServer } from "@node-wot/binding-http"; diff --git a/packages/examples/src/bindings/opcua/demo-opcua1.ts b/packages/examples/src/bindings/opcua/demo-opcua1.ts index 3f58c1e34..96b5b532e 100644 --- a/packages/examples/src/bindings/opcua/demo-opcua1.ts +++ b/packages/examples/src/bindings/opcua/demo-opcua1.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ import { Servient } from "@node-wot/core"; import { OPCUAClientFactory } from "@node-wot/binding-opcua"; @@ -32,4 +33,6 @@ import { thingDescription } from "./demo-opcua-thing-description"; console.log("------------------------------"); await servient.shutdown(); -})(); +})().catch((err) => { + console.error("Script error:", err); +}); diff --git a/packages/examples/src/bindings/opcua/demo-opcua2.ts b/packages/examples/src/bindings/opcua/demo-opcua2.ts index c1a95981c..b618ab1e4 100644 --- a/packages/examples/src/bindings/opcua/demo-opcua2.ts +++ b/packages/examples/src/bindings/opcua/demo-opcua2.ts @@ -12,6 +12,8 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ + import { Servient } from "@node-wot/core"; import { OPCUAClientFactory } from "@node-wot/binding-opcua"; import { thingDescription } from "./demo-opcua-thing-description"; @@ -23,14 +25,20 @@ import { thingDescription } from "./demo-opcua-thing-description"; const wot = await servient.start(); const thing = await wot.consume(thingDescription); - thing.observeProperty("temperature", async (data) => { - const temperature = await data.value(); - console.log("------------------------------"); - console.log("temperature : ", temperature, "m/s"); - console.log("------------------------------"); - }); + thing + .observeProperty("temperature", async (data) => { + const temperature = await data.value(); + console.log("------------------------------"); + console.log("temperature : ", temperature, "m/s"); + console.log("------------------------------"); + }) + .catch((err) => { + console.error("Error observing temperature property:", err); + }); await new Promise((resolve) => setTimeout(resolve, 10000)); await servient.shutdown(); -})(); +})().catch((err) => { + console.error("Script error:", err); +}); diff --git a/packages/examples/src/bindings/opcua/opcua-coffee-machine-demo.ts b/packages/examples/src/bindings/opcua/opcua-coffee-machine-demo.ts index 1596eac1a..57788c5d0 100644 --- a/packages/examples/src/bindings/opcua/opcua-coffee-machine-demo.ts +++ b/packages/examples/src/bindings/opcua/opcua-coffee-machine-demo.ts @@ -12,6 +12,9 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ + +/* eslint no-console: "off" */ + import { Servient } from "@node-wot/core"; import { OPCUAClientFactory } from "@node-wot/binding-opcua"; import { thingDescription } from "./opcua-coffee-machine-thing-description"; @@ -25,18 +28,27 @@ const pause = async (ms: number) => new Promise((resolve) => setTimeout(resolve, const thing = await wot.consume(thingDescription); try { - thing.observeProperty("waterTankLevel", async (data) => { - const waterTankLevel = await data.value(); - console.log("------------------------------"); - console.log("tankLevel : ", waterTankLevel, "ml"); - console.log("------------------------------"); - }); - thing.observeProperty("coffeeBeanLevel", async (data) => { - const coffeBeanLevel = await data.value(); - console.log("------------------------------"); - console.log("bean level : ", coffeBeanLevel, "g"); - console.log("------------------------------"); - }); + thing + .observeProperty("waterTankLevel", async (data) => { + const waterTankLevel = await data.value(); + console.log("------------------------------"); + console.log("tankLevel : ", waterTankLevel, "ml"); + console.log("------------------------------"); + }) + .catch((err) => { + console.error("Error observing waterTankLevel property:", err); + }); + thing + .observeProperty("coffeeBeanLevel", async (data) => { + const coffeBeanLevel = await data.value(); + console.log("------------------------------"); + console.log("bean level : ", coffeBeanLevel, "g"); + console.log("------------------------------"); + }) + .catch((err) => { + console.error("Error observing coffeeBeanLevel property:", err); + }); + await thing.invokeAction("brewCoffee", { CoffeeType: 1 }); await pause(5000); await thing.invokeAction("brewCoffee", { CoffeeType: 0 }); @@ -47,4 +59,6 @@ const pause = async (ms: number) => new Promise((resolve) => setTimeout(resolve, } finally { await servient.shutdown(); } -})(); +})().catch((err) => { + console.error("Script error:", err); +}); diff --git a/packages/examples/src/quickstart/presence-sensor.ts b/packages/examples/src/quickstart/presence-sensor.ts index cb6614e01..f85fb351d 100644 --- a/packages/examples/src/quickstart/presence-sensor.ts +++ b/packages/examples/src/quickstart/presence-sensor.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ // This is an example Thing script which is a simple presence detector // It fires an event when it detects a person (mocked as every 5 second) diff --git a/packages/examples/src/quickstart/simple-coffee-machine.ts b/packages/examples/src/quickstart/simple-coffee-machine.ts index 69fdc7c2f..1f5efd6e2 100644 --- a/packages/examples/src/quickstart/simple-coffee-machine.ts +++ b/packages/examples/src/quickstart/simple-coffee-machine.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ // This is an example Thing script which is a simple coffee machine. // You can order coffee and see the status of the resources diff --git a/packages/examples/src/quickstart/smart-clock.ts b/packages/examples/src/quickstart/smart-clock.ts index 2043dbcb1..c996a2aef 100644 --- a/packages/examples/src/quickstart/smart-clock.ts +++ b/packages/examples/src/quickstart/smart-clock.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ // This is an example Thing which is a smart clock that runs 60 times faster than real time, where 1 hour happens in 1 minute. diff --git a/packages/examples/src/scripts/countdown.ts b/packages/examples/src/scripts/countdown.ts index b1e4e70b1..1e41e7131 100644 --- a/packages/examples/src/scripts/countdown.ts +++ b/packages/examples/src/scripts/countdown.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ function uuidv4(): string { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { diff --git a/packages/examples/src/scripts/counter-client.ts b/packages/examples/src/scripts/counter-client.ts index 6e143c617..44a9d4798 100644 --- a/packages/examples/src/scripts/counter-client.ts +++ b/packages/examples/src/scripts/counter-client.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ function getFormIndexForDecrementWithCoAP(thing: WoT.ConsumedThing): number { const forms = thing.getThingDescription().actions?.decrement.forms; diff --git a/packages/examples/src/scripts/counter.ts b/packages/examples/src/scripts/counter.ts index 6b561b657..55afa7c4e 100644 --- a/packages/examples/src/scripts/counter.ts +++ b/packages/examples/src/scripts/counter.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ // This is an example Thing script. // It has a count property that can be incremented or decremented via actions and its changes are reported via events. diff --git a/packages/examples/src/scripts/smart-coffee-machine-client.ts b/packages/examples/src/scripts/smart-coffee-machine-client.ts index ab81b579b..f61aca6ce 100644 --- a/packages/examples/src/scripts/smart-coffee-machine-client.ts +++ b/packages/examples/src/scripts/smart-coffee-machine-client.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ // This is an example of Web of Things consumer ("client" mode) Thing script. // It considers a fictional smart coffee machine in order to demonstrate the capabilities of Web of Things. @@ -25,73 +26,85 @@ function log(msg: string, data: unknown) { console.info("======================"); } -WoT.requestThingDescription("http://127.0.0.1:8080/smart-coffee-machine").then(async (td) => { - try { - const thing = await WoT.consume(td); - log("Thing Description:", td); +WoT.requestThingDescription("http://127.0.0.1:8080/smart-coffee-machine") + .then(async (td) => { + try { + const thing = await WoT.consume(td); + log("Thing Description:", td); - // Read property allAvailableResources - let allAvailableResources = await (await thing.readProperty("allAvailableResources")).value(); - log("allAvailableResources value is:", allAvailableResources); + // Read property allAvailableResources + let allAvailableResources = await (await thing.readProperty("allAvailableResources")).value(); + log("allAvailableResources value is:", allAvailableResources); - // Now let's change water level to 80 - await thing.writeProperty("availableResourceLevel", 80, { uriVariables: { id: "water" } }); + // Now let's change water level to 80 + await thing.writeProperty("availableResourceLevel", 80, { uriVariables: { id: "water" } }); - // And see that the water level has changed - const waterLevel = await ( - await thing.readProperty("availableResourceLevel", { uriVariables: { id: "water" } }) - ).value(); - log("waterLevel value after change is:", waterLevel); + // And see that the water level has changed + const waterLevel = await ( + await thing.readProperty("availableResourceLevel", { uriVariables: { id: "water" } }) + ).value(); + log("waterLevel value after change is:", waterLevel); - // This can also be seen in allAvailableResources property - allAvailableResources = await (await thing.readProperty("allAvailableResources")).value(); - log("allAvailableResources value after change is:", allAvailableResources); + // This can also be seen in allAvailableResources property + allAvailableResources = await (await thing.readProperty("allAvailableResources")).value(); + log("allAvailableResources value after change is:", allAvailableResources); - // It's also possible to set a client-side handler for observable properties - thing.observeProperty("maintenanceNeeded", async (data) => { - log("maintenanceNeeded property has changed! New value is:", await data.value()); - }); + // It's also possible to set a client-side handler for observable properties + thing + .observeProperty("maintenanceNeeded", async (data) => { + log("maintenanceNeeded property has changed! New value is:", await data.value()); + }) + .catch((err) => { + console.error("Error observing maintenanceNeeded property:", err); + }); - // Now let's make 3 cups of latte! - const makeCoffee = await thing.invokeAction("makeDrink", undefined, { - uriVariables: { drinkId: "latte", size: "l", quantity: 3 }, - }); - const makeCoffeep = (await makeCoffee?.value()) as Record; - if (makeCoffeep.result != null) { - log("Enjoy your drink!", makeCoffeep); - } else { - log("Failed making your drink:", makeCoffeep); - } + // Now let's make 3 cups of latte! + const makeCoffee = await thing.invokeAction("makeDrink", undefined, { + uriVariables: { drinkId: "latte", size: "l", quantity: 3 }, + }); + const makeCoffeep = (await makeCoffee?.value()) as Record; + if (makeCoffeep.result != null) { + log("Enjoy your drink!", makeCoffeep); + } else { + log("Failed making your drink:", makeCoffeep); + } - // See how allAvailableResources property value has changed - allAvailableResources = await (await thing.readProperty("allAvailableResources")).value(); - log("allAvailableResources value is:", allAvailableResources); + // See how allAvailableResources property value has changed + allAvailableResources = await (await thing.readProperty("allAvailableResources")).value(); + log("allAvailableResources value is:", allAvailableResources); - // Let's add a scheduled task - const scheduledTask = await thing.invokeAction("setSchedule", { - drinkId: "espresso", - size: "m", - quantity: 2, - time: "10:00", - mode: "everyday", - }); - const scheduledTaskp = (await scheduledTask?.value()) as Record; - log(scheduledTaskp.message, scheduledTaskp); + // Let's add a scheduled task + const scheduledTask = await thing.invokeAction("setSchedule", { + drinkId: "espresso", + size: "m", + quantity: 2, + time: "10:00", + mode: "everyday", + }); + const scheduledTaskp = (await scheduledTask?.value()) as Record; + log(scheduledTaskp.message, scheduledTaskp); - // See how it has been added to the schedules property - const schedules = await (await thing.readProperty("schedules")).value(); - log("schedules value: ", schedules); + // See how it has been added to the schedules property + const schedules = await (await thing.readProperty("schedules")).value(); + log("schedules value: ", schedules); - // Let's set up a handler for outOfResource event - thing.subscribeEvent("outOfResource", async (data) => { - // Here we are simply logging the message when the event is emitted - // But, of course, could have a much more sophisticated handler - log("outOfResource event:", await data.value()); - }); + // Let's set up a handler for outOfResource event + thing + .subscribeEvent("outOfResource", async (data) => { + // Here we are simply logging the message when the event is emitted + // But, of course, could have a much more sophisticated handler + log("outOfResource event:", await data.value()); + }) + .catch((err) => { + console.error("Error subscribing to outOfResource event:", err); + }); - // fire property change for maintenanceNeeded - await thing.writeProperty("servedCounter", 1001); - } catch (err) { - console.error("Script error:", err); - } -}); + // fire property change for maintenanceNeeded + await thing.writeProperty("servedCounter", 1001); + } catch (err) { + console.error("Script error:", err); + } + }) + .catch((err) => { + console.error("Could not get TD:", err); + }); diff --git a/packages/examples/src/scripts/smart-coffee-machine.ts b/packages/examples/src/scripts/smart-coffee-machine.ts index 977b1693a..6ac8dd1b8 100644 --- a/packages/examples/src/scripts/smart-coffee-machine.ts +++ b/packages/examples/src/scripts/smart-coffee-machine.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ // This is an example of Web of Things producer ("server" mode) Thing script. // It considers a fictional smart coffee machine in order to demonstrate the capabilities of Web of Things. @@ -410,9 +411,14 @@ Assumes one medium americano if not specified, but time and mode are mandatory f }); // Finally expose the thing - thing.expose().then(() => { - console.info(`${thing.getThingDescription().title} ready`); - }); + thing + .expose() + .then(() => { + console.info(`${thing.getThingDescription().title} ready`); + }) + .catch((err) => { + console.error(`Failed to expose thing: ${err}`); + }); console.log(`Produced ${thing.getThingDescription().title}`); }) .catch((e) => { diff --git a/packages/examples/src/security/oauth/consumer.ts b/packages/examples/src/security/oauth/consumer.ts index efc4ac090..f805b679c 100644 --- a/packages/examples/src/security/oauth/consumer.ts +++ b/packages/examples/src/security/oauth/consumer.ts @@ -13,14 +13,16 @@ * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ -WoT.requestThingDescription("https://localhost:8080/oauth").then((td) => { - WoT.consume(td).then(async (thing) => { - try { - const resp = await thing.invokeAction("sayOk"); - const result = await resp?.value(); - console.log("oAuth token was", result); - } catch (error) { - console.log("It seems that I couldn't access the resource"); - } - }); +/* eslint no-console: "off" */ + +async function main() { + const td = await WoT.requestThingDescription("https://localhost:8080/oauth"); + const thing = await WoT.consume(td); + const resp = await thing.invokeAction("sayOk"); + const result = await resp?.value(); + console.log("oAuth token was", result); +} +main().catch((err) => { + console.log("It seems that I couldn't access the resource"); + console.error("Script error:", err); }); diff --git a/packages/examples/src/security/oauth/exposer.ts b/packages/examples/src/security/oauth/exposer.ts index 827f6323a..037c3666f 100644 --- a/packages/examples/src/security/oauth/exposer.ts +++ b/packages/examples/src/security/oauth/exposer.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ import { ExposedThingInit } from "wot-typescript-definitions"; @@ -35,11 +36,13 @@ const td: ExposedThingInit = { }, }, }; -try { - WoT.produce(td).then((thing) => { - thing.setActionHandler("sayOk", async () => "Ok!"); - thing.expose(); - }); -} catch (err) { - console.error("Script error: " + err); + +async function main() { + const thing = await WoT.produce(td); + thing.setActionHandler("sayOk", async () => "Ok!"); + await thing.expose(); + console.log(`Exposed ${thing.getThingDescription().title}`); } +main().catch((err) => { + console.error("Script error: " + err); +}); diff --git a/packages/examples/src/testthing/testclient.ts b/packages/examples/src/testthing/testclient.ts index 672c387f2..ed4a51a19 100644 --- a/packages/examples/src/testthing/testclient.ts +++ b/packages/examples/src/testthing/testclient.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ console.log = () => { /* empty */ diff --git a/packages/examples/src/testthing/testthing.ts b/packages/examples/src/testthing/testthing.ts index 4590ee58b..a91fffe2f 100644 --- a/packages/examples/src/testthing/testthing.ts +++ b/packages/examples/src/testthing/testthing.ts @@ -12,6 +12,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 ********************************************************************************/ +/* eslint no-console: "off" */ function checkPropertyWrite(expected: string, actual: unknown) { const output = "Property " + expected + " written with " + actual; @@ -298,9 +299,14 @@ WoT.produce({ }); // expose the thing - thing.expose().then(() => { - console.info(thing.getThingDescription().title + " ready"); - }); + thing + .expose() + .then(() => { + console.info(thing.getThingDescription().title + " ready"); + }) + .catch((err) => { + console.error("Error exposing thing: " + err); + }); }) .catch((e) => { console.log(e); From 66b024d965c9f61d621be2f91d9d0f754935e6d8 Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 11:16:25 +0200 Subject: [PATCH 13/16] chore(core): remove console.log from tests (eslint) --- packages/core/test/client-test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/test/client-test.ts b/packages/core/test/client-test.ts index 03c3efef1..539a9d443 100644 --- a/packages/core/test/client-test.ts +++ b/packages/core/test/client-test.ts @@ -44,7 +44,7 @@ import { ThingDescription } from "wot-typescript-definitions"; import chaiAsPromised from "chai-as-promised"; import { fail } from "assert"; -const { debug } = createLoggers("core", "ClientTest"); +const { debug, info } = createLoggers("core", "ClientTest"); chaiUse(chaiAsPromised); @@ -431,7 +431,7 @@ class WoTClientTest { try { await thing.writeProperty("aProperty", ProtocolHelpers.toWoTStream(stream)); } catch (error) { - console.log(error); + info("Error writing property: " + error); } } From 09b505e4364cb8720170052e3b71978077781786 Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 11:18:51 +0200 Subject: [PATCH 14/16] chore(eslint): enfore no-console rule --- eslint.config.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index a1639dded..d412b5e84 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -130,6 +130,7 @@ export default defineConfig([ "no-prototype-builtins": "off", "no-case-declarations": "off", + "no-console": "error", // ***************** Enforce that for-in loops include an if statement to filter properties from the prototype chain "guard-for-in": "error", }, From 43d3e5a924e707564a2c2a7b458e393646b4f5f6 Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 11:30:37 +0200 Subject: [PATCH 15/16] chore(eslint): switch to check-file instead of react-nameing-convention --- eslint.config.mjs | 19 +++-- package-lock.json | 189 ++++++++-------------------------------------- package.json | 2 +- 3 files changed, 47 insertions(+), 163 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index d412b5e84..f2200c8f3 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -10,7 +10,8 @@ import workspaces from "eslint-plugin-workspaces"; import notice from "eslint-plugin-notice"; import globals from "globals"; import js from "@eslint/js"; -import reactNamingConvention from "eslint-plugin-react-naming-convention"; +import checkFile from "eslint-plugin-check-file"; + import extraneousDependencies from "eslint-plugin-import"; import { FlatCompat } from "@eslint/eslintrc"; import nodePlugin from "eslint-plugin-n"; @@ -50,9 +51,9 @@ export default defineConfig([ "unused-imports": unusedImports, workspaces, notice, - "react-naming-convention": reactNamingConvention, "extraneous-dependencies": extraneousDependencies, n: nodePlugin, + "check-file": checkFile, }, rules: { @@ -101,13 +102,21 @@ export default defineConfig([ ], // **************** enforece kebab-case for filenames **************** - "react-naming-convention/filename": [ + "check-file/filename-naming-convention": [ "error", { - rule: "kebab-case", + "**/*.{js,ts}": "KEBAB_CASE", + }, + { + ignoreMiddleExtensions: true, + }, + ], + "check-file/folder-naming-convention": [ + "error", + { + "**/*": "KEBAB_CASE", }, ], - // *************** Customization of other typescript rules *************** "@typescript-eslint/no-use-before-define": "error", "@typescript-eslint/no-unused-vars": "off", diff --git a/package-lock.json b/package-lock.json index 91ce136e5..a1f7df527 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,11 +30,11 @@ "chai-spies": "^1.0.0", "eslint": "^9.36.0", "eslint-config-prettier": "^10.1.8", + "eslint-plugin-check-file": "^3.3.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-n": "^17.23.1", "eslint-plugin-notice": "^1.0.0", "eslint-plugin-prettier": "^5.5.4", - "eslint-plugin-react-naming-convention": "^1.53.1", "eslint-plugin-unused-imports": "^4.2.0", "eslint-plugin-workspaces": "^0.11.0", "globals": "^16.4.0", @@ -136,113 +136,6 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@eslint-react/ast": { - "version": "1.53.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-react/eff": "1.53.1", - "@typescript-eslint/types": "^8.43.0", - "@typescript-eslint/typescript-estree": "^8.43.0", - "@typescript-eslint/utils": "^8.43.0", - "string-ts": "^2.2.1", - "ts-pattern": "^5.8.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@eslint-react/core": { - "version": "1.53.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-react/ast": "1.53.1", - "@eslint-react/eff": "1.53.1", - "@eslint-react/kit": "1.53.1", - "@eslint-react/shared": "1.53.1", - "@eslint-react/var": "1.53.1", - "@typescript-eslint/scope-manager": "^8.43.0", - "@typescript-eslint/type-utils": "^8.43.0", - "@typescript-eslint/types": "^8.43.0", - "@typescript-eslint/utils": "^8.43.0", - "birecord": "^0.1.1", - "ts-pattern": "^5.8.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@eslint-react/eff": { - "version": "1.53.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@eslint-react/kit": { - "version": "1.53.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-react/eff": "1.53.1", - "@typescript-eslint/utils": "^8.43.0", - "ts-pattern": "^5.8.0", - "zod": "^4.1.5" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@eslint-react/kit/node_modules/zod": { - "version": "4.1.11", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/@eslint-react/shared": { - "version": "1.53.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-react/eff": "1.53.1", - "@eslint-react/kit": "1.53.1", - "@typescript-eslint/utils": "^8.43.0", - "ts-pattern": "^5.8.0", - "zod": "^4.1.5" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@eslint-react/shared/node_modules/zod": { - "version": "4.1.11", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/@eslint-react/var": { - "version": "1.53.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-react/ast": "1.53.1", - "@eslint-react/eff": "1.53.1", - "@typescript-eslint/scope-manager": "^8.43.0", - "@typescript-eslint/types": "^8.43.0", - "@typescript-eslint/utils": "^8.43.0", - "string-ts": "^2.2.1", - "ts-pattern": "^5.8.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, "node_modules/@eslint/config-array": { "version": "0.21.0", "dev": true, @@ -2879,11 +2772,6 @@ "file-uri-to-path": "1.0.0" } }, - "node_modules/birecord": { - "version": "0.1.1", - "dev": true, - "license": "(MIT OR Apache-2.0)" - }, "node_modules/bl": { "version": "6.1.0", "license": "MIT", @@ -4465,6 +4353,36 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-plugin-check-file": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-check-file/-/eslint-plugin-check-file-3.3.0.tgz", + "integrity": "sha512-D57NBJRZt/8KzROsYgvRJzzItztWsP5B/9TssGhLHrrZzOMIFDn3RLnZN4kD7i5B4FduR040eOEqzKEcfFA9mQ==", + "dev": true, + "funding": [ + { + "type": "ko_fi", + "url": "https://ko-fi.com/huanluo" + }, + { + "type": "github", + "url": "https://github.com/sponsors/dukeluo" + } + ], + "license": "Apache-2.0", + "workspaces": [ + "examples/basic" + ], + "dependencies": { + "is-glob": "^4.0.3", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "eslint": ">=9.0.0" + } + }, "node_modules/eslint-plugin-es-x": { "version": "7.8.0", "dev": true, @@ -4639,40 +4557,6 @@ } } }, - "node_modules/eslint-plugin-react-naming-convention": { - "version": "1.53.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-react/ast": "1.53.1", - "@eslint-react/core": "1.53.1", - "@eslint-react/eff": "1.53.1", - "@eslint-react/kit": "1.53.1", - "@eslint-react/shared": "1.53.1", - "@eslint-react/var": "1.53.1", - "@typescript-eslint/scope-manager": "^8.43.0", - "@typescript-eslint/type-utils": "^8.43.0", - "@typescript-eslint/types": "^8.43.0", - "@typescript-eslint/utils": "^8.43.0", - "string-ts": "^2.2.1", - "ts-pattern": "^5.8.0" - }, - "engines": { - "node": ">=18.18.0" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": "^4.9.5 || ^5.3.3" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": false - }, - "typescript": { - "optional": true - } - } - }, "node_modules/eslint-plugin-unused-imports": { "version": "4.2.0", "dev": true, @@ -10635,11 +10519,6 @@ ], "license": "MIT" }, - "node_modules/string-ts": { - "version": "2.2.1", - "dev": true, - "license": "MIT" - }, "node_modules/string-width": { "version": "5.1.2", "dev": true, @@ -11126,11 +11005,6 @@ "node": ">=0.3.1" } }, - "node_modules/ts-pattern": { - "version": "5.8.0", - "dev": true, - "license": "MIT" - }, "node_modules/tsconfig-paths": { "version": "3.15.0", "dev": true, @@ -12391,6 +12265,7 @@ "url": "^0.11.4" }, "devDependencies": { + "chai": "^4.3.4", "should": "^13.2.3" } }, diff --git a/package.json b/package.json index 51fbb8abe..a51ab1dc0 100644 --- a/package.json +++ b/package.json @@ -62,11 +62,11 @@ "chai-spies": "^1.0.0", "eslint": "^9.36.0", "eslint-config-prettier": "^10.1.8", + "eslint-plugin-check-file": "^3.3.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-n": "^17.23.1", "eslint-plugin-notice": "^1.0.0", "eslint-plugin-prettier": "^5.5.4", - "eslint-plugin-react-naming-convention": "^1.53.1", "eslint-plugin-unused-imports": "^4.2.0", "eslint-plugin-workspaces": "^0.11.0", "globals": "^16.4.0", From 2c07bbf4a9ec8df7fd6b5c782fc8f1b0daf2f533 Mon Sep 17 00:00:00 2001 From: Sterfive's NodeWoT team Date: Thu, 25 Sep 2025 16:10:03 +0200 Subject: [PATCH 16/16] chore(eslint): add licence.template.txt for copyright notice verification --- licence.template.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 licence.template.txt diff --git a/licence.template.txt b/licence.template.txt new file mode 100644 index 000000000..c0f46df87 --- /dev/null +++ b/licence.template.txt @@ -0,0 +1,14 @@ +/******************************************************************************** + * Copyright (c) 2025 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the W3C Software Notice and + * Document License (2015-05-13) which is available at + * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document. + * + * SPDX-License-Identifier: EPL-2.0 OR W3C-20150513 + ********************************************************************************/