From 386691704349ef07fbe7260756fa74df46b2def3 Mon Sep 17 00:00:00 2001 From: kpal Date: Thu, 4 Jun 2026 12:51:23 +0100 Subject: [PATCH 1/5] Migrate to @playcanvas/eslint-config v3 (/typescript + /react) --- eslint.config.mjs | 27 +- package-lock.json | 1650 +++++++++++++---- package.json | 5 +- src/Math/color-value.ts | 2 +- src/binding/BindingBase/index.ts | 7 +- .../BindingElementToObservers/index.ts | 2 +- .../BindingObserversToElement/index.ts | 11 +- src/binding/BindingTwoWay/index.ts | 11 +- src/components/ArrayInput/index.ts | 11 +- src/components/BooleanInput/index.ts | 7 +- src/components/Button/index.ts | 7 +- src/components/Canvas/index.ts | 7 +- src/components/Code/index.ts | 7 +- src/components/ColorPicker/index.ts | 11 +- .../Container/component.stories.tsx | 3 +- src/components/Container/component.tsx | 2 +- src/components/Container/index.ts | 7 +- src/components/Divider/index.ts | 3 +- src/components/Element/index.ts | 37 +- src/components/GradientPicker/index.ts | 17 +- src/components/GridView/component.stories.tsx | 3 +- src/components/GridView/index.ts | 11 +- src/components/GridViewItem/index.ts | 11 +- src/components/InfoBox/index.ts | 7 +- src/components/InputElement/index.ts | 11 +- src/components/Label/index.ts | 7 +- .../LabelGroup/component.stories.tsx | 3 +- src/components/LabelGroup/component.tsx | 2 +- src/components/LabelGroup/index.ts | 7 +- src/components/Menu/component.stories.tsx | 3 +- src/components/Menu/index.ts | 12 +- src/components/MenuItem/index.ts | 13 +- src/components/NumericInput/index.ts | 9 +- src/components/Overlay/index.ts | 7 +- src/components/Panel/component.stories.tsx | 3 +- src/components/Panel/index.ts | 7 +- src/components/Progress/index.ts | 7 +- src/components/RadioButton/index.ts | 5 +- src/components/SelectInput/index.ts | 17 +- src/components/SliderInput/index.ts | 9 +- src/components/Spinner/index.ts | 7 +- src/components/TextAreaInput/index.ts | 7 +- src/components/TextInput/index.ts | 16 +- src/components/TreeView/component.stories.tsx | 3 +- src/components/TreeView/index.ts | 15 +- src/components/TreeViewItem/index.ts | 9 +- src/components/VectorInput/index.ts | 11 +- src/helpers/utils.ts | 2 +- 48 files changed, 1519 insertions(+), 539 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index cbe8ac5a..b33da8a3 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,18 +1,15 @@ -import playcanvasConfig from '@playcanvas/eslint-config'; -import tsPlugin from '@typescript-eslint/eslint-plugin'; -import tsParser from '@typescript-eslint/parser'; +import reactConfig from '@playcanvas/eslint-config/react'; +import typescriptConfig from '@playcanvas/eslint-config/typescript'; import storybook from 'eslint-plugin-storybook'; import globals from 'globals'; export default [ - ...playcanvasConfig, + ...typescriptConfig, + ...reactConfig, { files: ['src/**/*.ts', 'src/**/*.tsx'], languageOptions: { - parser: tsParser, parserOptions: { - ecmaVersion: 2022, - sourceType: 'module', ecmaFeatures: { jsx: true } @@ -23,22 +20,10 @@ export default [ ...globals.node } }, - plugins: { - '@typescript-eslint': tsPlugin - }, - settings: { - 'import/resolver': { - typescript: {} - } - }, rules: { - ...tsPlugin.configs.recommended.rules, '@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-unused-vars': 'off', - 'jsdoc/require-param-type': 'off', - 'jsdoc/require-returns': 'off', - 'jsdoc/require-returns-type': 'off' + '@typescript-eslint/no-unused-vars': 'off' } }, { @@ -49,7 +34,7 @@ export default [ } }, rules: { - 'import/no-unresolved': 'off' + 'import-x/no-unresolved': 'off' } }, ...storybook.configs['flat/recommended'] diff --git a/package-lock.json b/package-lock.json index a1b9d739..1b7dc98c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@babel/preset-env": "7.29.7", "@babel/preset-react": "7.29.7", "@babel/preset-typescript": "7.29.7", - "@playcanvas/eslint-config": "2.1.0", + "@playcanvas/eslint-config": "3.0.0-beta.5", "@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-replace": "6.0.3", "@rollup/plugin-typescript": "12.3.0", @@ -25,14 +25,11 @@ "@types/estree": "1.0.9", "@types/react": "19.2.15", "@types/react-dom": "19.2.3", - "@typescript-eslint/eslint-plugin": "8.60.0", - "@typescript-eslint/parser": "8.60.0", "autoprefixer": "10.5.0", "concurrently": "9.2.1", "cross-env": "10.1.0", "css-loader": "7.1.4", "eslint": "9.39.4", - "eslint-import-resolver-typescript": "4.4.4", "eslint-plugin-storybook": "10.4.1", "global-jsdom": "29.0.0", "globals": "17.6.0", @@ -69,6 +66,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@altano/repository-tools": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@altano/repository-tools/-/repository-tools-2.0.3.tgz", + "integrity": "sha512-cSR/ZYDF6Wp9OeAJMyLYYN1GenAAhV17W+w38ELP+3c5Ltsy9jkkCymi33nz/qnXyef3n6Fbr1h2yt3dvUN5sQ==", + "dev": true, + "license": "ISC" + }, "node_modules/@asamuzakjp/css-color": { "version": "5.1.11", "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-5.1.11.tgz", @@ -2151,20 +2155,40 @@ "license": "MIT" }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.50.2", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.50.2.tgz", - "integrity": "sha512-YAdE/IJSpwbOTiaURNCKECdAwqrJuFiZhylmesBcIRawtYKnBR2wxPhoIewMg+Yu+QuYvHfJNReWpoxGBKOChA==", + "version": "0.78.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.78.0.tgz", + "integrity": "sha512-rQkU5u8hNAq2NVRzHnIUUvR6arbO0b6AOlvpTNS48CkiKSn/xtNfOzBK23JE4SiW89DgvU7GtxLVgV4Vn2HBAw==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "^1.0.6", - "@typescript-eslint/types": "^8.11.0", + "@types/estree": "^1.0.8", + "@typescript-eslint/types": "^8.46.4", "comment-parser": "1.4.1", "esquery": "^1.6.0", - "jsdoc-type-pratt-parser": "~4.1.0" + "jsdoc-type-pratt-parser": "~7.0.0" }, "engines": { - "node": ">=18" + "node": ">=20.11.0" + } + }, + "node_modules/@es-joy/jsdoccomment/node_modules/jsdoc-type-pratt-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-7.0.0.tgz", + "integrity": "sha512-c7YbokssPOSHmqTbSAmTtnVgAVa/7lumWNYqomgd5KOMyPrRve2anx6lonfOsXEQacqF9FKVUj7bLg4vRSvdYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@es-joy/resolve.exports": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@es-joy/resolve.exports/-/resolve.exports-1.2.0.tgz", + "integrity": "sha512-Q9hjxWI5xBM+qW2enxfe8wDKdFWMfd0Z29k5ZJnuBqD/CasY5Zryj09aCA6owbGATWz+39p5uIdaHXpopOcG8g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" } }, "node_modules/@esbuild/aix-ppc64": { @@ -3193,9 +3217,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3213,9 +3234,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3233,9 +3251,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3253,9 +3268,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3273,9 +3285,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3293,9 +3302,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3313,9 +3319,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3333,9 +3336,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3548,9 +3548,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3565,9 +3562,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3582,9 +3576,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3599,9 +3590,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3616,9 +3604,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3633,9 +3618,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3650,9 +3632,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3667,9 +3646,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3749,6 +3725,13 @@ "win32" ] }, + "node_modules/@package-json/types": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@package-json/types/-/types-0.0.12.tgz", + "integrity": "sha512-uu43FGU34B5VM9mCNjXCwLaGHYjXdNincqKLaraaCW+7S2+SmiBg1Nv8bPnmschrIfZmfKNY9f3fC376MRrObw==", + "dev": true, + "license": "MIT" + }, "node_modules/@parcel/watcher": { "version": "2.5.6", "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz", @@ -3878,9 +3861,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3902,9 +3882,6 @@ "arm" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3926,9 +3903,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3950,9 +3924,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3974,9 +3945,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -3998,9 +3966,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4078,18 +4043,42 @@ } }, "node_modules/@playcanvas/eslint-config": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@playcanvas/eslint-config/-/eslint-config-2.1.0.tgz", - "integrity": "sha512-m8IMRsdmxeSGvmfcl+wYk+dTF7I4wCbB+FozT//yMCUVCj7lHeaWWeHdouRUMgP5FWzEZ6q6u6bjXzOgUlbBeg==", + "version": "3.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@playcanvas/eslint-config/-/eslint-config-3.0.0-beta.5.tgz", + "integrity": "sha512-ItIq14McE3GlFjJkO3oPeqw2MHcKCoZnoWuNTv8B7dftE9lVftTi5TCBIBLG6/wxB6EaS6rK1zoIFoNpSazXwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint/js": "^9.39.0", + "eslint-config-prettier": "^10.1.8", + "eslint-import-resolver-typescript": "^4.4.4", + "eslint-plugin-import-x": "^4.16.2", + "eslint-plugin-jsdoc": "^61.1.11", + "eslint-plugin-jsx-a11y": "^6.10.2", + "eslint-plugin-package-json": "^0.59.1", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^7.0.1", + "eslint-plugin-regexp": "^2.10.0", + "globals": "^16.5.0", + "jsonc-eslint-parser": "^2.4.1", + "typescript-eslint": "^8.60.1" + }, + "peerDependencies": { + "eslint": ">= 9", + "typescript": ">= 4" + } + }, + "node_modules/@playcanvas/eslint-config/node_modules/globals": { + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", + "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", "dev": true, "license": "MIT", - "dependencies": { - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jsdoc": "^50.6.11", - "eslint-plugin-regexp": "^2.7.0" + "engines": { + "node": ">=18" }, - "peerDependencies": { - "eslint": ">= 8" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@playcanvas/observer": { @@ -4303,9 +4292,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4320,9 +4306,6 @@ "arm" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4337,9 +4320,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4354,9 +4334,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4371,9 +4348,6 @@ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4388,9 +4362,6 @@ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4405,9 +4376,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4422,9 +4390,6 @@ "ppc64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4439,9 +4404,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4456,9 +4418,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4473,9 +4432,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4490,9 +4446,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4507,9 +4460,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4605,7 +4555,9 @@ "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/@shikijs/engine-oniguruma": { "version": "3.23.0", @@ -4656,6 +4608,19 @@ "dev": true, "license": "MIT" }, + "node_modules/@sindresorhus/base62": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/base62/-/base62-1.0.0.tgz", + "integrity": "sha512-TeheYy0ILzBEI/CO55CP6zJCSdSWeRtGnHy8U8dWSUH4I68iqTsy7HkMktR4xakThc9jotkPQUXT4ITdbV7cHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sindresorhus/merge-streams": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", @@ -5110,9 +5075,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5130,9 +5092,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5150,9 +5109,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5170,9 +5126,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5190,9 +5143,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5210,9 +5160,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -5515,7 +5462,9 @@ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/@types/lodash": { "version": "4.17.24", @@ -5624,17 +5573,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.60.0.tgz", - "integrity": "sha512-QYb/sa74/s7OKMbACMjrYnGspj9Hs5YI5aaffSL65UfeBUzVzBJfVo3oWSpbzPurvm7yaCCo2Lk7lVj610HqKw==", + "version": "8.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.60.1.tgz", + "integrity": "sha512-JQ4S5GB0tfjO8BuJ4fcX+HodkzJjYBV+7OJ+wLygaX7OGQ7FudyHL4NSCA6ob+w3Yn+5MkKIozOwQhXeM7opVg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.60.0", - "@typescript-eslint/type-utils": "8.60.0", - "@typescript-eslint/utils": "8.60.0", - "@typescript-eslint/visitor-keys": "8.60.0", + "@typescript-eslint/scope-manager": "8.60.1", + "@typescript-eslint/type-utils": "8.60.1", + "@typescript-eslint/utils": "8.60.1", + "@typescript-eslint/visitor-keys": "8.60.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" @@ -5647,22 +5596,22 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.60.0", + "@typescript-eslint/parser": "^8.60.1", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.60.0.tgz", - "integrity": "sha512-fcqpj/MyK4sxDPcbe7STNPbpQL4RLZOPWuaTmwZYuc+hJKzRf58yRxfhqGpc6PIq9ZyfSBpfHgmUHmHs0KwHwg==", + "version": "8.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.60.1.tgz", + "integrity": "sha512-A0M6ua6H252bVjPvvtSgl2QA4+ET9S5Mtkb2GDyTxIhH/C4qDItT7RQNO5PhMC6NXGYXOR9dIalcDDgBKT7oFA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.60.0", - "@typescript-eslint/types": "8.60.0", - "@typescript-eslint/typescript-estree": "8.60.0", - "@typescript-eslint/visitor-keys": "8.60.0", + "@typescript-eslint/scope-manager": "8.60.1", + "@typescript-eslint/types": "8.60.1", + "@typescript-eslint/typescript-estree": "8.60.1", + "@typescript-eslint/visitor-keys": "8.60.1", "debug": "^4.4.3" }, "engines": { @@ -5678,14 +5627,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.60.0.tgz", - "integrity": "sha512-aZu74NNKJeUWqCjDddzdiKaS82dgYgV/vmf+Ui3ZdZejmgfXR/q+pRumgobnQ2cCJTgGTWp4ypiwsuofFubavg==", + "version": "8.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.60.1.tgz", + "integrity": "sha512-eXkTH2bxmXlqD1RnOPmLZ9ZM9D3VwSx04JOwBnP9RQ+yUA5a2Mu7SfW8uaV2Aon53NJzZlZYuX7tn91Izf+xaw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.60.0", - "@typescript-eslint/types": "^8.60.0", + "@typescript-eslint/tsconfig-utils": "^8.60.1", + "@typescript-eslint/types": "^8.60.1", "debug": "^4.4.3" }, "engines": { @@ -5700,14 +5649,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.60.0.tgz", - "integrity": "sha512-pFzqhllJMs+jghLQWzV00ds39xLzuyqPSev5pd8f4Ir0rtKR3ZLUB4/4dhjOFighWb9larvtfJvqL+4yKDI3Xw==", + "version": "8.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.60.1.tgz", + "integrity": "sha512-gvI5OQoptnxQnchOirukCuQ55svJSTuD/4k5+pC267xyBtYry748R9/c3tYUzb/iE6RZfllRz2lVulLCHkTm4w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.60.0", - "@typescript-eslint/visitor-keys": "8.60.0" + "@typescript-eslint/types": "8.60.1", + "@typescript-eslint/visitor-keys": "8.60.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5718,9 +5667,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.60.0.tgz", - "integrity": "sha512-BZPR3RGYlAXnly6ymAxfkVn5rCbZzQNou0rxv3GfWZ8cTQp+hhVd73khbGLAd8k1TlAPLISH337M+tAgAnaJDQ==", + "version": "8.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.60.1.tgz", + "integrity": "sha512-nh8w4qAteiKuZu3pSSzG/yGKpw0OlkrKnzFmbVRenKaD4qc+7i1GrmZaLVkr8rk4uipiPGMOW4YsM6WmKZ5CvA==", "dev": true, "license": "MIT", "engines": { @@ -5735,15 +5684,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.60.0.tgz", - "integrity": "sha512-SX46wEUtitCpq7AN38HkUU/+zvUpdKf7ephtWAFgckH8O7PQIyL5gvrhQgBLuEYgLfuKWOVvWVskMbuFHAz5xg==", + "version": "8.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.60.1.tgz", + "integrity": "sha512-sdwTrpjosW7ANQYJ39ZBF1ZyEMEGVB2UsikrserVM/30a/F1dTLnu9bGxEdosugyu5caigjLrR2qiD11asjI1A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.60.0", - "@typescript-eslint/typescript-estree": "8.60.0", - "@typescript-eslint/utils": "8.60.0", + "@typescript-eslint/types": "8.60.1", + "@typescript-eslint/typescript-estree": "8.60.1", + "@typescript-eslint/utils": "8.60.1", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, @@ -5760,9 +5709,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.60.0.tgz", - "integrity": "sha512-AsE7x2XaAK+CVbeih0Fvbn+r1qHxtpLDJ3XUuFcIinT318T90yHMJC+Zgv+jUuDjQQd06HKwxnDu6sz1IcTilA==", + "version": "8.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.60.1.tgz", + "integrity": "sha512-4h0tY8ppCkdCzcrl2YM5M3my0xsE1Tf8om3owEu5oPWmXwkKRmk0j0LGDzYBGUcAlesEbxBhazqu/K4cu3Ug7w==", "dev": true, "license": "MIT", "engines": { @@ -5774,16 +5723,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.60.0.tgz", - "integrity": "sha512-3AcZNBGMClm6CXDyo8kYvVGT/sx29sS0oBsIb9oZI2gunA4Vm2M3YHzRLPvsUBBsl+yB5FPtltq7gGH0iTlp9g==", + "version": "8.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.60.1.tgz", + "integrity": "sha512-alpRkfG8hlVE5kdJW2GkfgDgXxold3e8e4l6EnmhRmRLbekgAPCCGDVD++sABy9FcgPFroq+uFcCSM1vR57Cew==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.60.0", - "@typescript-eslint/tsconfig-utils": "8.60.0", - "@typescript-eslint/types": "8.60.0", - "@typescript-eslint/visitor-keys": "8.60.0", + "@typescript-eslint/project-service": "8.60.1", + "@typescript-eslint/tsconfig-utils": "8.60.1", + "@typescript-eslint/types": "8.60.1", + "@typescript-eslint/visitor-keys": "8.60.1", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", @@ -5815,16 +5764,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.60.0.tgz", - "integrity": "sha512-HtXuPfrHTyBDkameWpl+vJb1Uevu2tznAyahM1Oc4AENidCLTPiZDWIo4GfcxNdC/RcfGcadzzkqbRG87dUrQA==", + "version": "8.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.60.1.tgz", + "integrity": "sha512-h2MPBLoNtjc3qZWfY3Tl51yPorQ2McHn8pJfcMNTcIvrrZrr90Ykffit0yjrPFWQcRcUxzH20+6OcVdW4yHtUg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.60.0", - "@typescript-eslint/types": "8.60.0", - "@typescript-eslint/typescript-estree": "8.60.0" + "@typescript-eslint/scope-manager": "8.60.1", + "@typescript-eslint/types": "8.60.1", + "@typescript-eslint/typescript-estree": "8.60.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5839,13 +5788,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.60.0.tgz", - "integrity": "sha512-9WI52t8ZGLVGrPMBet25yAftqY/n95+zmoUUtJBBQTKDSKUu7OsPTroT2op7U9JatkoRccL0YkWDNMFfC4Sjxg==", + "version": "8.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.60.1.tgz", + "integrity": "sha512-EbGRQg4FhrmwLodl+t3JNAnXHWVr9Vp+Zl1QBZVPY4ByfkzIT8cX3K6QWODHtkIZqqJVEWvhHSx3v5PDHsaQag==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.60.0", + "@typescript-eslint/types": "8.60.1", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -5975,9 +5924,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -5992,9 +5938,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -6009,9 +5952,6 @@ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -6026,9 +5966,6 @@ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -6043,9 +5980,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -6060,9 +5994,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -6077,9 +6008,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -6094,9 +6022,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -6111,9 +6036,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -6128,9 +6050,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -6794,12 +6713,35 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array.prototype.findlast": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array.prototype.findlastindex": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.4", @@ -6854,6 +6796,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", @@ -6899,6 +6858,13 @@ "node": ">=4" } }, + "node_modules/ast-types-flow": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", + "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", + "dev": true, + "license": "MIT" + }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -6972,6 +6938,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/axe-core": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.12.0.tgz", + "integrity": "sha512-FTavr/7Ba0IptwGOPxnQvdyW2tAsdLBMTBXz7rKH6xJ2skpyxpBxyHkDdBs4lf69yRqYpkqCdfhnwS8YULGOmg==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/axobject-query": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.4.17", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.17.tgz", @@ -7475,6 +7461,13 @@ "node": ">=8" } }, + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "dev": true, + "license": "MIT" + }, "node_modules/check-error": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz", @@ -7988,6 +7981,13 @@ "dev": true, "license": "MIT" }, + "node_modules/damerau-levenshtein": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", + "dev": true, + "license": "BSD-2-Clause" + }, "node_modules/data-urls": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-7.0.0.tgz", @@ -8231,6 +8231,19 @@ "node": ">=6" } }, + "node_modules/detect-indent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-7.0.2.tgz", + "integrity": "sha512-y+8xyqdGLL+6sh0tVeHcfP/QDd8gUgbasolJJpY7NgeQGSZ739bDtSiaiDgtoicy+mtYB81dKLxO9xRhCyIB3A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -8242,6 +8255,19 @@ "node": ">=8" } }, + "node_modules/detect-newline": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-4.0.1.tgz", + "integrity": "sha512-qE3Veg1YXzGHQhlA6jzebZN2qVf6NX+A7m7qlhCGG30dJixrAQhYOsJjsnBjJkCSmuOPpCk30145fr8FV0bzog==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -8548,6 +8574,34 @@ "node": ">= 0.4" } }, + "node_modules/es-iterator-helpers": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.3.2.tgz", + "integrity": "sha512-HVLACW1TppGYjJ8H6/jqH/pqOtKRw6wMlrB23xfExmFWxFquAIWCmwoLsOyN96K4a5KbmOf5At9ZUO3GZbetAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.24.2", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.1.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.3.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "iterator.prototype": "^1.1.5", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", @@ -8740,6 +8794,41 @@ } } }, + "node_modules/eslint-config-prettier": { + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-fix-utils": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/eslint-fix-utils/-/eslint-fix-utils-0.4.2.tgz", + "integrity": "sha512-n7ZTcwwkP5scedlhvWMcqxED+O1NzXcj5Rxn/0kJQMP88k02vRcBfQ1qsk/JHb6Aw8bajFoetFCCBiNIcNCsvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + }, + "peerDependencies": { + "@types/estree": ">=1", + "eslint": ">=8" + }, + "peerDependenciesMeta": { + "@types/estree": { + "optional": true + } + } + }, "node_modules/eslint-import-context": { "version": "0.1.9", "resolved": "https://registry.npmjs.org/eslint-import-context/-/eslint-import-context-0.1.9.tgz", @@ -8771,6 +8860,8 @@ "integrity": "sha512-tRrKqFyCaKict5hOd244sL6EQFNycnMQnBe+j8uqGNXYzsImGbGUU4ibtoaBmv5FLwJwcFJNeg1GeVjQfbMrDQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "debug": "^3.2.7", "is-core-module": "^2.16.1", @@ -8783,6 +8874,8 @@ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "ms": "^2.1.1" } @@ -8793,6 +8886,8 @@ "integrity": "sha512-tqt+NBWwyaMgw3zDsnygx4CByWjQEJHOPMdslYhppaQSJUtL/D4JO9CcBBlhPoI8lz9oJIDXkwXfhF4aWqP8xQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "es-errors": "^1.3.0", "is-core-module": "^2.16.2", @@ -8852,6 +8947,8 @@ "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "debug": "^3.2.7" }, @@ -8870,6 +8967,8 @@ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "ms": "^2.1.1" } @@ -8880,6 +8979,8 @@ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -8908,30 +9009,87 @@ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" } }, - "node_modules/eslint-plugin-import/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/eslint-plugin-import/node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/eslint-plugin-import-x": { + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.16.2.tgz", + "integrity": "sha512-rM9K8UBHcWKpzQzStn1YRN2T5NvdeIfSVoKu/lKF41znQXHAUcBbYXe5wd6GNjZjTrP7viQ49n1D83x/2gYgIw==", "dev": true, "license": "MIT", + "dependencies": { + "@package-json/types": "^0.0.12", + "@typescript-eslint/types": "^8.56.0", + "comment-parser": "^1.4.1", + "debug": "^4.4.1", + "eslint-import-context": "^0.1.9", + "is-glob": "^4.0.3", + "minimatch": "^9.0.3 || ^10.1.2", + "semver": "^7.7.2", + "stable-hash-x": "^0.2.0", + "unrs-resolver": "^1.9.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-import-x" + }, + "peerDependencies": { + "@typescript-eslint/utils": "^8.56.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "eslint-import-resolver-node": "*" + }, + "peerDependenciesMeta": { + "@typescript-eslint/utils": { + "optional": true + }, + "eslint-import-resolver-node": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-import-x/node_modules/semver": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-import/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "ms": "^2.1.1" } @@ -8942,6 +9100,8 @@ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "minimist": "^1.2.0" }, @@ -8955,6 +9115,8 @@ "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -8968,6 +9130,8 @@ "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.2", @@ -8976,30 +9140,65 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "50.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.8.0.tgz", - "integrity": "sha512-UyGb5755LMFWPrZTEqqvTJ3urLz1iqj+bYOHFNag+sw3NvaMWP9K2z+uIn37XfNALmQLQyrBlJ5mkiVPL7ADEg==", + "version": "61.7.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-61.7.1.tgz", + "integrity": "sha512-36DpldF95MlTX//n3/naULFVt8d1cV4jmSkx7ZKrE9ikkKHAgMLesuWp1SmwpVwAs5ndIM6abKd6PeOYZUgdWg==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "@es-joy/jsdoccomment": "~0.50.2", + "@es-joy/jsdoccomment": "~0.78.0", + "@es-joy/resolve.exports": "1.2.0", "are-docs-informative": "^0.0.2", "comment-parser": "1.4.1", - "debug": "^4.4.1", + "debug": "^4.4.3", "escape-string-regexp": "^4.0.0", - "espree": "^10.3.0", - "esquery": "^1.6.0", + "espree": "^11.0.0", + "esquery": "^1.7.0", + "html-entities": "^2.6.0", + "object-deep-merge": "^2.0.0", "parse-imports-exports": "^0.2.4", - "semver": "^7.7.2", - "spdx-expression-parse": "^4.0.0" + "semver": "^7.7.3", + "spdx-expression-parse": "^4.0.0", + "to-valid-identifier": "^1.0.0" }, "engines": { - "node": ">=18" + "node": ">=20.11.0" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, + "node_modules/eslint-plugin-jsdoc/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-plugin-jsdoc/node_modules/semver": { "version": "7.8.1", "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", @@ -9013,6 +9212,224 @@ "node": ">=10" } }, + "node_modules/eslint-plugin-jsx-a11y": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", + "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "aria-query": "^5.3.2", + "array-includes": "^3.1.8", + "array.prototype.flatmap": "^1.3.2", + "ast-types-flow": "^0.0.8", + "axe-core": "^4.10.0", + "axobject-query": "^4.1.0", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "hasown": "^2.0.2", + "jsx-ast-utils": "^3.3.5", + "language-tags": "^1.0.9", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "safe-regex-test": "^1.0.3", + "string.prototype.includes": "^2.0.1" + }, + "engines": { + "node": ">=4.0" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/aria-query": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint-plugin-package-json": { + "version": "0.59.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-package-json/-/eslint-plugin-package-json-0.59.1.tgz", + "integrity": "sha512-dalsU3Zsz8RYLkV6FnNBJh408WlTuqQaDfxV/ae29yK7pTzjNNJN+kqU9YhHfHkbJ5XBax4xHWvidvAk4xE31w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@altano/repository-tools": "^2.0.1", + "change-case": "^5.4.4", + "detect-indent": "^7.0.2", + "detect-newline": "^4.0.1", + "eslint-fix-utils": "~0.4.0", + "package-json-validator": "~0.31.0", + "semver": "^7.7.3", + "sort-object-keys": "^2.0.0", + "sort-package-json": "^3.4.0", + "validate-npm-package-name": "^7.0.0" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "eslint": ">=8.0.0", + "jsonc-eslint-parser": "^2.0.0" + } + }, + "node_modules/eslint-plugin-package-json/node_modules/semver": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.37.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", + "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", + "array.prototype.flatmap": "^1.3.3", + "array.prototype.tosorted": "^1.1.4", + "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.2.1", + "estraverse": "^5.3.0", + "hasown": "^2.0.2", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.9", + "object.fromentries": "^2.0.8", + "object.values": "^1.2.1", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.12", + "string.prototype.repeat": "^1.0.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.1.1.tgz", + "integrity": "sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.24.4", + "@babel/parser": "^7.24.4", + "hermes-parser": "^0.25.1", + "zod": "^3.25.0 || ^4.0.0", + "zod-validation-error": "^3.5.0 || ^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint-plugin-react/node_modules/brace-expansion": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-react/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.7.tgz", + "integrity": "sha512-tqt+NBWwyaMgw3zDsnygx4CByWjQEJHOPMdslYhppaQSJUtL/D4JO9CcBBlhPoI8lz9oJIDXkwXfhF4aWqP8xQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.2", + "node-exports-info": "^1.6.0", + "object-keys": "^1.1.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/eslint-plugin-regexp": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-2.10.0.tgz", @@ -9807,6 +10224,16 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, + "node_modules/git-hooks-list": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/git-hooks-list/-/git-hooks-list-4.2.1.tgz", + "integrity": "sha512-WNvqJjOxxs/8ZP9+DWdwWJ7cDsd60NHf39XnD82pDVrKO5q7xfPqpkK6hwEAmBa/ZSEE4IOoR75EzbbIuwGlMw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/fisker/git-hooks-list?sponsor=1" + } + }, "node_modules/github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", @@ -10147,6 +10574,23 @@ "he": "bin/he" } }, + "node_modules/hermes-estree": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", + "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==", + "dev": true, + "license": "MIT" + }, + "node_modules/hermes-parser": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz", + "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hermes-estree": "0.25.1" + } + }, "node_modules/hookified": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.1.tgz", @@ -10791,10 +11235,23 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", - "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", + "node_modules/is-path-inside": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", "dev": true, "license": "MIT", "engines": { @@ -11019,6 +11476,24 @@ "dev": true, "license": "ISC" }, + "node_modules/iterator.prototype": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", + "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "get-proto": "^1.0.0", + "has-symbols": "^1.1.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", @@ -11169,6 +11644,56 @@ "node": ">=6" } }, + "node_modules/jsonc-eslint-parser": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.2.tgz", + "integrity": "sha512-1e4qoRgnn448pRuMvKGsFFymUCquZV0mpGgOyIKNgD3JVDTsVJyRBGH/Fm0tBb8WsWGgmB1mDe6/yJMQM37DUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.5.0", + "eslint-visitor-keys": "^3.0.0", + "espree": "^9.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + } + }, + "node_modules/jsonc-eslint-parser/node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/jsonc-eslint-parser/node_modules/semver": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jsonfile": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz", @@ -11182,6 +11707,22 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsx-ast-utils": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -11209,6 +11750,26 @@ "dev": true, "license": "MIT" }, + "node_modules/language-subtag-registry": { + "version": "0.3.23", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", + "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/language-tags": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", + "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "language-subtag-registry": "^0.3.20" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -11873,6 +12434,13 @@ "node": ">=0.10.0" } }, + "node_modules/object-deep-merge": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object-deep-merge/-/object-deep-merge-2.0.1.tgz", + "integrity": "sha512-aKttDKcU3pyZqKcCkDhsMn70WmZFG2JGDQLP9EcLyTSIFQRCPWLAmBZRLJnrVUrhPG1jETEEbfdgbNtJf1LyMg==", + "dev": true, + "license": "MIT" + }, "node_modules/object-inspect": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", @@ -11958,6 +12526,8 @@ "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -12078,122 +12648,281 @@ "safe-push-apply": "^1.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/oxc-parser": { + "version": "0.127.0", + "resolved": "https://registry.npmjs.org/oxc-parser/-/oxc-parser-0.127.0.tgz", + "integrity": "sha512-bkgD4qHlN7WxLdX8bLXdaU54TtQtAIg/ZBAfm0aje/mo3MRDo3P0hZSgr4U7O3xfX+fQmR5AP04JS/TGcZLcFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "^0.127.0" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxc-parser/binding-android-arm-eabi": "0.127.0", + "@oxc-parser/binding-android-arm64": "0.127.0", + "@oxc-parser/binding-darwin-arm64": "0.127.0", + "@oxc-parser/binding-darwin-x64": "0.127.0", + "@oxc-parser/binding-freebsd-x64": "0.127.0", + "@oxc-parser/binding-linux-arm-gnueabihf": "0.127.0", + "@oxc-parser/binding-linux-arm-musleabihf": "0.127.0", + "@oxc-parser/binding-linux-arm64-gnu": "0.127.0", + "@oxc-parser/binding-linux-arm64-musl": "0.127.0", + "@oxc-parser/binding-linux-ppc64-gnu": "0.127.0", + "@oxc-parser/binding-linux-riscv64-gnu": "0.127.0", + "@oxc-parser/binding-linux-riscv64-musl": "0.127.0", + "@oxc-parser/binding-linux-s390x-gnu": "0.127.0", + "@oxc-parser/binding-linux-x64-gnu": "0.127.0", + "@oxc-parser/binding-linux-x64-musl": "0.127.0", + "@oxc-parser/binding-openharmony-arm64": "0.127.0", + "@oxc-parser/binding-wasm32-wasi": "0.127.0", + "@oxc-parser/binding-win32-arm64-msvc": "0.127.0", + "@oxc-parser/binding-win32-ia32-msvc": "0.127.0", + "@oxc-parser/binding-win32-x64-msvc": "0.127.0" + } + }, + "node_modules/oxc-resolver": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/oxc-resolver/-/oxc-resolver-11.19.1.tgz", + "integrity": "sha512-qE/CIg/spwrTBFt5aKmwe3ifeDdLfA2NESN30E42X/lII5ClF8V7Wt6WIJhcGZjp0/Q+nQ+9vgxGk//xZNX2hg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxc-resolver/binding-android-arm-eabi": "11.19.1", + "@oxc-resolver/binding-android-arm64": "11.19.1", + "@oxc-resolver/binding-darwin-arm64": "11.19.1", + "@oxc-resolver/binding-darwin-x64": "11.19.1", + "@oxc-resolver/binding-freebsd-x64": "11.19.1", + "@oxc-resolver/binding-linux-arm-gnueabihf": "11.19.1", + "@oxc-resolver/binding-linux-arm-musleabihf": "11.19.1", + "@oxc-resolver/binding-linux-arm64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-arm64-musl": "11.19.1", + "@oxc-resolver/binding-linux-ppc64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-riscv64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-riscv64-musl": "11.19.1", + "@oxc-resolver/binding-linux-s390x-gnu": "11.19.1", + "@oxc-resolver/binding-linux-x64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-x64-musl": "11.19.1", + "@oxc-resolver/binding-openharmony-arm64": "11.19.1", + "@oxc-resolver/binding-wasm32-wasi": "11.19.1", + "@oxc-resolver/binding-win32-arm64-msvc": "11.19.1", + "@oxc-resolver/binding-win32-ia32-msvc": "11.19.1", + "@oxc-resolver/binding-win32-x64-msvc": "11.19.1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json-validator": { + "version": "0.31.0", + "resolved": "https://registry.npmjs.org/package-json-validator/-/package-json-validator-0.31.0.tgz", + "integrity": "sha512-kAVO0fNFWI2xpmthogYHnHjCtg0nJvwm9yjd9nnrR5OKIts5fmNMK2OhhjnLD1/ohJNodhCa5tZm8AolOgkfMg==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.7.2", + "validate-npm-package-license": "^3.0.4", + "yargs": "~18.0.0" + }, + "bin": { + "pjv": "lib/bin/pjv.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/package-json-validator/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/package-json-validator/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/package-json-validator/node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/package-json-validator/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/package-json-validator/node_modules/semver": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/oxc-parser": { - "version": "0.127.0", - "resolved": "https://registry.npmjs.org/oxc-parser/-/oxc-parser-0.127.0.tgz", - "integrity": "sha512-bkgD4qHlN7WxLdX8bLXdaU54TtQtAIg/ZBAfm0aje/mo3MRDo3P0hZSgr4U7O3xfX+fQmR5AP04JS/TGcZLcFA==", + "node_modules/package-json-validator/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "^0.127.0" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/Boshen" - }, - "optionalDependencies": { - "@oxc-parser/binding-android-arm-eabi": "0.127.0", - "@oxc-parser/binding-android-arm64": "0.127.0", - "@oxc-parser/binding-darwin-arm64": "0.127.0", - "@oxc-parser/binding-darwin-x64": "0.127.0", - "@oxc-parser/binding-freebsd-x64": "0.127.0", - "@oxc-parser/binding-linux-arm-gnueabihf": "0.127.0", - "@oxc-parser/binding-linux-arm-musleabihf": "0.127.0", - "@oxc-parser/binding-linux-arm64-gnu": "0.127.0", - "@oxc-parser/binding-linux-arm64-musl": "0.127.0", - "@oxc-parser/binding-linux-ppc64-gnu": "0.127.0", - "@oxc-parser/binding-linux-riscv64-gnu": "0.127.0", - "@oxc-parser/binding-linux-riscv64-musl": "0.127.0", - "@oxc-parser/binding-linux-s390x-gnu": "0.127.0", - "@oxc-parser/binding-linux-x64-gnu": "0.127.0", - "@oxc-parser/binding-linux-x64-musl": "0.127.0", - "@oxc-parser/binding-openharmony-arm64": "0.127.0", - "@oxc-parser/binding-wasm32-wasi": "0.127.0", - "@oxc-parser/binding-win32-arm64-msvc": "0.127.0", - "@oxc-parser/binding-win32-ia32-msvc": "0.127.0", - "@oxc-parser/binding-win32-x64-msvc": "0.127.0" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/oxc-resolver": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/oxc-resolver/-/oxc-resolver-11.19.1.tgz", - "integrity": "sha512-qE/CIg/spwrTBFt5aKmwe3ifeDdLfA2NESN30E42X/lII5ClF8V7Wt6WIJhcGZjp0/Q+nQ+9vgxGk//xZNX2hg==", + "node_modules/package-json-validator/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/Boshen" + "dependencies": { + "ansi-regex": "^6.2.2" }, - "optionalDependencies": { - "@oxc-resolver/binding-android-arm-eabi": "11.19.1", - "@oxc-resolver/binding-android-arm64": "11.19.1", - "@oxc-resolver/binding-darwin-arm64": "11.19.1", - "@oxc-resolver/binding-darwin-x64": "11.19.1", - "@oxc-resolver/binding-freebsd-x64": "11.19.1", - "@oxc-resolver/binding-linux-arm-gnueabihf": "11.19.1", - "@oxc-resolver/binding-linux-arm-musleabihf": "11.19.1", - "@oxc-resolver/binding-linux-arm64-gnu": "11.19.1", - "@oxc-resolver/binding-linux-arm64-musl": "11.19.1", - "@oxc-resolver/binding-linux-ppc64-gnu": "11.19.1", - "@oxc-resolver/binding-linux-riscv64-gnu": "11.19.1", - "@oxc-resolver/binding-linux-riscv64-musl": "11.19.1", - "@oxc-resolver/binding-linux-s390x-gnu": "11.19.1", - "@oxc-resolver/binding-linux-x64-gnu": "11.19.1", - "@oxc-resolver/binding-linux-x64-musl": "11.19.1", - "@oxc-resolver/binding-openharmony-arm64": "11.19.1", - "@oxc-resolver/binding-wasm32-wasi": "11.19.1", - "@oxc-resolver/binding-win32-arm64-msvc": "11.19.1", - "@oxc-resolver/binding-win32-ia32-msvc": "11.19.1", - "@oxc-resolver/binding-win32-x64-msvc": "11.19.1" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/package-json-validator/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "dev": true, "license": "MIT", "dependencies": { - "yocto-queue": "^0.1.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/package-json-validator/node_modules/yargs": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", "dev": true, "license": "MIT", "dependencies": { - "p-limit": "^3.0.2" + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^7.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/package-json-validator/node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", "dev": true, - "license": "MIT", + "license": "ISC", "engines": { - "node": ">=6" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/package-manager-detector": { @@ -13243,6 +13972,19 @@ "node": ">=0.10.0" } }, + "node_modules/reserved-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/reserved-identifiers/-/reserved-identifiers-1.2.0.tgz", + "integrity": "sha512-yE7KUfFvaBFzGPs5H3Ops1RevfUEsDc5Iz65rOwWg4lE8HJSYtle77uul3+573457oHvBKuHYDl/xqUkKpEEdw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/resolve": { "version": "1.22.12", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", @@ -14205,6 +14947,48 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, + "node_modules/sort-object-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sort-object-keys/-/sort-object-keys-2.1.0.tgz", + "integrity": "sha512-SOiEnthkJKPv2L6ec6HMwhUcN0/lppkeYuN1x63PbyPRrgSPIuBJCiYxYyvWRTtjMlOi14vQUCGUJqS6PLVm8g==", + "dev": true, + "license": "MIT" + }, + "node_modules/sort-package-json": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/sort-package-json/-/sort-package-json-3.7.1.tgz", + "integrity": "sha512-ssk1HG7whF8N/T1IsNAQrtHG5Cbdi0rAgRJZXYBr9hF5xaHnBNzUx/W6LcthEW7FhOwvZssbESZuO+GxssqAyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-indent": "^7.0.2", + "detect-newline": "^4.0.1", + "git-hooks-list": "^4.1.1", + "is-plain-obj": "^4.1.0", + "semver": "^7.7.3", + "sort-object-keys": "^2.0.1", + "tinyglobby": "^0.2.15" + }, + "bin": { + "sort-package-json": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/sort-package-json/node_modules/semver": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -14236,6 +15020,28 @@ "source-map": "^0.6.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-correct/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, "node_modules/spdx-exceptions": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", @@ -14403,6 +15209,60 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/string.prototype.includes": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", + "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/string.prototype.matchall": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", + "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.6", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "regexp.prototype.flags": "^1.5.3", + "set-function-name": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.repeat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", + "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "node_modules/string.prototype.trim": { "version": "1.2.10", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", @@ -15244,6 +16104,23 @@ "node": ">=8.0" } }, + "node_modules/to-valid-identifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-valid-identifier/-/to-valid-identifier-1.0.0.tgz", + "integrity": "sha512-41wJyvKep3yT2tyPqX/4blcfybknGB4D+oETKLs7Q76UiPqRpUJK3hr1nxelyYO0PHKVzJwlu0aCeEAsGI6rpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/base62": "^1.0.0", + "reserved-identifiers": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tough-cookie": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz", @@ -15491,6 +16368,30 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.60.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.60.1.tgz", + "integrity": "sha512-6m5hkkRAp8lKvhVpcprAIn5KkehQEh+47oHH2VGnExEh7dhNxXlg6GPAOIu6TxbVQxhebrJDvjl3020ooiWCMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.60.1", + "@typescript-eslint/parser": "8.60.1", + "@typescript-eslint/typescript-estree": "8.60.1", + "@typescript-eslint/utils": "8.60.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 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, "node_modules/uc.micro": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", @@ -15731,6 +16632,38 @@ "dev": true, "license": "MIT" }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validate-npm-package-license/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/validate-npm-package-name": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-7.0.2.tgz", + "integrity": "sha512-hVDIBwsRruT73PbK7uP5ebUt+ezEtCmzZz3F59BSr2F6OVFnJ/6h8liuvdLrQ88Xmnk6/+xGGuq+pG9WwTuy3A==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -16477,6 +17410,29 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zod": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", + "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-validation-error": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz", + "integrity": "sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" + } } } } diff --git a/package.json b/package.json index 1979e0b9..2f3d0a88 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "@babel/preset-env": "7.29.7", "@babel/preset-react": "7.29.7", "@babel/preset-typescript": "7.29.7", - "@playcanvas/eslint-config": "2.1.0", + "@playcanvas/eslint-config": "3.0.0-beta.5", "@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-replace": "6.0.3", "@rollup/plugin-typescript": "12.3.0", @@ -79,14 +79,11 @@ "@types/estree": "1.0.9", "@types/react": "19.2.15", "@types/react-dom": "19.2.3", - "@typescript-eslint/eslint-plugin": "8.60.0", - "@typescript-eslint/parser": "8.60.0", "autoprefixer": "10.5.0", "concurrently": "9.2.1", "cross-env": "10.1.0", "css-loader": "7.1.4", "eslint": "9.39.4", - "eslint-import-resolver-typescript": "4.4.4", "eslint-plugin-storybook": "10.4.1", "global-jsdom": "29.0.0", "globals": "17.6.0", diff --git a/src/Math/color-value.ts b/src/Math/color-value.ts index 8c46faea..c8d86338 100644 --- a/src/Math/color-value.ts +++ b/src/Math/color-value.ts @@ -1,4 +1,4 @@ -function _rgb2hsv(rgb: Array) { +function _rgb2hsv(rgb: number[]) { const r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255; diff --git a/src/binding/BindingBase/index.ts b/src/binding/BindingBase/index.ts index 4959706b..20ab3e88 100644 --- a/src/binding/BindingBase/index.ts +++ b/src/binding/BindingBase/index.ts @@ -1,11 +1,12 @@ -import { Events, History, Observer } from '@playcanvas/observer'; +import type { History, Observer } from '@playcanvas/observer'; +import { Events } from '@playcanvas/observer'; -import { IBindable } from '../../components/Element'; +import type { IBindable } from '../../components/Element'; /** * The interface for arguments for the {@link BindingBase} constructor. */ -export interface BindingBaseArgs { +export type BindingBaseArgs = { /** * The IBindable element. */ diff --git a/src/binding/BindingElementToObservers/index.ts b/src/binding/BindingElementToObservers/index.ts index 9fff07a4..00fdc8fd 100644 --- a/src/binding/BindingElementToObservers/index.ts +++ b/src/binding/BindingElementToObservers/index.ts @@ -1,4 +1,4 @@ -import { Observer } from '@playcanvas/observer'; +import type { Observer } from '@playcanvas/observer'; import { BindingBase } from '../BindingBase'; diff --git a/src/binding/BindingObserversToElement/index.ts b/src/binding/BindingObserversToElement/index.ts index 164739f1..9b7a18c6 100644 --- a/src/binding/BindingObserversToElement/index.ts +++ b/src/binding/BindingObserversToElement/index.ts @@ -1,17 +1,18 @@ -import { EventHandle, Observer } from '@playcanvas/observer'; +import type { EventHandle, Observer } from '@playcanvas/observer'; -import { IBindable } from '../../components'; -import { BindingBase, BindingBaseArgs } from '../BindingBase'; +import type { IBindable } from '../../components'; +import type { BindingBaseArgs } from '../BindingBase'; +import { BindingBase } from '../BindingBase'; /** * The interface for arguments for the {@link BindingObserversToElement} constructor. */ -export interface BindingObserversToElementArgs extends BindingBaseArgs { +export type BindingObserversToElementArgs = { /** * Custom update function. */ customUpdate?: (element: IBindable, observers: Observer[], paths: string[]) => void; -} +} & BindingBaseArgs /** * Provides one way binding between Observers and an {@link IBindable} element and Observers. Any diff --git a/src/binding/BindingTwoWay/index.ts b/src/binding/BindingTwoWay/index.ts index cc05504c..4bad7bc6 100644 --- a/src/binding/BindingTwoWay/index.ts +++ b/src/binding/BindingTwoWay/index.ts @@ -1,14 +1,15 @@ -import { Observer } from '@playcanvas/observer'; +import type { Observer } from '@playcanvas/observer'; -import { IBindable } from '../../components/Element'; -import { BindingBase, BindingBaseArgs } from '../BindingBase'; +import type { IBindable } from '../../components/Element'; +import type { BindingBaseArgs } from '../BindingBase'; +import { BindingBase } from '../BindingBase'; import { BindingElementToObservers } from '../BindingElementToObservers'; import { BindingObserversToElement } from '../BindingObserversToElement'; /** * The interface for arguments for the {@link BindingTwoWay} constructor. */ -export interface BindingTwoWayArgs extends BindingBaseArgs { +export type BindingTwoWayArgs = { /** * BindingElementToObservers instance. */ @@ -18,7 +19,7 @@ export interface BindingTwoWayArgs extends BindingBaseArgs { * BindingObserversToElement instance. */ bindingObserversToElement?: BindingObserversToElement; -} +} & BindingBaseArgs /** * Provides two way data binding between Observers and {@link IBindable} elements. This means that diff --git a/src/components/ArrayInput/index.ts b/src/components/ArrayInput/index.ts index a1c2dc63..ebc5b73f 100644 --- a/src/components/ArrayInput/index.ts +++ b/src/components/ArrayInput/index.ts @@ -1,9 +1,10 @@ -import { Observer } from '@playcanvas/observer'; +import type { Observer } from '@playcanvas/observer'; import * as utils from '../../helpers/utils'; import { Button } from '../Button'; import { Container } from '../Container'; -import { Element, ElementArgs, IBindable, IBindableArgs, IFocusable } from '../Element'; +import type { ElementArgs, IBindable, IBindableArgs, IFocusable } from '../Element'; +import { Element } from '../Element'; import { NumericInput } from '../NumericInput'; import { Panel } from '../Panel'; @@ -17,7 +18,7 @@ const CLASS_ARRAY_DELETE = `${CLASS_ARRAY_ELEMENT}-delete`; /** * The arguments for the {@link ArrayInput} constructor. */ -interface ArrayInputArgs extends ElementArgs, IBindableArgs { +type ArrayInputArgs = { /** * The type of values that the array can hold. Can be one of the following: * @@ -34,7 +35,7 @@ interface ArrayInputArgs extends ElementArgs, IBindableArgs { /** * Arguments for each array Element. */ - elementArgs?: Array; + elementArgs?: any[]; /** * If `true` then editing the number of elements that the array has will not be allowed. */ @@ -47,7 +48,7 @@ interface ArrayInputArgs extends ElementArgs, IBindableArgs { * Used to specify the default values for each element in the array. Defaults to `null`. */ getDefaultFn?: () => any; -} +} & ElementArgs & IBindableArgs /** * Element that allows editing an array of values. diff --git a/src/components/BooleanInput/index.ts b/src/components/BooleanInput/index.ts index fbcc2650..fcff6621 100644 --- a/src/components/BooleanInput/index.ts +++ b/src/components/BooleanInput/index.ts @@ -1,5 +1,6 @@ import { CLASS_NOT_FLEXIBLE, CLASS_MULTIPLE_VALUES } from '../../class'; -import { Element, ElementArgs, IBindable, IBindableArgs, IFocusable } from '../Element'; +import type { ElementArgs, IBindable, IBindableArgs, IFocusable } from '../Element'; +import { Element } from '../Element'; const CLASS_BOOLEAN_INPUT = 'pcui-boolean-input'; const CLASS_BOOLEAN_INPUT_TICKED = `${CLASS_BOOLEAN_INPUT}-ticked`; @@ -8,7 +9,7 @@ const CLASS_BOOLEAN_INPUT_TOGGLE = `${CLASS_BOOLEAN_INPUT}-toggle`; /** * The arguments for the {@link BooleanInput} constructor. */ -interface BooleanInputArgs extends ElementArgs, IBindableArgs { +type BooleanInputArgs = { /** * Sets the tabIndex of the {@link BooleanInput}. Defaults to 0. */ @@ -17,7 +18,7 @@ interface BooleanInputArgs extends ElementArgs, IBindableArgs { * The type of checkbox. Currently can be `null` or 'toggle'. */ type?: string -} +} & ElementArgs & IBindableArgs /** * A checkbox element. diff --git a/src/components/Button/index.ts b/src/components/Button/index.ts index 0c94ddc5..18b8d48b 100644 --- a/src/components/Button/index.ts +++ b/src/components/Button/index.ts @@ -1,11 +1,12 @@ -import { Element, ElementArgs } from '../Element'; +import type { ElementArgs } from '../Element'; +import { Element } from '../Element'; const CLASS_BUTTON = 'pcui-button'; /** * The arguments for the {@link Button} constructor. */ -interface ButtonArgs extends ElementArgs { +type ButtonArgs = { /** * If `true`, the {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML innerHTML} property will be * used to set the text. Otherwise, {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent textContent} @@ -24,7 +25,7 @@ interface ButtonArgs extends ElementArgs { * Sets the 'size' type of the button. Can be 'small' or `null`. Defaults to `null`. */ size?: 'small' -} +} & ElementArgs /** * User input with click interaction. diff --git a/src/components/Canvas/index.ts b/src/components/Canvas/index.ts index f5d3f32d..5c078eb9 100644 --- a/src/components/Canvas/index.ts +++ b/src/components/Canvas/index.ts @@ -1,17 +1,18 @@ -import { Element, ElementArgs } from '../Element'; +import type { ElementArgs } from '../Element'; +import { Element } from '../Element'; const CLASS_ROOT = 'pcui-canvas'; /** * The arguments for the {@link Canvas} constructor. */ -interface CanvasArgs extends ElementArgs { +type CanvasArgs = { /** * Whether the canvas should use the {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio devicePixelRatio}. * Defaults to `false`. */ useDevicePixelRatio?: boolean; -} +} & ElementArgs /** * Represents a Canvas. diff --git a/src/components/Code/index.ts b/src/components/Code/index.ts index 7c3247ad..8ad57db3 100644 --- a/src/components/Code/index.ts +++ b/src/components/Code/index.ts @@ -1,4 +1,5 @@ -import { Container, ContainerArgs } from '../Container'; +import type { ContainerArgs } from '../Container'; +import { Container } from '../Container'; import { Element } from '../Element'; import { Label } from '../Label'; @@ -8,12 +9,12 @@ const CLASS_INNER = `${CLASS_ROOT}-inner`; /** * The arguments for the {@link Code} constructor. */ -interface CodeArgs extends ContainerArgs { +type CodeArgs = { /** * Sets the text to display in the code block. */ text?: string -} +} & ContainerArgs /** * Represents a code block. diff --git a/src/components/ColorPicker/index.ts b/src/components/ColorPicker/index.ts index 045ededd..d3c790a0 100644 --- a/src/components/ColorPicker/index.ts +++ b/src/components/ColorPicker/index.ts @@ -1,8 +1,9 @@ -import { EventHandle } from '@playcanvas/observer'; +import type { EventHandle } from '@playcanvas/observer'; import { CLASS_MULTIPLE_VALUES, CLASS_NOT_FLEXIBLE } from '../../class'; import { _hsv2rgb, _rgb2hsv } from '../../Math/color-value'; -import { Element, ElementArgs, IBindable, IBindableArgs } from '../Element'; +import type { ElementArgs, IBindable, IBindableArgs } from '../Element'; +import { Element } from '../Element'; import { NumericInput } from '../NumericInput'; import { Overlay } from '../Overlay'; import { TextInput } from '../TextInput'; @@ -12,7 +13,7 @@ const CLASS_ROOT = 'pcui-color-input'; /** * The arguments for the {@link ColorPicker} constructor. */ -interface ColorPickerArgs extends ElementArgs, IBindableArgs { +type ColorPickerArgs = { /** * An array of 4 integers containing the RGBA values the picker should be initialized to. Defaults to `[0, 0, 255, 1]`. */ @@ -21,7 +22,7 @@ interface ColorPickerArgs extends ElementArgs, IBindableArgs { * Number of color channels. Defaults to 3. Changing to 4 adds the option to change the alpha value. */ channels?: number; -} +} & ElementArgs & IBindableArgs /** * Represents a color picker. @@ -763,7 +764,7 @@ class ColorPicker extends Element implements IBindable { } /* eslint accessor-pairs: 0 */ - set values(values: Array) { + set values(values: any[]) { let different = false; const value = values[0]; for (let i = 1; i < values.length; i++) { diff --git a/src/components/Container/component.stories.tsx b/src/components/Container/component.stories.tsx index 00628e60..f388cb5d 100644 --- a/src/components/Container/component.stories.tsx +++ b/src/components/Container/component.stories.tsx @@ -1,9 +1,10 @@ import type { Meta, StoryObj } from '@storybook/react-webpack5'; import * as React from 'react'; -import { Container } from './component'; import { Label } from '../Label/component'; +import { Container } from './component'; + import '../../scss/index.js'; const meta: Meta = { diff --git a/src/components/Container/component.tsx b/src/components/Container/component.tsx index 3a8492f7..7c233751 100644 --- a/src/components/Container/component.tsx +++ b/src/components/Container/component.tsx @@ -5,7 +5,7 @@ import { Element } from '../Element/component'; import { Container as ContainerClass, ContainerArgs } from './index'; // Define interface for child props -interface ContainerChildProps { +type ContainerChildProps = { parent: ContainerClass; } diff --git a/src/components/Container/index.ts b/src/components/Container/index.ts index 8abf62f3..23591323 100644 --- a/src/components/Container/index.ts +++ b/src/components/Container/index.ts @@ -1,5 +1,6 @@ import { CLASS_FLEX, CLASS_GRID, CLASS_RESIZABLE, CLASS_SCROLLABLE } from '../../class'; -import { Element, ElementArgs, IParentArgs } from '../Element'; +import type { ElementArgs, IParentArgs } from '../Element'; +import { Element } from '../Element'; const RESIZE_HANDLE_SIZE = 4; @@ -21,7 +22,7 @@ const CLASS_DRAGGED_CHILD = `${CLASS_DRAGGED}-child`; /** * The arguments for the {@link Container} constructor. */ -interface ContainerArgs extends ElementArgs, IParentArgs { +type ContainerArgs = { /** * Sets whether the {@link Container} uses flex layout. */ @@ -51,7 +52,7 @@ interface ContainerArgs extends ElementArgs, IParentArgs { * Sets whether the {@link Container} supports the grid layout. */ grid?: boolean, -} +} & ElementArgs & IParentArgs /** * A container is the basic building block for {@link Element}s that are grouped together. A diff --git a/src/components/Divider/index.ts b/src/components/Divider/index.ts index 9d89ba0d..5430e601 100644 --- a/src/components/Divider/index.ts +++ b/src/components/Divider/index.ts @@ -1,4 +1,5 @@ -import { Element, ElementArgs } from '../Element'; +import type { ElementArgs } from '../Element'; +import { Element } from '../Element'; const CLASS_ROOT = 'pcui-divider'; diff --git a/src/components/Element/index.ts b/src/components/Element/index.ts index 2aefb880..ccd9017b 100644 --- a/src/components/Element/index.ts +++ b/src/components/Element/index.ts @@ -1,7 +1,8 @@ -import { EventHandle, Events, HandleEvent, Observer } from '@playcanvas/observer'; -import * as React from 'react'; +import type { EventHandle, Observer } from '@playcanvas/observer'; +import { Events, HandleEvent } from '@playcanvas/observer'; +import type * as React from 'react'; -import { BindingBase } from '../../binding'; +import type { BindingBase } from '../../binding'; import { CLASS_DISABLED, CLASS_ERROR, CLASS_FLASH, CLASS_FONT_REGULAR, CLASS_HIDDEN, CLASS_READONLY } from '../../class'; const CLASS_ELEMENT = 'pcui-element'; @@ -24,7 +25,7 @@ const SIMPLE_CSS_PROPERTIES = [ /** * The interface for bindable elements. */ -interface IBindable { +type IBindable = { /** * Sets the value of the Element. */ @@ -36,11 +37,11 @@ interface IBindable { /** * Sets multiple values on the Element. It is up to the Element to determine how to display them. */ - set values(values: Array), + set values(values: any[]), /** * Gets multiple values on the Element. */ - get values(): Array, + get values(): any[], /** * Sets whether the input should flash on changes. */ @@ -54,7 +55,7 @@ interface IBindable { /** * The interface for arguments for bindable elements. */ -interface IBindableArgs { +type IBindableArgs = { /** * Sets the value of the Element. */ @@ -62,7 +63,7 @@ interface IBindableArgs { /** * Sets multiple values to the Element. It is up to the Element to determine how to display them. */ - values?: Array, + values?: any[], /** * If `true` each input will flash on changes. */ @@ -72,7 +73,7 @@ interface IBindableArgs { /** * The interface for elements that have placeholder text. */ -interface IPlaceholder { +type IPlaceholder = { /** * Sets the placeholder text of the input. */ @@ -86,7 +87,7 @@ interface IPlaceholder { /** * The interface for arguments for elements that have placeholder text. */ -interface IPlaceholderArgs { +type IPlaceholderArgs = { /** * Sets the placeholder label that appears on the right of the input. */ @@ -96,7 +97,7 @@ interface IPlaceholderArgs { /** * The interface for multi-value elements that have placeholder text for each value. */ -interface IMultiPlaceholder { +type IMultiPlaceholder = { /** * Sets the placeholder text of the inputs. Can be a single string applied to all inputs, * or an array of strings for each input. @@ -111,7 +112,7 @@ interface IMultiPlaceholder { /** * The interface for arguments for multi-value elements that have placeholder text. */ -interface IMultiPlaceholderArgs { +type IMultiPlaceholderArgs = { /** * Placeholder text for the inputs. Can be a single string applied to all inputs, * or an array of strings for each input. @@ -122,7 +123,7 @@ interface IMultiPlaceholderArgs { /** * The interface for elements that can be focused. */ -interface IFocusable { +type IFocusable = { /** * Focus on the element. If the input contains text and select is provided, the text will be selected on focus. */ @@ -137,7 +138,7 @@ interface IFocusable { /** * The interface for arguments for elements that have children. */ -interface IParentArgs { +type IParentArgs = { /** * The children of the current component. */ @@ -149,7 +150,7 @@ interface IParentArgs { * These properties do not themselves enable `display: flex`; flex layout is * configured separately (for example via `Container#flex`). */ -interface IFlexArgs { +type IFlexArgs = { /** * Sets the element's `flexBasis` CSS property. */ @@ -191,7 +192,7 @@ interface IFlexArgs { /** * The arguments for the {@link Element} constructor. */ -interface ElementArgs extends IFlexArgs { +type ElementArgs = { /** * The HTMLElement to create this {@link Element} with. If not provided this Element will create one. */ @@ -219,7 +220,7 @@ interface ElementArgs extends IFlexArgs { /** * Links the observer attribute at the path location in the given observer to this {@link Element}. */ - link?: { observer: Array|Observer, path: Array|string }, + link?: { observer: Observer[]|Observer, path: string[]|string }, /** * The id attribute of this {@link Element}'s HTMLElement. */ @@ -268,7 +269,7 @@ interface ElementArgs extends IFlexArgs { * Whether this {@link Element} is read only or not. Defaults to `false`. */ readOnly?: boolean -} +} & IFlexArgs /** * The base class for all UI elements. diff --git a/src/components/GradientPicker/index.ts b/src/components/GradientPicker/index.ts index d5992f6d..76204e50 100644 --- a/src/components/GradientPicker/index.ts +++ b/src/components/GradientPicker/index.ts @@ -3,7 +3,8 @@ import { CurveSet, Curve, math } from 'playcanvas'; import { _hsv2rgb, _rgb2hsv } from '../../Math/color-value'; import { Button } from '../Button'; import { Canvas } from '../Canvas'; -import { Element, ElementArgs } from '../Element'; +import type { ElementArgs } from '../Element'; +import { Element } from '../Element'; import { Label } from '../Label'; import { NumericInput } from '../NumericInput'; import { Overlay } from '../Overlay'; @@ -24,7 +25,7 @@ const CLASS_GRADIENT = 'pcui-gradient'; /** * The arguments for the {@link GradientPicker} constructor. */ -interface GradientPickerArgs extends ElementArgs { +type GradientPickerArgs = { /** * If `true`, the picker will render changes to the gradient as they happen. Defaults to `true`. */ @@ -37,7 +38,7 @@ interface GradientPickerArgs extends ElementArgs { * Number of color channels. Defaults to 3. Changing to 4 adds the option to change the alpha value. */ channels?: number; -} +} & ElementArgs /** * Represents a gradient picker. @@ -164,7 +165,7 @@ class GradientPicker extends Element { } this.Helpers = { - rgbaStr: function (color: Array, scale: number) { + rgbaStr: function (color: number[], scale: number) { if (!scale) { scale = 1; } @@ -177,14 +178,14 @@ class GradientPicker extends Element { return `rgba(${rgba})`; }, - hexStr: function (clr: Array) { + hexStr: function (clr: number[]) { return clr.map((v: { toString: (arg0: number) => string; }) => { return (`00${v.toString(16)}`).slice(-2).toUpperCase(); }).join(''); }, // rgb(a) -> hsva - toHsva: function (rgba: Array) { + toHsva: function (rgba: number[]) { const hsva = _rgb2hsv(rgba.map((v: number) => { return v * 255; })); @@ -193,7 +194,7 @@ class GradientPicker extends Element { }, // hsv(1) -> rgba - toRgba: function (hsva: Array) { + toRgba: function (hsva: number[]) { const rgba = _hsv2rgb(hsva).map((v: number) => { return v / 255; }); @@ -644,7 +645,7 @@ class GradientPicker extends Element { return this._value; } - set values(values: any) { // eslint-disable-line accessor-pairs + set values(values: any) { // we do not support multiple values so just // add the multiple values class which essentially disables // the input diff --git a/src/components/GridView/component.stories.tsx b/src/components/GridView/component.stories.tsx index 239a951c..014e07ed 100644 --- a/src/components/GridView/component.stories.tsx +++ b/src/components/GridView/component.stories.tsx @@ -1,9 +1,10 @@ import type { Meta, StoryObj } from '@storybook/react-webpack5'; import * as React from 'react'; -import { GridView } from './component'; import { GridViewItem } from '../GridViewItem/component'; +import { GridView } from './component'; + import '../../scss/index.js'; const meta: Meta = { diff --git a/src/components/GridView/index.ts b/src/components/GridView/index.ts index 4f1e19c2..f9c33707 100644 --- a/src/components/GridView/index.ts +++ b/src/components/GridView/index.ts @@ -1,7 +1,8 @@ -import { EventHandle } from '@playcanvas/observer'; +import type { EventHandle } from '@playcanvas/observer'; -import { Container, ContainerArgs } from '../Container'; -import { Element } from '../Element'; +import type { ContainerArgs } from '../Container'; +import { Container } from '../Container'; +import type { Element } from '../Element'; import { GridViewItem } from '../GridViewItem'; const CLASS_ROOT = 'pcui-gridview'; @@ -10,7 +11,7 @@ const CLASS_VERTICAL = `${CLASS_ROOT}-vertical`; /** * The arguments for the {@link GridView} constructor. */ -interface GridViewArgs extends ContainerArgs { +type GridViewArgs = { /** * If `true` the {@link GridView} layout will be vertical. */ @@ -27,7 +28,7 @@ interface GridViewArgs extends ContainerArgs { * A filter function to filter {@link GridViewItem}s with signature `(GridViewItem) => boolean`. */ filterFn?: (item: GridViewItem) => boolean; -} +} & ContainerArgs /** * Represents a container that shows a flexible wrappable list of items that looks like a grid. diff --git a/src/components/GridViewItem/index.ts b/src/components/GridViewItem/index.ts index 92acd83d..b2f33846 100644 --- a/src/components/GridViewItem/index.ts +++ b/src/components/GridViewItem/index.ts @@ -1,8 +1,9 @@ -import { Observer } from '@playcanvas/observer'; +import type { Observer } from '@playcanvas/observer'; import { BindingObserversToElement } from '../../binding/BindingObserversToElement'; -import { Container, ContainerArgs } from '../Container'; -import { IFocusable } from '../Element'; +import type { ContainerArgs } from '../Container'; +import { Container } from '../Container'; +import type { IFocusable } from '../Element'; import { Label } from '../Label'; import { RadioButton } from '../RadioButton'; @@ -15,7 +16,7 @@ const CLASS_RADIO_BUTTON = 'pcui-gridview-radiobtn'; /** * The arguments for the {@link GridViewItem} constructor. */ -interface GridViewItemArgs extends ContainerArgs { +type GridViewItemArgs = { /** * The type of the {@link GridViewItem}. Can be `null` or 'radio'. */ @@ -36,7 +37,7 @@ interface GridViewItemArgs extends ContainerArgs { * Sets the tabIndex of the {@link GridViewItem}. Defaults to 0. */ tabIndex?: number; -} +} & ContainerArgs /** * Represents a grid view item used in {@link GridView}. diff --git a/src/components/InfoBox/index.ts b/src/components/InfoBox/index.ts index 9b77161d..1e75cd86 100644 --- a/src/components/InfoBox/index.ts +++ b/src/components/InfoBox/index.ts @@ -1,4 +1,5 @@ -import { Container, ContainerArgs } from '../Container'; +import type { ContainerArgs } from '../Container'; +import { Container } from '../Container'; import { Element } from '../Element'; const CLASS_INFOBOX = 'pcui-infobox'; @@ -6,7 +7,7 @@ const CLASS_INFOBOX = 'pcui-infobox'; /** * The arguments for the {@link InfoBox} constructor. */ -interface InfoBoxArgs extends ContainerArgs { +type InfoBoxArgs = { /** * The CSS code for an icon for the {@link InfoBox}. e.g. 'E401' (notice we omit the '\\' character). Defaults to ''. * Useful icon values for InfoBox are: @@ -29,7 +30,7 @@ interface InfoBoxArgs extends ContainerArgs { * will be used instead. Defaults to `false`. */ unsafe?: boolean; -} +} & ContainerArgs /** * Represents an information box. diff --git a/src/components/InputElement/index.ts b/src/components/InputElement/index.ts index 434fd0bc..8adb999e 100644 --- a/src/components/InputElement/index.ts +++ b/src/components/InputElement/index.ts @@ -1,12 +1,13 @@ import { CLASS_FOCUS } from '../../class'; -import { Element, ElementArgs, IBindable, IBindableArgs, IFocusable, IPlaceholder, IPlaceholderArgs } from '../Element'; +import type { ElementArgs, IBindable, IBindableArgs, IFocusable, IPlaceholder, IPlaceholderArgs } from '../Element'; +import { Element } from '../Element'; const CLASS_INPUT_ELEMENT = 'pcui-input-element'; /** * The arguments for the {@link InputElement} constructor. */ -interface InputElementArgs extends ElementArgs, IBindableArgs, IPlaceholderArgs { +type InputElementArgs = { /** * Sets whether pressing Enter will blur (unfocus) the field. Defaults to `true`. */ @@ -23,7 +24,7 @@ interface InputElementArgs extends ElementArgs, IBindableArgs, IPlaceholderArgs * The input element to associate this {@link InputElement} with. If not supplied one will be created instead. */ input?: HTMLInputElement -} +} & ElementArgs & IBindableArgs & IPlaceholderArgs /** * The InputElement is an abstract class that manages an input DOM element. It is the superclass of @@ -248,9 +249,9 @@ abstract class InputElement extends Element implements IBindable, IFocusable, IP abstract get value(): any; - abstract set values(value: Array); + abstract set values(value: any[]); - abstract get values(): Array; + abstract get values(): any[]; set renderChanges(value: boolean) { this._renderChanges = value; diff --git a/src/components/Label/index.ts b/src/components/Label/index.ts index 363d3e3e..efa54b81 100644 --- a/src/components/Label/index.ts +++ b/src/components/Label/index.ts @@ -1,12 +1,13 @@ import { CLASS_DEFAULT_MOUSEDOWN, CLASS_MULTIPLE_VALUES } from '../../class'; -import { Element, ElementArgs, IBindable, IBindableArgs, IPlaceholder, IPlaceholderArgs } from '../Element'; +import type { ElementArgs, IBindable, IBindableArgs, IPlaceholder, IPlaceholderArgs } from '../Element'; +import { Element } from '../Element'; const CLASS_LABEL = 'pcui-label'; /** * The arguments for the {@link Label} constructor. */ -interface LabelArgs extends ElementArgs, IBindableArgs, IPlaceholderArgs { +type LabelArgs = { /** * Sets the text of the Label. Defaults to ''. */ @@ -33,7 +34,7 @@ interface LabelArgs extends ElementArgs, IBindableArgs, IPlaceholderArgs { * Sets the value of the Label. Defaults to ''. */ value?: string -} +} & ElementArgs & IBindableArgs & IPlaceholderArgs /** * The Label is a simple span element that displays some text. diff --git a/src/components/LabelGroup/component.stories.tsx b/src/components/LabelGroup/component.stories.tsx index e955971e..864dacf3 100644 --- a/src/components/LabelGroup/component.stories.tsx +++ b/src/components/LabelGroup/component.stories.tsx @@ -1,9 +1,10 @@ import type { Meta, StoryObj } from '@storybook/react-webpack5'; import * as React from 'react'; -import { LabelGroup } from './component'; import { TextInput } from '../TextInput/component'; +import { LabelGroup } from './component'; + import '../../scss/index.js'; const meta: Meta = { diff --git a/src/components/LabelGroup/component.tsx b/src/components/LabelGroup/component.tsx index 2451795a..6283cead 100644 --- a/src/components/LabelGroup/component.tsx +++ b/src/components/LabelGroup/component.tsx @@ -5,7 +5,7 @@ import { Element } from '../Element/component'; import { LabelGroup as LabelGroupClass, LabelGroupArgs } from './index'; // Define interface for child props -interface LabelGroupChildProps { +type LabelGroupChildProps = { link?: { observer: any; path: string; diff --git a/src/components/LabelGroup/index.ts b/src/components/LabelGroup/index.ts index e54372c9..efb6bb01 100644 --- a/src/components/LabelGroup/index.ts +++ b/src/components/LabelGroup/index.ts @@ -1,4 +1,5 @@ -import { Container, ContainerArgs } from '../Container'; +import type { ContainerArgs } from '../Container'; +import { Container } from '../Container'; import { Element } from '../Element'; import { Label } from '../Label'; @@ -8,7 +9,7 @@ const CLASS_LABEL_TOP = `${CLASS_LABEL_GROUP}-align-top`; /** * The arguments for the {@link LabelGroup} constructor. */ -interface LabelGroupArgs extends ContainerArgs { +type LabelGroupArgs = { /** * The label text. Defaults to 'Label'. */ @@ -25,7 +26,7 @@ interface LabelGroupArgs extends ContainerArgs { * Add a native tooltip to the label. */ nativeTooltip?: boolean; -} +} & ContainerArgs /** * Represents a group of an {@link Element} and a {@link Label}. Useful for rows of labeled fields. diff --git a/src/components/Menu/component.stories.tsx b/src/components/Menu/component.stories.tsx index 00ee5f50..9206d94a 100644 --- a/src/components/Menu/component.stories.tsx +++ b/src/components/Menu/component.stories.tsx @@ -2,12 +2,13 @@ import type { Meta, StoryObj } from '@storybook/react-webpack5'; import * as React from 'react'; import { action } from 'storybook/actions'; -import { Menu } from './component'; import { Container } from '../Container/component'; import { Label as LabelClass } from '../Label'; import { Label } from '../Label/component'; import { Menu as MenuClass } from '../Menu'; +import { Menu } from './component'; + import '../../scss/index.js'; const meta: Meta = { diff --git a/src/components/Menu/index.ts b/src/components/Menu/index.ts index 87312e68..22dd7ebb 100644 --- a/src/components/Menu/index.ts +++ b/src/components/Menu/index.ts @@ -1,6 +1,8 @@ -import { Container, ContainerArgs } from '../Container'; -import { Element, IFocusable } from '../Element'; -import { MenuItem, MenuItemArgs } from '../MenuItem'; +import type { ContainerArgs } from '../Container'; +import { Container } from '../Container'; +import type { Element, IFocusable } from '../Element'; +import type { MenuItemArgs } from '../MenuItem'; +import { MenuItem } from '../MenuItem'; const CLASS_MENU = 'pcui-menu'; const CLASS_MENU_ITEMS = `${CLASS_MENU}-items`; @@ -8,7 +10,7 @@ const CLASS_MENU_ITEMS = `${CLASS_MENU}-items`; /** * The arguments for the {@link Menu} constructor. */ -interface MenuArgs extends ContainerArgs { +type MenuArgs = { /** * An array of {@link MenuItemArgs}. If these are passed then new MenuItems will be created * and appended to the menu. @@ -22,7 +24,7 @@ interface MenuArgs extends ContainerArgs { * Sets the tabIndex of the {@link Menu}. Defaults to 1. */ tabIndex?: number; -} +} & ContainerArgs /** * A Menu is a list of {@link MenuItem}s which can contain child MenuItems. Useful to show context diff --git a/src/components/MenuItem/index.ts b/src/components/MenuItem/index.ts index fc4de14d..2c6e95c3 100644 --- a/src/components/MenuItem/index.ts +++ b/src/components/MenuItem/index.ts @@ -1,7 +1,8 @@ -import { Observer } from '@playcanvas/observer'; +import type { Observer } from '@playcanvas/observer'; -import { Container, ContainerArgs } from '../Container'; -import { Element, IBindable } from '../Element'; +import type { ContainerArgs } from '../Container'; +import { Container } from '../Container'; +import type { Element, IBindable } from '../Element'; import { Label } from '../Label'; const CLASS_MENU_ITEM = 'pcui-menu-item'; @@ -13,7 +14,7 @@ const CLASS_MENU_ITEM_SHORTCUT = `${CLASS_MENU_ITEM}-shortcut`; /** * The arguments for the {@link MenuItem} constructor. */ -interface MenuItemArgs extends ContainerArgs { +type MenuItemArgs = { value?: any; /** * Whether the MenuItem has any child MenuItems. @@ -46,12 +47,12 @@ interface MenuItemArgs extends ContainerArgs { /** * An array of MenuItem constructor data. If defined then child MenuItems will be created and added to the MenuItem. */ - items?: Array; + items?: MenuItemArgs[]; /** * Sets the keyboard shortcut to display on the MenuItem (e.g., 'Ctrl+C'). */ shortcut?: string; -} +} & ContainerArgs /** * The MenuItem is a selectable option that is appended to a {@link Menu}. A MenuItem can also diff --git a/src/components/NumericInput/index.ts b/src/components/NumericInput/index.ts index a273a448..af838515 100644 --- a/src/components/NumericInput/index.ts +++ b/src/components/NumericInput/index.ts @@ -1,6 +1,7 @@ import { CLASS_MULTIPLE_VALUES } from '../../class'; import { Element } from '../Element'; -import { InputElement, InputElementArgs } from '../InputElement'; +import type { InputElementArgs } from '../InputElement'; +import { InputElement } from '../InputElement'; const CLASS_NUMERIC_INPUT = 'pcui-numeric-input'; const CLASS_NUMERIC_INPUT_SLIDER_CONTROL = `${CLASS_NUMERIC_INPUT}-slider-control`; @@ -12,7 +13,7 @@ const REGEX_COMMA = /,/g; /** * The arguments for the {@link NumericInput} constructor. */ -interface NumericInputArgs extends InputElementArgs { +type NumericInputArgs = { /** * Sets the minimum value this field can take. */ @@ -43,7 +44,7 @@ interface NumericInputArgs extends InputElementArgs { * Sets whether the value can be `null`. If not then it will be 0 instead of `null`. */ allowNull?: boolean -} +} & InputElementArgs /** * The NumericInput represents an input element that holds numbers. @@ -324,7 +325,7 @@ class NumericInput extends InputElement { }); expression = expressionArr.join(operator); }); - // eslint-disable-next-line no-new-func + value = Function(`"use strict";return (${expression})`)(); } } diff --git a/src/components/Overlay/index.ts b/src/components/Overlay/index.ts index 881ac569..42d49a5f 100644 --- a/src/components/Overlay/index.ts +++ b/src/components/Overlay/index.ts @@ -1,5 +1,6 @@ import { Container } from '../Container'; -import { Element, ElementArgs } from '../Element'; +import type { ElementArgs } from '../Element'; +import { Element } from '../Element'; const CLASS_OVERLAY = 'pcui-overlay'; const CLASS_OVERLAY_INNER = `${CLASS_OVERLAY}-inner`; @@ -10,7 +11,7 @@ const CLASS_OVERLAY_CONTENT = `${CLASS_OVERLAY}-content`; /** * The arguments for the {@link Overlay} constructor. */ -interface OverlayArgs extends ElementArgs { +type OverlayArgs = { /** * Whether the overlay can be hidden by clicking on it. */ @@ -19,7 +20,7 @@ interface OverlayArgs extends ElementArgs { * Whether the overlay is transparent or not. */ transparent?: boolean, -} +} & ElementArgs /** * An overlay element. diff --git a/src/components/Panel/component.stories.tsx b/src/components/Panel/component.stories.tsx index 5ac88d10..666a8652 100644 --- a/src/components/Panel/component.stories.tsx +++ b/src/components/Panel/component.stories.tsx @@ -1,9 +1,10 @@ import type { Meta, StoryObj } from '@storybook/react-webpack5'; import * as React from 'react'; -import { Panel } from './component'; import { Label } from '../Label/component'; +import { Panel } from './component'; + import '../../scss/index.js'; const meta: Meta = { diff --git a/src/components/Panel/index.ts b/src/components/Panel/index.ts index b6f09b23..1443fc06 100644 --- a/src/components/Panel/index.ts +++ b/src/components/Panel/index.ts @@ -1,6 +1,7 @@ import { CLASS_COLLAPSED, CLASS_COLLAPSIBLE, CLASS_FONT_BOLD } from '../../class'; import { Button } from '../Button'; -import { Container, ContainerArgs } from '../Container'; +import type { ContainerArgs } from '../Container'; +import { Container } from '../Container'; import { Element } from '../Element'; import { Label } from '../Label'; @@ -15,7 +16,7 @@ const CLASS_PANEL_REMOVE = `${CLASS_PANEL}-remove`; /** * The arguments for the {@link Panel} constructor. */ -interface PanelArgs extends ContainerArgs { +type PanelArgs = { /** * Sets whether the Element is collapsible. */ @@ -56,7 +57,7 @@ interface PanelArgs extends ContainerArgs { * A DOM element to use for the header container. */ header?: HTMLElement -} +} & ContainerArgs /** * The Panel is a {@link Container} that itself contains a header container and a content diff --git a/src/components/Progress/index.ts b/src/components/Progress/index.ts index 92c249ee..b478eec4 100644 --- a/src/components/Progress/index.ts +++ b/src/components/Progress/index.ts @@ -1,4 +1,5 @@ -import { Container, ContainerArgs } from '../Container'; +import type { ContainerArgs } from '../Container'; +import { Container } from '../Container'; import { Element } from '../Element'; const CLASS_ROOT = 'pcui-progress'; @@ -7,12 +8,12 @@ const CLASS_INNER = `${CLASS_ROOT}-inner`; /** * The arguments for the {@link Progress} constructor. */ -interface ProgressArgs extends ContainerArgs { +type ProgressArgs = { /** * Sets the value of the progress bar (between 0 and 100). */ value?: number -} +} & ContainerArgs /** * Represents a bar that can highlight progress of an activity. diff --git a/src/components/RadioButton/index.ts b/src/components/RadioButton/index.ts index 843bdbce..eb640d28 100644 --- a/src/components/RadioButton/index.ts +++ b/src/components/RadioButton/index.ts @@ -1,5 +1,6 @@ import { CLASS_MULTIPLE_VALUES, CLASS_NOT_FLEXIBLE } from '../../class'; -import { Element, ElementArgs, IBindable, IBindableArgs, IFocusable } from '../Element'; +import type { ElementArgs, IBindable, IBindableArgs, IFocusable } from '../Element'; +import { Element } from '../Element'; const CLASS_RADIO_BUTTON = 'pcui-radio-button'; const CLASS_RADIO_BUTTON_SELECTED = `${CLASS_RADIO_BUTTON}-selected`; @@ -7,7 +8,7 @@ const CLASS_RADIO_BUTTON_SELECTED = `${CLASS_RADIO_BUTTON}-selected`; /** * The arguments for the {@link RadioButton} constructor. */ -interface RadioButtonArgs extends ElementArgs, IBindableArgs {} +type RadioButtonArgs = {} & ElementArgs & IBindableArgs /** * A radio button element. diff --git a/src/components/SelectInput/index.ts b/src/components/SelectInput/index.ts index 91ebf616..fd0a8c62 100644 --- a/src/components/SelectInput/index.ts +++ b/src/components/SelectInput/index.ts @@ -2,7 +2,8 @@ import { CLASS_FOCUS, CLASS_MULTIPLE_VALUES } from '../../class'; import { searchItems } from '../../helpers/search'; import { Button } from '../Button'; import { Container } from '../Container'; -import { Element, ElementArgs, IBindable, IBindableArgs, IFocusable, IPlaceholderArgs } from '../Element'; +import type { ElementArgs, IBindable, IBindableArgs, IFocusable, IPlaceholderArgs } from '../Element'; +import { Element } from '../Element'; import { Label } from '../Label'; import { TextInput } from '../TextInput'; @@ -32,7 +33,7 @@ const DEFAULT_BOTTOM_OFFSET = 25; /** * The arguments for the {@link SelectInput} constructor. */ -interface SelectInputArgs extends ElementArgs, IBindableArgs, IPlaceholderArgs { +type SelectInputArgs = { /** * Used to map the options. */ @@ -52,7 +53,7 @@ interface SelectInputArgs extends ElementArgs, IBindableArgs, IPlaceholderArgs { /** * An array of values against which new values are checked before they are created. If a value is in the array it will not be created. */ - invalidOptions?: Array; + invalidOptions?: any[]; /** * If `true` then null is a valid input value. Defaults to `false`. */ @@ -80,7 +81,7 @@ interface SelectInputArgs extends ElementArgs, IBindableArgs, IPlaceholderArgs { /** * The order that the options should be checked in to find a valid fallback option that isn't included in the disabledOptions object. */ - fallbackOrder?: Array; + fallbackOrder?: string[]; /** * All the option values that should be disabled. The keys of the object are the values of the options and the values are the text to show when the option is disabled. */ @@ -93,7 +94,7 @@ interface SelectInputArgs extends ElementArgs, IBindableArgs, IPlaceholderArgs { * Text to display in the SelectInput before the selected option. */ prefix?: string; -} +} & ElementArgs & IBindableArgs & IPlaceholderArgs /** @@ -178,7 +179,7 @@ class SelectInput extends Element implements IBindable, IFocusable { protected _valueToLabel: Record = {}; - protected _labelToValue: Map = new Map(); + protected _labelToValue = new Map(); protected _labelHighlighted: Label = null; @@ -200,7 +201,7 @@ class SelectInput extends Element implements IBindable, IFocusable { protected _disabledOptions: Record = {}; - protected _fallbackOrder: Array; + protected _fallbackOrder: string[]; protected _disabledValue: string; @@ -1282,7 +1283,7 @@ class SelectInput extends Element implements IBindable, IFocusable { * display that value. Otherwise, it will display a "multiple values" state. */ /* eslint accessor-pairs: 0 */ - set values(values: Array) { + set values(values: any[]) { values = values.map((value) => { return this._convertValue(value); }); diff --git a/src/components/SliderInput/index.ts b/src/components/SliderInput/index.ts index 61217ec6..eb3e90c5 100644 --- a/src/components/SliderInput/index.ts +++ b/src/components/SliderInput/index.ts @@ -1,5 +1,6 @@ import { CLASS_MULTIPLE_VALUES } from '../../class'; -import { Element, ElementArgs, IBindable, IBindableArgs, IFocusable, IPlaceholder, IPlaceholderArgs } from '../Element'; +import type { ElementArgs, IBindable, IBindableArgs, IFocusable, IPlaceholder, IPlaceholderArgs } from '../Element'; +import { Element } from '../Element'; import { NumericInput } from '../NumericInput'; const CLASS_SLIDER = 'pcui-slider'; @@ -13,7 +14,7 @@ const IS_CHROME = /Chrome\//.test(globalThis.navigator?.userAgent); /** * The arguments for the {@link SliderInput} constructor. */ -interface SliderInputArgs extends ElementArgs, IBindableArgs, IPlaceholderArgs { +type SliderInputArgs = { /** * Sets whether any key up event will cause a change event to be fired. */ @@ -47,7 +48,7 @@ interface SliderInputArgs extends ElementArgs, IBindableArgs, IPlaceholderArgs { * Sets whether the value can be null. If not then it will be 0 instead of null. */ allowNull?: boolean -} +} & ElementArgs & IBindableArgs & IPlaceholderArgs /** * The SliderInput shows a NumericInput and a slider widget next to it. It acts as a proxy of the @@ -352,7 +353,7 @@ class SliderInput extends Element implements IBindable, IFocusable, IPlaceholder } /* eslint accessor-pairs: 0 */ - set values(values: Array) { + set values(values: number[]) { this._numericInput.values = values; if (this._numericInput.class.contains(CLASS_MULTIPLE_VALUES)) { this.class.add(CLASS_MULTIPLE_VALUES); diff --git a/src/components/Spinner/index.ts b/src/components/Spinner/index.ts index 6ee1a33d..bbb74a08 100644 --- a/src/components/Spinner/index.ts +++ b/src/components/Spinner/index.ts @@ -1,4 +1,5 @@ -import { Element, ElementArgs } from '../Element'; +import type { ElementArgs } from '../Element'; +import { Element } from '../Element'; const CLASS_ROOT = 'pcui-spinner'; @@ -16,7 +17,7 @@ function createSmallThick(size: any, dom: any) { /** * The arguments for the {@link Spinner} constructor. */ -interface SpinnerArgs extends ElementArgs { +type SpinnerArgs = { /** * Sets the pixel size of the spinner. Defaults to 12. */ @@ -25,7 +26,7 @@ interface SpinnerArgs extends ElementArgs { * Can be 'small-thick'. Defaults to 'small-thick'. */ type?: 'small-thick' -} +} & ElementArgs /** * Represents a spinning icon. diff --git a/src/components/TextAreaInput/index.ts b/src/components/TextAreaInput/index.ts index d434223e..098d07ac 100644 --- a/src/components/TextAreaInput/index.ts +++ b/src/components/TextAreaInput/index.ts @@ -1,5 +1,6 @@ import { Element } from '../Element'; -import { TextInput, TextInputArgs } from '../TextInput'; +import type { TextInputArgs } from '../TextInput'; +import { TextInput } from '../TextInput'; const CLASS_TEXT_AREA_INPUT = 'pcui-text-area-input'; const CLASS_TEXT_AREA_INPUT_RESIZABLE = `${CLASS_TEXT_AREA_INPUT}-resizable`; @@ -11,13 +12,13 @@ const CLASS_TEXT_AREA_INPUT_RESIZABLE_VERTICAL = `${CLASS_TEXT_AREA_INPUT_RESIZA /** * The arguments for the {@link TextAreaInput} constructor. */ -interface TextAreaInputArgs extends TextInputArgs { +type TextAreaInputArgs = { /** * Sets which directions the text area can be resized in. One of 'both', 'horizontal', * 'vertical' or 'none'. Defaults to 'none'. */ resizable?: 'horizontal' | 'vertical' | 'both' | 'none' -} +} & TextInputArgs /** * The TextAreaInput wraps a textarea element. It has the same interface as {@link TextInput}. diff --git a/src/components/TextInput/index.ts b/src/components/TextInput/index.ts index d02b26eb..0df5d9af 100644 --- a/src/components/TextInput/index.ts +++ b/src/components/TextInput/index.ts @@ -1,20 +1,22 @@ import { CLASS_MULTIPLE_VALUES } from '../../class'; -import { Element, IBindableArgs, IPlaceholderArgs } from '../Element'; -import { InputElement, InputElementArgs } from '../InputElement'; +import type { IBindableArgs, IPlaceholderArgs } from '../Element'; +import { Element } from '../Element'; +import type { InputElementArgs } from '../InputElement'; +import { InputElement } from '../InputElement'; const CLASS_TEXT_INPUT = 'pcui-text-input'; /** * The arguments for the {@link TextInput} constructor. */ -interface TextInputArgs extends InputElementArgs, IBindableArgs, IPlaceholderArgs { +type TextInputArgs = { /** * A function that validates the value that is entered into the input and returns `true` if it * is valid or `false` otherwise. If `false` then the input will be set in an error state and * the value will not propagate to the binding. */ onValidate?: (value: string) => boolean, -} +} & InputElementArgs & IBindableArgs & IPlaceholderArgs /** * The TextInput is an input element of type text. @@ -62,7 +64,7 @@ class TextInput extends InputElement { } } - protected _updateValue(value: string | Array) { + protected _updateValue(value: string | string[]) { this.class.remove(CLASS_MULTIPLE_VALUES); if (value && typeof (value) === 'object') { @@ -94,7 +96,7 @@ class TextInput extends InputElement { return true; } - set value(value: string | Array) { + set value(value: string | string[]) { const changed = this._updateValue(value); if (changed) { @@ -116,7 +118,7 @@ class TextInput extends InputElement { * value. Otherwise, it will be empty and display a "multiple values" state. */ /* eslint accessor-pairs: 0 */ - set values(values: Array) { + set values(values: string[]) { const different = values.some(v => v !== values[0]); if (different) { diff --git a/src/components/TreeView/component.stories.tsx b/src/components/TreeView/component.stories.tsx index 263b8786..80106e3b 100644 --- a/src/components/TreeView/component.stories.tsx +++ b/src/components/TreeView/component.stories.tsx @@ -1,9 +1,10 @@ import type { Meta, StoryObj } from '@storybook/react-webpack5'; import * as React from 'react'; -import { TreeView } from './component'; import { TreeViewItem } from '../TreeViewItem/component'; +import { TreeView } from './component'; + import '../../scss/index.js'; const meta: Meta = { diff --git a/src/components/TreeView/index.ts b/src/components/TreeView/index.ts index a61732e7..78e2846d 100644 --- a/src/components/TreeView/index.ts +++ b/src/components/TreeView/index.ts @@ -1,5 +1,6 @@ import { searchItems } from '../../helpers/search'; -import { Container, ContainerArgs } from '../Container'; +import type { ContainerArgs } from '../Container'; +import { Container } from '../Container'; import { Element } from '../Element'; import { TreeViewItem } from '../TreeViewItem'; @@ -16,7 +17,7 @@ const DRAG_AREA_AFTER = 'after'; /** * Represents an item that has been reparented in a {@link TreeView} drag operation. */ -interface ReparentedItem { +type ReparentedItem = { /** * The reparented tree view item. */ @@ -38,7 +39,7 @@ interface ReparentedItem { /** * The arguments for the {@link TreeView} constructor. */ -interface TreeViewArgs extends ContainerArgs { +type TreeViewArgs = { /** * Whether dragging a {@link TreeViewItem} is allowed. Defaults to `true`. */ @@ -69,7 +70,7 @@ interface TreeViewArgs extends ContainerArgs { * The element to scroll on drag. Defaults to this {@link TreeView}'s element. */ dragScrollElement?: Element -} +} & ContainerArgs /** * A container that can show a TreeView like a hierarchy. The TreeView contains @@ -790,7 +791,7 @@ class TreeView extends Container { // but will instead calculate the new indexes and pass that data to the reparent function // to perform the reparenting - // eslint-disable-next-line no-undef + const fakeDom: { parent: Container; children: ChildNode[]; }[] = []; const getChildren = (parent: Container) => { @@ -803,7 +804,7 @@ class TreeView extends Container { return fakeDom[idx].children; }; - // eslint-disable-next-line no-undef + const treeItemIndex = (children: ChildNode[], target: ChildNode): number => { let count = 0; for (const child of children) { @@ -1288,7 +1289,7 @@ class TreeView extends Container { /** * Gets all of the currently selected TreeViewItems. */ - get selected(): Array { + get selected(): TreeViewItem[] { return this._selectedItems.slice(); } diff --git a/src/components/TreeViewItem/index.ts b/src/components/TreeViewItem/index.ts index 15148575..21f58829 100644 --- a/src/components/TreeViewItem/index.ts +++ b/src/components/TreeViewItem/index.ts @@ -1,6 +1,7 @@ import { CLASS_FONT_REGULAR } from '../../class'; -import { Container, ContainerArgs } from '../Container'; -import { Element } from '../Element'; +import type { ContainerArgs } from '../Container'; +import { Container } from '../Container'; +import type { Element } from '../Element'; import { Label } from '../Label'; import { TextInput } from '../TextInput'; import type { TreeView } from '../TreeView'; @@ -17,7 +18,7 @@ const CLASS_RENAME = `${CLASS_ROOT}-rename`; /** * The arguments for the {@link TreeViewItem} constructor. */ -interface TreeViewItemArgs extends ContainerArgs { +type TreeViewItemArgs = { /** * Whether the item is selected. */ @@ -55,7 +56,7 @@ interface TreeViewItemArgs extends ContainerArgs { * Method to be called when the {@link TreeViewItem} is deselected. */ onDeselect?: () => void -} +} & ContainerArgs /** * A TreeViewItem is a single node in a hierarchical {@link TreeView} control. diff --git a/src/components/VectorInput/index.ts b/src/components/VectorInput/index.ts index 00096ae0..98555318 100644 --- a/src/components/VectorInput/index.ts +++ b/src/components/VectorInput/index.ts @@ -1,7 +1,8 @@ -import { Observer } from '@playcanvas/observer'; +import type { Observer } from '@playcanvas/observer'; import { CLASS_FOCUS, CLASS_MULTIPLE_VALUES } from '../../class'; -import { Element, ElementArgs, IBindable, IBindableArgs, IFocusable, IMultiPlaceholder, IMultiPlaceholderArgs } from '../Element'; +import type { ElementArgs, IBindable, IBindableArgs, IFocusable, IMultiPlaceholder, IMultiPlaceholderArgs } from '../Element'; +import { Element } from '../Element'; import { NumericInput } from '../NumericInput'; const CLASS_VECTOR_INPUT = 'pcui-vector-input'; @@ -9,7 +10,7 @@ const CLASS_VECTOR_INPUT = 'pcui-vector-input'; /** * The arguments for the {@link VectorInput} constructor. */ -interface VectorInputArgs extends ElementArgs, IBindableArgs, IMultiPlaceholderArgs { +type VectorInputArgs = { /** * The number of dimensions in the vector. Can be between 2 to 4. Defaults to 3. */ @@ -34,7 +35,7 @@ interface VectorInputArgs extends ElementArgs, IBindableArgs, IMultiPlaceholderA * The incremental step when holding Shift and using arrow keys or dragger for each vector element. */ stepPrecision?: number; -} +} & ElementArgs & IBindableArgs & IMultiPlaceholderArgs /** * A vector input. The vector can have 2 to 4 dimensions with each dimension being a {@link NumericInput}. @@ -308,7 +309,7 @@ class VectorInput extends Element implements IBindable, IFocusable, IMultiPlaceh * Otherwise, it will display a "multiple values" state. */ /* eslint accessor-pairs: 0 */ - set values(values: Array) { + set values(values: any[]) { // create an array for each dimension (e.g. one array for x one for y one for z) values = this._inputs.map((_, i) => values.map((arr) => { return arr ? arr[i] : undefined; diff --git a/src/helpers/utils.ts b/src/helpers/utils.ts index d8e6eaf1..3e07ca15 100644 --- a/src/helpers/utils.ts +++ b/src/helpers/utils.ts @@ -20,7 +20,7 @@ export function deepCopy(data: any) { return obj; } -export function arrayEquals(lhs: Array, rhs: Array) { +export function arrayEquals(lhs: any[], rhs: any[]) { if (!lhs) { return false; } From 730a867767a86f92f8ce8348117936dbb661b383 Mon Sep 17 00:00:00 2001 From: kpal Date: Thu, 4 Jun 2026 15:35:59 +0100 Subject: [PATCH 2/5] chore: bump @playcanvas/eslint-config to 3.0.0-beta.6 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1b7dc98c..bf6b81b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@babel/preset-env": "7.29.7", "@babel/preset-react": "7.29.7", "@babel/preset-typescript": "7.29.7", - "@playcanvas/eslint-config": "3.0.0-beta.5", + "@playcanvas/eslint-config": "3.0.0-beta.6", "@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-replace": "6.0.3", "@rollup/plugin-typescript": "12.3.0", @@ -4043,9 +4043,9 @@ } }, "node_modules/@playcanvas/eslint-config": { - "version": "3.0.0-beta.5", - "resolved": "https://registry.npmjs.org/@playcanvas/eslint-config/-/eslint-config-3.0.0-beta.5.tgz", - "integrity": "sha512-ItIq14McE3GlFjJkO3oPeqw2MHcKCoZnoWuNTv8B7dftE9lVftTi5TCBIBLG6/wxB6EaS6rK1zoIFoNpSazXwA==", + "version": "3.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@playcanvas/eslint-config/-/eslint-config-3.0.0-beta.6.tgz", + "integrity": "sha512-P4AZcIVGdW50KpQ5YDvh5xuC6lrHEjfLJqLwTYfrQUfV7JSbtL5IvNYOLXTVf9JigTfIfyTS8XJjgDlaHtv9SA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 2f3d0a88..206933c8 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "@babel/preset-env": "7.29.7", "@babel/preset-react": "7.29.7", "@babel/preset-typescript": "7.29.7", - "@playcanvas/eslint-config": "3.0.0-beta.5", + "@playcanvas/eslint-config": "3.0.0-beta.6", "@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-replace": "6.0.3", "@rollup/plugin-typescript": "12.3.0", From 66e81cb7c8d626bba163204eccac81fc1b5c046e Mon Sep 17 00:00:00 2001 From: KPal Date: Wed, 5 Aug 2026 13:49:17 +0100 Subject: [PATCH 3/5] chore: complete ESLint v3 migration --- .github/workflows/ci.yml | 3 + eslint.config.mjs | 1 + package-lock.json | 25 ++- package.json | 10 +- prettier.config.mjs | 1 + rollup.config.mjs | 21 +- src/Math/color-value.ts | 4 +- src/binding/BindingBase/index.ts | 22 ++- .../BindingElementToObservers/index.ts | 6 +- .../BindingObserversToElement/index.ts | 10 +- src/binding/BindingTwoWay/index.ts | 9 +- .../ArrayInput/component.stories.tsx | 36 +++- src/components/ArrayInput/component.tsx | 3 +- src/components/ArrayInput/index.ts | 22 +-- .../BooleanInput/component.stories.tsx | 2 +- src/components/BooleanInput/component.tsx | 3 +- src/components/BooleanInput/index.ts | 10 +- src/components/BooleanInput/style.scss | 14 +- src/components/Button/component.stories.tsx | 4 +- src/components/Button/component.tsx | 3 +- src/components/Button/index.ts | 10 +- src/components/Button/style.scss | 5 +- src/components/Canvas/component.stories.tsx | 2 +- src/components/Canvas/component.tsx | 5 +- src/components/Canvas/index.ts | 5 +- src/components/Code/component.stories.tsx | 2 +- src/components/Code/component.tsx | 3 +- src/components/Code/index.ts | 6 +- .../ColorPicker/component.stories.tsx | 4 +- src/components/ColorPicker/component.tsx | 5 +- src/components/ColorPicker/index.ts | 38 ++-- src/components/ColorPicker/style.scss | 21 +- .../Container/component.stories.tsx | 10 +- src/components/Container/component.tsx | 22 +-- src/components/Container/index.ts | 45 ++--- src/components/Divider/component.stories.tsx | 2 +- src/components/Divider/component.tsx | 2 +- src/components/Element/component.tsx | 2 +- src/components/Element/index.ts | 144 +++++++------- src/components/Element/style.scss | 8 +- .../GradientPicker/component.stories.tsx | 2 +- src/components/GradientPicker/component.tsx | 5 +- src/components/GradientPicker/index.ts | 184 ++++++++---------- src/components/GradientPicker/style.scss | 12 +- src/components/GridView/component.stories.tsx | 24 +-- src/components/GridView/component.tsx | 17 +- src/components/GridView/index.ts | 45 +++-- src/components/GridViewItem/component.tsx | 3 +- src/components/GridViewItem/index.ts | 6 +- src/components/InfoBox/component.stories.tsx | 2 +- src/components/InfoBox/component.tsx | 3 +- src/components/InfoBox/index.ts | 4 +- src/components/InputElement/index.ts | 17 +- src/components/InputElement/style.scss | 5 +- src/components/Label/component.stories.tsx | 2 +- src/components/Label/component.tsx | 3 +- src/components/Label/index.ts | 18 +- .../LabelGroup/component.stories.tsx | 8 +- src/components/LabelGroup/component.tsx | 7 +- src/components/LabelGroup/index.ts | 4 +- src/components/Menu/component.stories.tsx | 32 +-- src/components/Menu/component.tsx | 3 +- src/components/Menu/index.ts | 8 +- src/components/MenuItem/index.ts | 6 +- src/components/MenuItem/style.scss | 4 +- .../NumericInput/component.stories.tsx | 2 +- src/components/NumericInput/component.tsx | 3 +- src/components/NumericInput/index.ts | 30 +-- src/components/Overlay/component.stories.tsx | 2 +- src/components/Overlay/component.tsx | 3 +- src/components/Overlay/index.ts | 8 +- src/components/Overlay/style.scss | 10 +- src/components/Panel/component.stories.tsx | 8 +- src/components/Panel/component.tsx | 25 ++- src/components/Panel/index.ts | 25 ++- src/components/Panel/style.scss | 4 +- src/components/Progress/component.stories.tsx | 2 +- src/components/Progress/component.tsx | 3 +- src/components/Progress/index.ts | 6 +- src/components/Progress/style.scss | 54 ++--- .../RadioButton/component.stories.tsx | 2 +- src/components/RadioButton/component.tsx | 3 +- src/components/RadioButton/index.ts | 4 +- src/components/RadioButton/style.scss | 5 +- .../SelectInput/component.stories.tsx | 2 +- src/components/SelectInput/component.tsx | 3 +- src/components/SelectInput/index.ts | 32 +-- src/components/SelectInput/style.scss | 8 +- .../SliderInput/component.stories.tsx | 2 +- src/components/SliderInput/component.tsx | 3 +- src/components/SliderInput/index.ts | 33 ++-- src/components/Spinner/component.stories.tsx | 2 +- src/components/Spinner/component.tsx | 3 +- src/components/Spinner/index.ts | 11 +- .../TextAreaInput/component.stories.tsx | 2 +- src/components/TextAreaInput/component.tsx | 3 +- src/components/TextAreaInput/index.ts | 15 +- .../TextInput/component.stories.tsx | 2 +- src/components/TextInput/component.tsx | 3 +- src/components/TextInput/index.ts | 22 ++- src/components/TreeView/component.stories.tsx | 24 +-- src/components/TreeView/component.tsx | 3 +- src/components/TreeView/index.ts | 62 +++--- src/components/TreeViewItem/component.tsx | 3 +- src/components/TreeViewItem/index.ts | 24 +-- .../VectorInput/component.stories.tsx | 6 +- src/components/VectorInput/component.tsx | 3 +- src/components/VectorInput/index.ts | 49 +++-- src/components/index.ts | 12 +- .../BidirectionalBinding/index.stories.tsx | 3 +- src/examples/History/index.stories.tsx | 21 +- src/examples/Observer/index.stories.tsx | 10 +- src/examples/TodoList/index.stories.tsx | 24 ++- src/helpers/search.ts | 13 +- src/helpers/utils.ts | 5 +- src/scss/_icons.scss | 3 +- src/scss/pcui-theme-green.scss | 2 +- src/scss/pcui-theme-grey.scss | 2 +- 118 files changed, 918 insertions(+), 670 deletions(-) create mode 100644 prettier.config.mjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94cb86a0..ef33b244 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,9 @@ jobs: - name: Install Dependencies run: npm ci + - name: Check Formatting + run: npm run fmt + - name: Run ESLint run: npm run lint diff --git a/eslint.config.mjs b/eslint.config.mjs index b33da8a3..78e7af0a 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -22,6 +22,7 @@ export default [ }, rules: { '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/consistent-type-definitions': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unused-vars': 'off' } diff --git a/package-lock.json b/package-lock.json index bf6b81b9..d5519f18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@babel/preset-env": "7.29.7", "@babel/preset-react": "7.29.7", "@babel/preset-typescript": "7.29.7", - "@playcanvas/eslint-config": "3.0.0-beta.6", + "@playcanvas/eslint-config": "3.0.0-beta.8", "@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-replace": "6.0.3", "@rollup/plugin-typescript": "12.3.0", @@ -36,6 +36,7 @@ "jsdom": "29.1.1", "playcanvas": "2.18.2", "postcss": "8.5.15", + "prettier": "3.9.6", "prop-types": "15.8.1", "publint": "0.3.21", "rollup": "4.60.4", @@ -4043,9 +4044,9 @@ } }, "node_modules/@playcanvas/eslint-config": { - "version": "3.0.0-beta.6", - "resolved": "https://registry.npmjs.org/@playcanvas/eslint-config/-/eslint-config-3.0.0-beta.6.tgz", - "integrity": "sha512-P4AZcIVGdW50KpQ5YDvh5xuC6lrHEjfLJqLwTYfrQUfV7JSbtL5IvNYOLXTVf9JigTfIfyTS8XJjgDlaHtv9SA==", + "version": "3.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@playcanvas/eslint-config/-/eslint-config-3.0.0-beta.8.tgz", + "integrity": "sha512-E9GavHekFgxciZxcf0FHfn79uUT7aKRgxcFz/Pz7l5TszB1EqqNWI3Df0qcqFUSjnq6V1fvkgS1JraNXY0pK9g==", "dev": true, "license": "MIT", "dependencies": { @@ -13423,6 +13424,22 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", diff --git a/package.json b/package.json index 206933c8..b9ea1390 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "@babel/preset-env": "7.29.7", "@babel/preset-react": "7.29.7", "@babel/preset-typescript": "7.29.7", - "@playcanvas/eslint-config": "3.0.0-beta.6", + "@playcanvas/eslint-config": "3.0.0-beta.8", "@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-replace": "6.0.3", "@rollup/plugin-typescript": "12.3.0", @@ -90,6 +90,7 @@ "jsdom": "29.1.1", "playcanvas": "2.18.2", "postcss": "8.5.15", + "prettier": "3.9.6", "prop-types": "15.8.1", "publint": "0.3.21", "rollup": "4.60.4", @@ -120,9 +121,12 @@ "bundle:styles": "scss-bundle -e ./src/scss/pcui-theme-grey.scss -o ./dist/pcui-theme-grey.scss && scss-bundle -e ./src/scss/pcui-theme-green.scss -o ./dist/pcui-theme-green.scss", "develop": "cross-env concurrently --kill-others \"npm run watch\" \"npm run serve\"", "docs": "typedoc", + "fmt": "prettier --check src utils rollup.config.mjs eslint.config.mjs prettier.config.mjs", + "fmt:fix": "prettier --write src utils rollup.config.mjs eslint.config.mjs prettier.config.mjs", "lint": "npm run lint:js && npm run lint:styles", - "lint:js": "eslint src utils rollup.config.mjs eslint.config.mjs", - "lint:js:fix": "eslint src utils rollup.config.mjs eslint.config.mjs --fix", + "lint:fix": "npm run lint:js:fix && npm run lint:styles -- --fix", + "lint:js": "eslint src utils rollup.config.mjs eslint.config.mjs prettier.config.mjs", + "lint:js:fix": "eslint src utils rollup.config.mjs eslint.config.mjs prettier.config.mjs --fix", "lint:styles": "stylelint src/**/*.scss", "publint": "publint", "serve": "serve", diff --git a/prettier.config.mjs b/prettier.config.mjs new file mode 100644 index 00000000..1f5ea4f3 --- /dev/null +++ b/prettier.config.mjs @@ -0,0 +1 @@ +export { default } from '@playcanvas/eslint-config/prettier'; diff --git a/rollup.config.mjs b/rollup.config.mjs index b2f323b1..ad37d49f 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -24,7 +24,7 @@ const getRevision = () => { let revision; try { revision = execSync('git rev-parse --short HEAD').toString().trim(); - } catch (e) { + } catch { revision = 'unknown'; } return revision; @@ -32,8 +32,8 @@ const getRevision = () => { const replacements = { values: { - 'PACKAGE_VERSION': getVersion(), - 'PACKAGE_REVISION': getRevision() + PACKAGE_VERSION: getVersion(), + PACKAGE_REVISION: getRevision() }, preventAssignment: true }; @@ -72,7 +72,7 @@ const react_module = { format: 'esm', entryFileNames: '[name].mjs', globals: { - 'react': 'React' + react: 'React' }, preserveModules: true, sourcemap: true @@ -105,16 +105,17 @@ const styles = { api: 'modern', insert: true, output: false, - processor: css => postcss([autoprefixer]) - .process(css, { - from: undefined - }) - .then(result => result.css) + processor: (css) => + postcss([autoprefixer]) + .process(css, { + from: undefined + }) + .then((result) => result.css) }) ] }; -export default (args) => { +export default (_args) => { if (process.env.target === 'es6') { return [module]; } else if (process.env.target === 'react:es6') { diff --git a/src/Math/color-value.ts b/src/Math/color-value.ts index c8d86338..36bab8d2 100644 --- a/src/Math/color-value.ts +++ b/src/Math/color-value.ts @@ -20,9 +20,9 @@ function _rgb2hsv(rgb: number[]) { if (r === v) { h = bb - gg; } else if (g === v) { - h = (1 / 3) + rr - bb; + h = 1 / 3 + rr - bb; } else if (b === v) { - h = (2 / 3) + gg - rr; + h = 2 / 3 + gg - rr; } if (h < 0) { diff --git a/src/binding/BindingBase/index.ts b/src/binding/BindingBase/index.ts index 20ab3e88..4d22b710 100644 --- a/src/binding/BindingBase/index.ts +++ b/src/binding/BindingBase/index.ts @@ -6,32 +6,32 @@ import type { IBindable } from '../../components/Element'; /** * The interface for arguments for the {@link BindingBase} constructor. */ -export type BindingBaseArgs = { +export interface BindingBaseArgs { /** * The IBindable element. */ - element?: IBindable, + element?: IBindable; /** * The history object which will be used to record undo / redo actions. * If none is provided then no history will be recorded. */ - history?: History, + history?: History; /** * A prefix that will be used for the name of every history action. */ - historyPrefix?: string, + historyPrefix?: string; /** * A postfix that will be used for the name of every history action. */ - historyPostfix?: string, + historyPostfix?: string; /** * The name of each history action. */ - historyName?: string, + historyName?: string; /** * Whether to combine history actions. */ - historyCombine?: boolean + historyCombine?: boolean; } /** @@ -90,7 +90,7 @@ class BindingBase extends Events { * If more observers than paths are passed then the path at index 0 will be used for all observers. * If one observer and multiple paths are passed then all of the paths will be used for the observer (e.g. for curves). */ - link(observers: Observer|Observer[], paths: string|string[]) { + link(observers: Observer | Observer[], paths: string | string[]) { if (this._observers) { this.unlink(); } @@ -123,6 +123,7 @@ class BindingBase extends Events { * @param value - The value */ setValue(value: any) { + // implemented by derived classes } /** @@ -131,6 +132,7 @@ class BindingBase extends Events { * @param values - The values. */ setValues(values: any[]) { + // implemented by derived classes } /** @@ -139,6 +141,7 @@ class BindingBase extends Events { * @param value - The value. */ addValue(value: any) { + // implemented by derived classes } /** @@ -147,6 +150,7 @@ class BindingBase extends Events { * @param values - The values. */ addValues(values: any[]) { + // implemented by derived classes } /** @@ -155,6 +159,7 @@ class BindingBase extends Events { * @param value - The value. */ removeValue(value: any) { + // implemented by derived classes } /** @@ -163,6 +168,7 @@ class BindingBase extends Events { * @param values - The values. */ removeValues(values: any[]) { + // implemented by derived classes } /** diff --git a/src/binding/BindingElementToObservers/index.ts b/src/binding/BindingElementToObservers/index.ts index 00fdc8fd..11e7def3 100644 --- a/src/binding/BindingElementToObservers/index.ts +++ b/src/binding/BindingElementToObservers/index.ts @@ -165,7 +165,7 @@ class BindingElementToObservers extends BindingBase { const observer = observers[i]; values.forEach((value) => { - if (observer.get(path).indexOf(value) === -1) { + if (observer.get(path).indexOf(value) === -1) { records.push({ observer: observer, path: path, @@ -247,7 +247,7 @@ class BindingElementToObservers extends BindingBase { values.forEach((value) => { const ind = observer.get(path).indexOf(value); - if (ind !== -1) { + if (ind !== -1) { records.push({ observer: observer, path: path, @@ -320,7 +320,7 @@ class BindingElementToObservers extends BindingBase { setValues(values: any[]) { // make sure we deep copy arrays because they will not be cloned when set to the observers - values = values.slice().map(val => (Array.isArray(val) ? val.slice() : val)); + values = values.slice().map((val) => (Array.isArray(val) ? val.slice() : val)); this._setValue(values, true); } diff --git a/src/binding/BindingObserversToElement/index.ts b/src/binding/BindingObserversToElement/index.ts index 9b7a18c6..ffbb3924 100644 --- a/src/binding/BindingObserversToElement/index.ts +++ b/src/binding/BindingObserversToElement/index.ts @@ -7,12 +7,12 @@ import { BindingBase } from '../BindingBase'; /** * The interface for arguments for the {@link BindingObserversToElement} constructor. */ -export type BindingObserversToElementArgs = { +export interface BindingObserversToElementArgs extends BindingBaseArgs { /** * Custom update function. */ customUpdate?: (element: IBindable, observers: Observer[], paths: string[]) => void; -} & BindingBaseArgs +} /** * Provides one way binding between Observers and an {@link IBindable} element and Observers. Any @@ -72,7 +72,9 @@ class BindingObserversToElement extends BindingBase { return this._observers[0].has(path) ? this._observers[0].get(path) : undefined; }); } else { - this._element.value = (this._observers[0].has(this._paths[0]) ? this._observers[0].get(this._paths[0]) : undefined); + this._element.value = this._observers[0].has(this._paths[0]) + ? this._observers[0].get(this._paths[0]) + : undefined; } } else { this._element.values = this._observers.map((observer, i) => { @@ -84,7 +86,7 @@ class BindingObserversToElement extends BindingBase { this.applyingChange = false; } - link(observers: Observer|Observer[], paths: string|string[]) { + link(observers: Observer | Observer[], paths: string | string[]) { super.link(observers, paths); // don't render changes when we link diff --git a/src/binding/BindingTwoWay/index.ts b/src/binding/BindingTwoWay/index.ts index 4bad7bc6..2d505912 100644 --- a/src/binding/BindingTwoWay/index.ts +++ b/src/binding/BindingTwoWay/index.ts @@ -9,7 +9,7 @@ import { BindingObserversToElement } from '../BindingObserversToElement'; /** * The interface for arguments for the {@link BindingTwoWay} constructor. */ -export type BindingTwoWayArgs = { +export interface BindingTwoWayArgs extends BindingBaseArgs { /** * BindingElementToObservers instance. */ @@ -19,7 +19,7 @@ export type BindingTwoWayArgs = { * BindingObserversToElement instance. */ bindingObserversToElement?: BindingObserversToElement; -} & BindingBaseArgs +} /** * Provides two way data binding between Observers and {@link IBindable} elements. This means that @@ -59,13 +59,12 @@ class BindingTwoWay extends BindingBase { }); } - link(observers: Observer|Observer[], paths: string|string[]) { + link(observers: Observer | Observer[], paths: string | string[]) { super.link(observers, paths); this._bindingElementToObservers.link(observers, paths); this._bindingObserversToElement.link(observers, paths); } - unlink() { this._bindingElementToObservers.unlink(); this._bindingObserversToElement.unlink(); @@ -109,7 +108,7 @@ class BindingTwoWay extends BindingBase { this._bindingObserversToElement.element = value; } - get element() : IBindable | undefined { + get element(): IBindable | undefined { return this._element; } diff --git a/src/components/ArrayInput/component.stories.tsx b/src/components/ArrayInput/component.stories.tsx index bdeb08bd..f867be1c 100644 --- a/src/components/ArrayInput/component.stories.tsx +++ b/src/components/ArrayInput/component.stories.tsx @@ -19,25 +19,49 @@ export default meta; type Story = StoryObj; export const String: Story = { - render: args => + render: (args) => }; export const Number: Story = { - render: args => + render: (args) => }; export const Boolean: Story = { - render: args => + render: (args) => }; export const Vec2: Story = { - render: args => + render: (args) => ( + + ) }; export const Vec3: Story = { - render: args => + render: (args) => ( + + ) }; export const Vec4: Story = { - render: args => + render: (args) => ( + + ) }; diff --git a/src/components/ArrayInput/component.tsx b/src/components/ArrayInput/component.tsx index b3029352..a76a3a56 100644 --- a/src/components/ArrayInput/component.tsx +++ b/src/components/ArrayInput/component.tsx @@ -1,6 +1,7 @@ import { Element } from '../Element/component'; -import { ArrayInput as ArrayInputClass, ArrayInputArgs } from './index'; +import type { ArrayInputArgs } from './index'; +import { ArrayInput as ArrayInputClass } from './index'; /** * Element that allows editing an array of values. diff --git a/src/components/ArrayInput/index.ts b/src/components/ArrayInput/index.ts index ebc5b73f..bc3069b4 100644 --- a/src/components/ArrayInput/index.ts +++ b/src/components/ArrayInput/index.ts @@ -18,7 +18,7 @@ const CLASS_ARRAY_DELETE = `${CLASS_ARRAY_ELEMENT}-delete`; /** * The arguments for the {@link ArrayInput} constructor. */ -type ArrayInputArgs = { +interface ArrayInputArgs extends ElementArgs, IBindableArgs { /** * The type of values that the array can hold. Can be one of the following: * @@ -48,7 +48,7 @@ type ArrayInputArgs = { * Used to specify the default values for each element in the array. Defaults to `null`. */ getDefaultFn?: () => any; -} & ElementArgs & IBindableArgs +} /** * Element that allows editing an array of values. @@ -181,7 +181,8 @@ class ArrayInput extends Element implements IFocusable, IBindable { this._getDefaultFn = args.getDefaultFn ?? null; // @ts-expect-error - let valueType = args.elementArgs && args.elementArgs.type || args.type; + let valueType = (args.elementArgs && args.elementArgs.type) || args.type; + // eslint-disable-next-line no-prototype-builtins -- preserve existing ownership semantics if (!ArrayInput.DEFAULTS.hasOwnProperty(valueType)) { valueType = 'string'; } @@ -437,7 +438,7 @@ class ArrayInput extends Element implements IFocusable, IBindable { this.emit('unlinkElement', element, index); - const path = (useSinglePath ? `${paths[0]}.${index}` : paths.map((path: string) => `${path}.${index}`)); + const path = useSinglePath ? `${paths[0]}.${index}` : paths.map((path: string) => `${path}.${index}`); element.link(observers, path); this._suspendArrayElementEvts = false; @@ -509,7 +510,6 @@ class ArrayInput extends Element implements IFocusable, IBindable { this._arrayElements.splice(i, 1); } - this._inputSize.values = arrayLengths; this._suspendSizeChangeEvt = false; @@ -533,14 +533,14 @@ class ArrayInput extends Element implements IFocusable, IBindable { unlink() { super.unlink(); - this._arrayElements.forEach((entry: { element: Element; }) => { + this._arrayElements.forEach((entry: { element: Element }) => { entry.element.unlink(); }); } - link(observers: Observer|Observer[], paths: string|string[]) { + link(observers: Observer | Observer[], paths: string | string[]) { super.link(observers, paths); - this._arrayElements.forEach((entry: { element: Element; }, index: number) => { + this._arrayElements.forEach((entry: { element: Element }, index: number) => { this._linkArrayElement(entry.element, index); }); } @@ -562,7 +562,7 @@ class ArrayInput extends Element implements IFocusable, IBindable { set binding(value) { super.binding = value; - this._arrayElements.forEach((entry: { element: Element; }) => { + this._arrayElements.forEach((entry: { element: Element }) => { entry.element.binding = value ? value.clone() : null; }); } @@ -591,7 +591,7 @@ class ArrayInput extends Element implements IFocusable, IBindable { */ get value() { // construct value from values of array elements - return this._arrayElements.map((entry: { element: { value: any; }; }) => entry.element.value); + return this._arrayElements.map((entry: { element: { value: any } }) => entry.element.value); } /** @@ -609,7 +609,7 @@ class ArrayInput extends Element implements IFocusable, IBindable { */ set renderChanges(value) { this._renderChanges = value; - this._arrayElements.forEach((entry: { element: { renderChanges: any; }; }) => { + this._arrayElements.forEach((entry: { element: { renderChanges: any } }) => { entry.element.renderChanges = value; }); } diff --git a/src/components/BooleanInput/component.stories.tsx b/src/components/BooleanInput/component.stories.tsx index a3941f94..2185d903 100644 --- a/src/components/BooleanInput/component.stories.tsx +++ b/src/components/BooleanInput/component.stories.tsx @@ -15,5 +15,5 @@ export default meta; type Story = StoryObj; export const Main: Story = { - render: args => + render: (args) => }; diff --git a/src/components/BooleanInput/component.tsx b/src/components/BooleanInput/component.tsx index ad83ef15..df8dd098 100644 --- a/src/components/BooleanInput/component.tsx +++ b/src/components/BooleanInput/component.tsx @@ -1,6 +1,7 @@ import { Element } from '../Element/component'; -import { BooleanInput as BooleanInputClass, BooleanInputArgs } from './index'; +import type { BooleanInputArgs } from './index'; +import { BooleanInput as BooleanInputClass } from './index'; /** * A checkbox element. diff --git a/src/components/BooleanInput/index.ts b/src/components/BooleanInput/index.ts index fcff6621..4c49f1ba 100644 --- a/src/components/BooleanInput/index.ts +++ b/src/components/BooleanInput/index.ts @@ -9,16 +9,16 @@ const CLASS_BOOLEAN_INPUT_TOGGLE = `${CLASS_BOOLEAN_INPUT}-toggle`; /** * The arguments for the {@link BooleanInput} constructor. */ -type BooleanInputArgs = { +interface BooleanInputArgs extends ElementArgs, IBindableArgs { /** * Sets the tabIndex of the {@link BooleanInput}. Defaults to 0. */ - tabIndex?: number, + tabIndex?: number; /** * The type of checkbox. Currently can be `null` or 'toggle'. */ - type?: string -} & ElementArgs & IBindableArgs + type?: string; +} /** * A checkbox element. @@ -143,7 +143,7 @@ class BooleanInput extends Element implements IBindable, IFocusable { /* eslint accessor-pairs: 0 */ set values(values: boolean[]) { - const different = values.some(v => v !== values[0]); + const different = values.some((v) => v !== values[0]); if (different) { this._updateValue(null); diff --git a/src/components/BooleanInput/style.scss b/src/components/BooleanInput/style.scss index 29c853c0..dec90235 100644 --- a/src/components/BooleanInput/style.scss +++ b/src/components/BooleanInput/style.scss @@ -10,7 +10,10 @@ line-height: 1; overflow: hidden; margin: $element-margin; - transition: opacity 100ms, background-color 100ms, box-shadow 100ms; + transition: + opacity 100ms, + background-color 100ms, + box-shadow 100ms; &:focus { outline: none; @@ -84,7 +87,10 @@ line-height: 1; overflow: hidden; margin: $element-margin; - transition: opacity 100ms, background-color 100ms, box-shadow 100ms; + transition: + opacity 100ms, + background-color 100ms, + box-shadow 100ms; &:focus { outline: none; @@ -99,7 +105,9 @@ height: 12px; border-radius: 6px; background-color: $text-darkest; - transition: left 100ms ease, background-color 100ms ease; + transition: + left 100ms ease, + background-color 100ms ease; } } diff --git a/src/components/Button/component.stories.tsx b/src/components/Button/component.stories.tsx index a465992d..da69dc2c 100644 --- a/src/components/Button/component.stories.tsx +++ b/src/components/Button/component.stories.tsx @@ -15,9 +15,9 @@ export default meta; type Story = StoryObj; export const Text: Story = { - render: args =>