diff --git a/.oxlintrc.json b/.oxlintrc.json index 36eef37a961..bc4e876e968 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -21,6 +21,7 @@ "eslint", "import", "oxc", + "promise", "typescript", "unicorn", "vitest", @@ -28,6 +29,12 @@ ], "rules": { "no-async-promise-executor": "off", + "no-else-return": [ + "error", + { + "allowElseIf": false + } + ], "no-console": [ "error", { @@ -35,8 +42,29 @@ } ], "no-control-regex": "off", + "eqeqeq": [ + "error", + "always", + { + "null": "ignore" + } + ], + "func-style": [ + "error", + "declaration", + { + "allowArrowFunctions": true + } + ], "no-eval": "off", + "no-new-func": "error", + // TODO: Enable and fix 104 violations + "no-param-reassign": "off", "no-redeclare": "error", + "no-return-assign": ["error", "always"], + "no-throw-literal": "error", + "no-useless-constructor": "error", + "no-var": "error", "no-restricted-imports": [ "error", { @@ -64,15 +92,66 @@ ] } ], + "no-unneeded-ternary": [ + "error", + { + "defaultAssignment": false + } + ], + "no-useless-call": "error", + "no-useless-concat": "error", + "prefer-const": "error", + // TODO: Enable and fix 581 violations + "prefer-destructuring": "off", + "prefer-object-has-own": "error", + "prefer-object-spread": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", + "prefer-template": "error", + "promise/no-nesting": "error", + "promise/param-names": "error", + // TODO: Enable and fix 76 violations + "promise/prefer-await-to-callbacks": "off", + // TODO: Enable and fix 91 violations + "promise/prefer-await-to-then": "off", + "promise/prefer-catch": "error", + "preserve-caught-error": "error", + "yoda": [ + "error", + "never", + { + "exceptRange": true + } + ], "no-self-assign": "allow", "no-unused-expressions": "off", "no-unused-private-class-members": "off", "no-useless-rename": "off", + "operator-assignment": ["error", "always"], "import/default": "error", "import/export": "error", + "import/first": ["error", "absolute-first"], "import/namespace": "error", "import/no-duplicates": "error", "import/consistent-type-specifier-style": ["error", "prefer-top-level"], + "vitest/consistent-each-for": [ + "error", + { + "test": "for", + "describe": "for" + } + ], + "vitest/consistent-test-filename": [ + "error", + { + "pattern": ".*\\.test\\.ts$" + } + ], + "vitest/consistent-vitest-vi": "error", + "vitest/warn-todo": "warn", + "vitest/hoisted-apis-on-top": "error", + "vitest/no-conditional-tests": "error", + "vitest/prefer-describe-function-title": "error", "jest/expect-expect": "off", "jest/no-conditional-expect": "off", "jest/no-disabled-tests": "off", @@ -82,11 +161,55 @@ "typescript/no-unnecessary-parameter-property-assignment": "off", "typescript/no-unsafe-declaration-merging": "off", "typescript/no-unused-vars": "off", + "unicorn/catch-error-name": [ + "error", + { + "ignore": ["^error\\w+$"] + } + ], + // TODO: Enable and fix 147 violations + "unicorn/consistent-function-scoping": "off", + "unicorn/error-message": "error", + "unicorn/no-abusive-eslint-disable": "error", + // TODO: Enable and fix 165 violations + "unicorn/no-array-for-each": "off", + "unicorn/no-immediate-mutation": "error", + "unicorn/no-instanceof-array": "error", + "unicorn/no-length-as-slice-end": "error", + "unicorn/no-lonely-if": "error", + "unicorn/no-negation-in-equality-check": "error", + "unicorn/no-typeof-undefined": "error", + "unicorn/prefer-math-min-max": "error", + "unicorn/prefer-array-flat-map": "error", "unicorn/no-empty-file": "off", "unicorn/no-new-array": "off", + "unicorn/prefer-add-event-listener": "error", + "unicorn/prefer-array-find": "error", + "unicorn/no-useless-undefined": [ + "error", + { + "checkArguments": false, + "checkArrowFunctionBody": false + } + ], + "unicorn/prefer-classlist-toggle": "error", "unicorn/no-single-promise-in-promise-methods": "off", + "unicorn/no-this-assignment": "error", + "unicorn/no-useless-collection-argument": "error", + "unicorn/no-useless-switch-case": "error", "unicorn/no-useless-fallback-in-spread": "off", "unicorn/no-useless-spread": "off", + "unicorn/prefer-optional-catch-binding": "error", + "unicorn/prefer-prototype-methods": "error", + "unicorn/prefer-query-selector": "error", + "unicorn/prefer-spread": "error", + "unicorn/prefer-regexp-test": "error", + "unicorn/prefer-set-has": "error", + "unicorn/prefer-string-replace-all": "error", + "unicorn/prefer-string-slice": "error", + "unicorn/prefer-string-trim-start-end": "error", + "unicorn/prefer-type-error": "error", + "unicorn/throw-new-error": "error", "typescript/await-thenable": "off", "typescript/no-base-to-string": "off", "typescript/no-duplicate-type-constituents": "off", @@ -96,6 +219,12 @@ "typescript/restrict-template-expressions": "off", "typescript/unbound-method": "off", "typescript/no-floating-promises": "error", + // TODO: Enable and fix 372 violations (use { "ignoreConditionalTests": true }) + "typescript/prefer-nullish-coalescing": "off", + // TODO: Enable and fix violations + "typescript/prefer-optional-chain": "off", + "typescript/prefer-ts-expect-error": "error", + "vue/define-props-destructuring": "error", "vue/no-import-compiler-macros": "error", "vue/no-dupe-keys": "error" }, @@ -114,7 +243,8 @@ "no-control-regex": "error", "no-useless-rename": "error", "no-unused-private-class-members": "error", - "unicorn/no-empty-file": "error" + "unicorn/no-empty-file": "error", + "vitest/consistent-test-filename": "off" } } ] diff --git a/docs/testing/component-testing.md b/docs/testing/component-testing.md index 2caa15a770c..b6308998a85 100644 --- a/docs/testing/component-testing.md +++ b/docs/testing/component-testing.md @@ -12,6 +12,18 @@ This guide covers patterns and examples for testing Vue components in the ComfyU 6. [Asynchronous Component Testing](#asynchronous-component-testing) 7. [Working with Vue Reactivity](#working-with-vue-reactivity) +## Describe Block Naming + +Use `Component.__name ?? 'ComponentName'` for the top-level `describe` title. This passes the function reference (satisfying the `prefer-describe-function-title` lint rule) while providing a readable fallback: + +```typescript +import MyComponent from './MyComponent.vue' + +describe(MyComponent.__name ?? 'MyComponent', () => { + // ... +}) +``` + ## Basic Component Testing Basic approach to testing a component's rendering and structure: @@ -21,7 +33,7 @@ Basic approach to testing a component's rendering and structure: import { mount } from '@vue/test-utils' import SidebarIcon from './SidebarIcon.vue' -describe('SidebarIcon', () => { +describe(SidebarIcon.__name ?? 'SidebarIcon', () => { const exampleProps = { icon: 'pi pi-cog', selected: false diff --git a/eslint.config.ts b/eslint.config.ts index 13068d621d8..8e201d5e6b4 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -138,6 +138,10 @@ export default defineConfig([ 'import-x/no-useless-path-segments': 'error', 'import-x/no-relative-packages': 'error', 'unused-imports/no-unused-imports': 'error', + 'vue/return-in-computed-property': [ + 'error', + { treatUndefinedAsUnspecified: false } + ], 'vue/no-v-html': 'off', // Prohibit dark-theme: and dark: prefixes 'vue/no-restricted-class': ['error', '/^dark(-theme)?:/'], diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4358b09ec08..0ad89c3fe27 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -205,14 +205,14 @@ catalogs: specifier: 22.2.6 version: 22.2.6 oxfmt: - specifier: ^0.26.0 - version: 0.26.0 + specifier: ^0.31.0 + version: 0.31.0 oxlint: - specifier: ^1.33.0 - version: 1.33.0 + specifier: ^1.46.0 + version: 1.46.0 oxlint-tsgolint: - specifier: ^0.9.1 - version: 0.9.1 + specifier: ^0.11.5 + version: 0.11.5 picocolors: specifier: ^1.1.1 version: 1.1.1 @@ -650,13 +650,13 @@ importers: version: 22.2.6 oxfmt: specifier: 'catalog:' - version: 0.26.0 + version: 0.31.0 oxlint: specifier: 'catalog:' - version: 1.33.0(oxlint-tsgolint@0.9.1) + version: 1.46.0(oxlint-tsgolint@0.11.5) oxlint-tsgolint: specifier: 'catalog:' - version: 0.9.1 + version: 0.11.5 picocolors: specifier: 'catalog:' version: 1.1.1 @@ -2626,113 +2626,269 @@ packages: cpu: [x64] os: [win32] - '@oxfmt/darwin-arm64@0.26.0': - resolution: {integrity: sha512-AAGc+8CffkiWeVgtWf4dPfQwHEE5c/j/8NWH7VGVxxJRCZFdmWcqCXprvL2H6qZFewvDLrFbuSPRCqYCpYGaTQ==} + '@oxfmt/binding-android-arm-eabi@0.31.0': + resolution: {integrity: sha512-2A7s+TmsY7xF3yM0VWXq2YJ82Z7Rd7AOKraotyp58Fbk7q9cFZKczW6Zrz/iaMaJYfR/UHDxF3kMR11vayflug==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxfmt/binding-android-arm64@0.31.0': + resolution: {integrity: sha512-3ppKOIf2lQv/BFhRyENWs/oarueppCEnPNo0Az2fKkz63JnenRuJPoHaGRrMHg1oFMUitdYy+YH29Cv5ISZWRQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxfmt/binding-darwin-arm64@0.31.0': + resolution: {integrity: sha512-eFhNnle077DPRW6QPsBtl/wEzPoqgsB1LlzDRYbbztizObHdCo6Yo8T0hew9+HoYtnVMAP19zcRE7VG9OfqkMw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxfmt/darwin-x64@0.26.0': - resolution: {integrity: sha512-xFx5ijCTjw577wJvFlZEMmKDnp3HSCcbYdCsLRmC5i3TZZiDe9DEYh3P46uqhzj8BkEw1Vm1ZCWdl48aEYAzvQ==} + '@oxfmt/binding-darwin-x64@0.31.0': + resolution: {integrity: sha512-9UQSunEqokhR1WnlQCgJjkjw13y8PSnBvR98L78beGudTtNSaPMgwE7t/T0IPDibtDTxeEt+IQVKoQJ+8Jo6Lg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxfmt/linux-arm64-gnu@0.26.0': - resolution: {integrity: sha512-GubkQeQT5d3B/Jx/IiR7NMkSmXrCZcVI0BPh1i7mpFi8HgD1hQ/LbhiBKAMsMqs5bbugdQOgBEl8bOhe8JhW1g==} + '@oxfmt/binding-freebsd-x64@0.31.0': + resolution: {integrity: sha512-FHo7ITkDku3kQ8/44nU6IGR1UNH22aqYM3LV2ytV40hWSMVllXFlM+xIVusT+I/SZBAtuFpwEWzyS+Jn4TkkAQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxfmt/binding-linux-arm-gnueabihf@0.31.0': + resolution: {integrity: sha512-o1NiDlJDO9SOoY5wH8AyPUX60yQcOwu5oVuepi2eetArBp0iFF9qIH1uLlZsUu4QQ6ywqxcJSMjXCqGKC5uQFg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm-musleabihf@0.31.0': + resolution: {integrity: sha512-VXiRxlBz7ivAIjhnnVBEYdjCQ66AsjM0YKxYAcliS0vPqhWKiScIT61gee0DPCVaw1XcuW8u19tfRwpfdYoreg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm64-gnu@0.31.0': + resolution: {integrity: sha512-ryGPOtPViNcjs8N8Ap+wn7SM6ViiLzR9f0Pu7yprae+wjl6qwnNytzsUe7wcb+jT43DJYmvemFqE8tLVUavYbQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@oxfmt/linux-arm64-musl@0.26.0': - resolution: {integrity: sha512-OEypUwK69bFPj+aa3/LYCnlIUPgoOLu//WNcriwpnWNmt47808Ht7RJSg+MNK8a7pSZHpXJ5/E6CRK/OTwFdaQ==} + '@oxfmt/binding-linux-arm64-musl@0.31.0': + resolution: {integrity: sha512-BA3Euxp4bfd+AU3cKPgmHL44BbuBtmQTyAQoVDhX/nqPgbS/auoGp71uQBE4SAPTsQM/FcXxfKmCAdBS7ygF9w==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@oxfmt/linux-x64-gnu@0.26.0': - resolution: {integrity: sha512-xO6iEW2bC6ZHyOTPmPWrg/nM6xgzyRPaS84rATy6F8d79wz69LdRdJ3l/PXlkqhi7XoxhvX4ExysA0Nf10ZZEQ==} + '@oxfmt/binding-linux-ppc64-gnu@0.31.0': + resolution: {integrity: sha512-wIiKHulVWE9s6PSftPItucTviyCvjugwPqEyUl1VD47YsFqa5UtQTknBN49NODHJvBgO+eqqUodgRqmNMp3xyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-gnu@0.31.0': + resolution: {integrity: sha512-6cM8Jt54bg9V/JoeUWhwnzHAS9Kvgc0oFsxql8PVs/njAGs0H4r+GEU4d+LXZPwI3b3ZUuzpbxlRJzer8KW+Cg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-musl@0.31.0': + resolution: {integrity: sha512-d+b05wXVRGaO6gobTaDqUdBvTXwYc0ro7k1UVC37k4VimLRQOzEZqTwVinqIX3LxTaFCmfO1yG00u9Pct3AKwQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-s390x-gnu@0.31.0': + resolution: {integrity: sha512-Q+i2kj8e+two9jTZ3vxmxdNlg++qShe1ODL6xV4+Qt6SnJYniMxfcqphuXli4ft270kuHqd8HSVZs84CsSh1EA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-gnu@0.31.0': + resolution: {integrity: sha512-F2Z5ffj2okhaQBi92MylwZddKvFPBjrsZnGvvRmVvWRf8WJ0WkKUTtombDgRYNDgoW7GBUUrNNNgWhdB7kVjBA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@oxfmt/linux-x64-musl@0.26.0': - resolution: {integrity: sha512-Z3KuZFC+MIuAyFCXBHY71kCsdRq1ulbsbzTe71v+hrEv7zVBn6yzql+/AZcgfIaKzWO9OXNuz5WWLWDmVALwow==} + '@oxfmt/binding-linux-x64-musl@0.31.0': + resolution: {integrity: sha512-Vz7dZQd1yhE5wTWujGanPmZgDtzLZS1PQoeMmUj89p4eMTmpIkvWaIr3uquJCbh8dQd5cPZrFvMmdDgcY5z+GA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@oxfmt/win32-arm64@0.26.0': - resolution: {integrity: sha512-3zRbqwVWK1mDhRhTknlQFpRFL9GhEB5GfU6U7wawnuEwpvi39q91kJ+SRJvJnhyPCARkjZBd1V8XnweN5IFd1g==} + '@oxfmt/binding-openharmony-arm64@0.31.0': + resolution: {integrity: sha512-nm0gus6R5V9tM1XaELiiIduUzmdBuCefkwToWKL4UtuFoMCGkigVQnbzHwPTGLVWOEF6wTQucFA8Fn1U8hxxVw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxfmt/binding-win32-arm64-msvc@0.31.0': + resolution: {integrity: sha512-mMpvvPpoLD97Q2TMhjWDJSn+ib3kN+H+F4gq9p88zpeef6sqWc9djorJ3JXM2sOZMJ6KZ+1kSJfe0rkji74Pog==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxfmt/win32-x64@0.26.0': - resolution: {integrity: sha512-m8TfIljU22i9UEIkD+slGPifTFeaCwIUfxszN3E6ABWP1KQbtwSw9Ak0TdoikibvukF/dtbeyG3WW63jv9DnEg==} + '@oxfmt/binding-win32-ia32-msvc@0.31.0': + resolution: {integrity: sha512-zTngbPyrTDBYJFVQa4OJldM6w1Rqzi8c0/eFxAEbZRoj6x149GkyMkAY3kM+09ZhmszFitCML2S3p10NE2XmHA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxfmt/binding-win32-x64-msvc@0.31.0': + resolution: {integrity: sha512-TB30D+iRLe6eUbc/utOA93+FNz5C6vXSb/TEhwvlODhKYZZSSKn/lFpYzZC7bdhx3a8m4Jq8fEUoCJ6lKnzdpA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@oxlint-tsgolint/darwin-arm64@0.9.1': - resolution: {integrity: sha512-vk+8kChWqN+F+QUOvp4/6jDTlDCzXPgYGkxdi6EOUSOmCP1ix0uYOlIi/ytH2imXmC8YfPgLR/1BhqbsuDKuew==} + '@oxlint-tsgolint/darwin-arm64@0.11.5': + resolution: {integrity: sha512-mzsjJVIUgcGJovBXME63VW2Uau7MS/xCe7xdYj2BplSCuRb5Yoy7WuwCIlbD5ISHjnS6rx26oD2kmzHLRV5Wfw==} cpu: [arm64] os: [darwin] - '@oxlint-tsgolint/darwin-x64@0.9.1': - resolution: {integrity: sha512-yXmqr7El17+Oo56fWkPdUluU8d0jWxwRwAe1QZ0Xprxul9FHJeR/O2oYuBUngvCi02dbt0VZlwgJXcljQEdHlQ==} + '@oxlint-tsgolint/darwin-x64@0.11.5': + resolution: {integrity: sha512-zItUS0qLzSzVy0ZQHc4MOphA9lVeP5jffsgZFLCdo+JqmkbVZ14aDtiVUHSHi2hia+qatbb109CHQ9YIl0x7+A==} cpu: [x64] os: [darwin] - '@oxlint-tsgolint/linux-arm64@0.9.1': - resolution: {integrity: sha512-ukLb35BHSsxXaVEe8eIvYXMTxOdv8K4CySmtkWyc0pJT0q8zh85by1bsREWAP2hZc0wN0ClHjZHPdKY3958Jwg==} + '@oxlint-tsgolint/linux-arm64@0.11.5': + resolution: {integrity: sha512-R0r/3QTdMtIjfUOM1oxIaCV0s+j7xrnUe4CXo10ZbBzlXfMesWYNcf/oCrhsy87w0kCPFsg58nAdKaIR8xylFg==} cpu: [arm64] os: [linux] - '@oxlint-tsgolint/linux-x64@0.9.1': - resolution: {integrity: sha512-kkxSS/meANLun4dHep2wnfvo8OHJKgdxzuY3RoooSWorVqw3/K5Qttmo0OQFt7UNq/oisn0YTaNhV28S0nAWyQ==} + '@oxlint-tsgolint/linux-x64@0.11.5': + resolution: {integrity: sha512-g23J3T29EHWUQYC6aTwLnhwcFtjQh+VfxyGuFjYGGTLhESdlQH9E/pwsN8K9HaAiYWjI51m3r3BqQjXxEW8Jjg==} cpu: [x64] os: [linux] - '@oxlint-tsgolint/win32-arm64@0.9.1': - resolution: {integrity: sha512-F9tiZZRn3x+kjXJC8GAE5C5xkvD8b8unoFeh7mS5W4USAH8+AzYydzLev5rAW2uXdOqtkO30EJl0ygl68Zlb8w==} + '@oxlint-tsgolint/win32-arm64@0.11.5': + resolution: {integrity: sha512-MJNT/MPUIZKQCRtCX5s6pCnoe7If/i3RjJzFMe4kSLomRsHrNFYOJBwt4+w/Hqfyg9jNOgR8tbgdx6ofjHaPMQ==} cpu: [arm64] os: [win32] - '@oxlint-tsgolint/win32-x64@0.9.1': - resolution: {integrity: sha512-DKTBgKUbycKNYgpWpglEHzkgiNVSG1rZmfiqw7w31keAq8q7avNGhz2WNmsRvXh8IGNw1PMb7vgxwUK8eyXIeg==} + '@oxlint-tsgolint/win32-x64@0.11.5': + resolution: {integrity: sha512-IQmj4EkcZOBlLnj1CdxKFrWT7NAWXZ9ypZ874X/w7S5gRzB2sO4KmE6Z0MWxx05pL9AQF+CWVRjZrKVIYWTzPg==} cpu: [x64] os: [win32] - '@oxlint/darwin-arm64@1.33.0': - resolution: {integrity: sha512-PmEQDLHAxiAdyttQ1ZWXd+5VpHLbHf3FTMJL9bg5TZamDnhNiW/v0Pamv3MTAdymnoDI3H8IVLAN/SAseV/adw==} + '@oxlint/binding-android-arm-eabi@1.46.0': + resolution: {integrity: sha512-vLPcE+HcZ/W/0cVA1KLuAnoUSejGougDH/fDjBFf0Q+rbBIyBNLevOhgx3AnBNAt3hcIGY7U05ISbJCKZeVa3w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxlint/binding-android-arm64@1.46.0': + resolution: {integrity: sha512-b8IqCczUsirdtJ3R/be4cRm64I5pMPafMO/9xyTAZvc+R/FxZHMQuhw0iNT9hQwRn+Uo5rNAoA8QS7QurG2QeA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxlint/binding-darwin-arm64@1.46.0': + resolution: {integrity: sha512-CfC/KGnNMhI01dkfCMjquKnW4zby3kqD5o/9XA7+pgo9I4b+Nipm+JVFyZPWMNwKqLXNmi35GTLWjs9svPxlew==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxlint/darwin-x64@1.33.0': - resolution: {integrity: sha512-2R9aH3kR0X2M30z5agGikv3tfNTi8/uLhU5/tYktu33VGUXpbf0OLZSlD25UEuwOKAlf3RVtzV5oDyjoq93JuQ==} + '@oxlint/binding-darwin-x64@1.46.0': + resolution: {integrity: sha512-m38mKPsV3rBdWOJ4TAGZiUjWU8RGrBxsmdSeMQ0bPr/8O6CUOm/RJkPBf0GAfPms2WRVcbkfEXvIiPshAeFkeA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxlint/linux-arm64-gnu@1.33.0': - resolution: {integrity: sha512-yb/k8GaMDgnX2LyO6km33kKItZ/n573SlbiHBBFU2HmeU7tzEHL5jHkHQXXcysUkapmqHd7UsDhOZDqPmXaQRg==} + '@oxlint/binding-freebsd-x64@1.46.0': + resolution: {integrity: sha512-YaFRKslSAfuMwn7ejS1/wo9jENqQigpGBjjThX+mrpmEROLYGky+zIC5xSVGRng28U92VEDVbSNJ/sguz3dUAA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxlint/binding-linux-arm-gnueabihf@1.46.0': + resolution: {integrity: sha512-Nlw+5mSZQtkg1Oj0N8ulxzG8ATpmSDz5V2DNaGhaYAVlcdR8NYSm/xTOnweOXc/UOOv3LwkPPYzqcfPhu2lEkA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm-musleabihf@1.46.0': + resolution: {integrity: sha512-d3Y5y4ukMqAGnWLMKpwqj8ftNUaac7pA0NrId4AZ77JvHzezmxEcm2gswaBw2HW8y1pnq6KDB0vEPPvpTfDLrA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm64-gnu@1.46.0': + resolution: {integrity: sha512-jkjx+XSOPuFR+C458prQmehO+v0VK19/3Hj2mOYDF4hHUf3CzmtA4fTmQUtkITZiGHnky7Oao6JeJX24mrX7WQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@oxlint/linux-arm64-musl@1.33.0': - resolution: {integrity: sha512-03pt9IO1C4ZfVOW6SQiOK26mzklAhLM3Kc79OXpX1kgZRlxk+rvFoMhlgCOzn7tEdrEgbePkBoxNnwDnJDFqJQ==} + '@oxlint/binding-linux-arm64-musl@1.46.0': + resolution: {integrity: sha512-X/aPB1rpJUdykjWSeeGIbjk6qbD8VDulgLuTSMWgr/t6m1ljcAjqHb1g49pVG9bZl55zjECgzvlpPLWnfb4FMQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@oxlint/linux-x64-gnu@1.33.0': - resolution: {integrity: sha512-Z7ImLWM50FoVXzYvyxUQ+QwBkBfRyK4YdLEGonyAGMp7iT3DksonDaTK9ODnJ1qHyAyAZCvuqXD7AEDsDvzDbA==} + '@oxlint/binding-linux-ppc64-gnu@1.46.0': + resolution: {integrity: sha512-AymyOxGWwKY2KJa8b+h8iLrYJZbWKYCjqctSc2q6uIAkYPrCsxcWlge1JP6XZ14Sa80DVMwI/QvktbytSV+xVw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-riscv64-gnu@1.46.0': + resolution: {integrity: sha512-PkeVdPKCDA59rlMuucsel2LjlNEpslQN5AhkMMorIJZItbbqi/0JSuACCzaiIcXYv0oNfbeQ8rbOBikv+aT6cg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-riscv64-musl@1.46.0': + resolution: {integrity: sha512-snQaRLO/X+Ry/CxX1px1g8GUbmXzymdRs+/RkP2bySHWZFhFDtbLm2hA1ujX/jKlTLMJDZn4hYzFGLDwG/Rh2w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxlint/binding-linux-s390x-gnu@1.46.0': + resolution: {integrity: sha512-kZhDMwUe/sgDTluGao9c0Dqc1JzV6wPzfGo0l/FLQdh5Zmp39Yg1FbBsCgsJfVKmKl1fNqsHyFLTShWMOlOEhA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-x64-gnu@1.46.0': + resolution: {integrity: sha512-n5a7VtQTxHZ13cNAKQc3ziARv5bE1Fx868v/tnhZNVUjaRNYe5uiUrRJ/LZghdAzOxVuQGarjjq/q4QM2+9OPA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@oxlint/linux-x64-musl@1.33.0': - resolution: {integrity: sha512-idb55Uzu5kkqqpMiVUfI9nP7zOqPZinQKsIRQAIU40wILcf/ijvhNZKIu3ucDMmye0n6IWOaSnxIRL5W2fNoUQ==} + '@oxlint/binding-linux-x64-musl@1.46.0': + resolution: {integrity: sha512-KpsDU/BhdVn3iKCLxMXAOZIpO8fS0jEA5iluRoK1rhHPwKtpzEm/OCwERsu/vboMSZm66qnoTUVXRPJ8M+iKVQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@oxlint/win32-arm64@1.33.0': - resolution: {integrity: sha512-wKKFt7cubfrLelNzdmDsNSmtBrlSUe1fWus587+uSxDZdpFbQ7liU0gsUlCbcHvym0H1Tc2O3K3cnLrgQORLPQ==} + '@oxlint/binding-openharmony-arm64@1.46.0': + resolution: {integrity: sha512-jtbqUyEXlsDlRmMtTZqNbw49+1V/WxqNAR5l0S3OEkdat9diI5I+eqq9IT+jb5cSDdszTGcXpn7S3+gUYSydxQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxlint/binding-win32-arm64-msvc@1.46.0': + resolution: {integrity: sha512-EE8NjpqEZPwHQVigNvdyJ11dZwWIfsfn4VeBAuiJeAdrnY4HFX27mIjJINJgP5ZdBYEFV1OWH/eb9fURCYel8w==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxlint/win32-x64@1.33.0': - resolution: {integrity: sha512-ReyR8rNHjKNnO7dxGny9RCPELRAdhm3y780FNBcA07E1wvxSCkB+Mn5db0Pa5bRmxrsU/MTZ/aaBFa+ERXDdXw==} + '@oxlint/binding-win32-ia32-msvc@1.46.0': + resolution: {integrity: sha512-BHyk3H/HRdXs+uImGZ/2+qCET+B8lwGHOm7m54JiJEEUWf3zYCFX/Df1SPqtozWWmnBvioxoTG1J3mPRAr8KUA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxlint/binding-win32-x64-msvc@1.46.0': + resolution: {integrity: sha512-DJbQsSJUr4KSi9uU0QqOgI7PX2C+fKGZX+YDprt3vM2sC0dWZsgVTLoN2vtkNyEWJSY2mnvRFUshWXT3bmo0Ug==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] @@ -6842,21 +6998,21 @@ packages: oxc-resolver@11.15.0: resolution: {integrity: sha512-Hk2J8QMYwmIO9XTCUiOH00+Xk2/+aBxRUnhrSlANDyCnLYc32R1WSIq1sU2yEdlqd53FfMpPEpnBYIKQMzliJw==} - oxfmt@0.26.0: - resolution: {integrity: sha512-UDD1wFNwfeorMm2ZY0xy1KRAAvJ5NjKBfbDmiMwGP7baEHTq65cYpC0aPP+BGHc8weXUbSZaK8MdGyvuRUvS4Q==} + oxfmt@0.31.0: + resolution: {integrity: sha512-ukl7nojEuJUGbqR4ijC0Z/7a6BYpD4RxLS2UsyJKgbeZfx6TNrsa48veG0z2yQbhTx1nVnes4GIcqMn7n2jFtw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - oxlint-tsgolint@0.9.1: - resolution: {integrity: sha512-w1lIvUDkkiAPFyo268SFGrdh1LQ3Lcs1XShES7I4X75TliQA0os5XJ5hNZ4lYsSevqcofgEtq4xq7rBumv69iQ==} + oxlint-tsgolint@0.11.5: + resolution: {integrity: sha512-4uVv43EhkeMvlxDU1GUsR5P5c0q74rB/pQRhjGsTOnMIrDbg3TABTntRyeAkmXItqVEJTcDRv9+Yk+LFXkHKlg==} hasBin: true - oxlint@1.33.0: - resolution: {integrity: sha512-4WCL0K8jiOshwJ8WrVk35VAuVaZHC0iX6asjKsrENOrynkAAGcTLLx0Urf0eXZ1Tq7r+qAe3Z9EyHMFPzVyUkg==} + oxlint@1.46.0: + resolution: {integrity: sha512-I9h42QDtAVsRwoueJ4PL/7qN5jFzIUXvbO4Z5ddtII92ZCiD7uiS/JW2V4viBSfGLsbZkQp3YEs6Ls4I8q+8tA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: - oxlint-tsgolint: '>=0.9.0' + oxlint-tsgolint: '>=0.11.2' peerDependenciesMeta: oxlint-tsgolint: optional: true @@ -7447,6 +7603,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.7.4: + resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==} + engines: {node: '>=10'} + hasBin: true + set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -7757,8 +7918,8 @@ packages: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} - tinypool@2.0.0: - resolution: {integrity: sha512-/RX9RzeH2xU5ADE7n2Ykvmi9ED3FBGPAjw9u3zucrNNaEBIO0HPSYgL0NT7+3p147ojeSdaVu08F6hjpv31HJg==} + tinypool@2.1.0: + resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} engines: {node: ^20.0.0 || >=22.0.0} tinyrainbow@2.0.0: @@ -10726,70 +10887,136 @@ snapshots: '@oxc-resolver/binding-win32-x64-msvc@11.15.0': optional: true - '@oxfmt/darwin-arm64@0.26.0': + '@oxfmt/binding-android-arm-eabi@0.31.0': + optional: true + + '@oxfmt/binding-android-arm64@0.31.0': + optional: true + + '@oxfmt/binding-darwin-arm64@0.31.0': + optional: true + + '@oxfmt/binding-darwin-x64@0.31.0': + optional: true + + '@oxfmt/binding-freebsd-x64@0.31.0': optional: true - '@oxfmt/darwin-x64@0.26.0': + '@oxfmt/binding-linux-arm-gnueabihf@0.31.0': optional: true - '@oxfmt/linux-arm64-gnu@0.26.0': + '@oxfmt/binding-linux-arm-musleabihf@0.31.0': optional: true - '@oxfmt/linux-arm64-musl@0.26.0': + '@oxfmt/binding-linux-arm64-gnu@0.31.0': optional: true - '@oxfmt/linux-x64-gnu@0.26.0': + '@oxfmt/binding-linux-arm64-musl@0.31.0': optional: true - '@oxfmt/linux-x64-musl@0.26.0': + '@oxfmt/binding-linux-ppc64-gnu@0.31.0': optional: true - '@oxfmt/win32-arm64@0.26.0': + '@oxfmt/binding-linux-riscv64-gnu@0.31.0': optional: true - '@oxfmt/win32-x64@0.26.0': + '@oxfmt/binding-linux-riscv64-musl@0.31.0': optional: true - '@oxlint-tsgolint/darwin-arm64@0.9.1': + '@oxfmt/binding-linux-s390x-gnu@0.31.0': optional: true - '@oxlint-tsgolint/darwin-x64@0.9.1': + '@oxfmt/binding-linux-x64-gnu@0.31.0': optional: true - '@oxlint-tsgolint/linux-arm64@0.9.1': + '@oxfmt/binding-linux-x64-musl@0.31.0': optional: true - '@oxlint-tsgolint/linux-x64@0.9.1': + '@oxfmt/binding-openharmony-arm64@0.31.0': optional: true - '@oxlint-tsgolint/win32-arm64@0.9.1': + '@oxfmt/binding-win32-arm64-msvc@0.31.0': optional: true - '@oxlint-tsgolint/win32-x64@0.9.1': + '@oxfmt/binding-win32-ia32-msvc@0.31.0': optional: true - '@oxlint/darwin-arm64@1.33.0': + '@oxfmt/binding-win32-x64-msvc@0.31.0': optional: true - '@oxlint/darwin-x64@1.33.0': + '@oxlint-tsgolint/darwin-arm64@0.11.5': optional: true - '@oxlint/linux-arm64-gnu@1.33.0': + '@oxlint-tsgolint/darwin-x64@0.11.5': optional: true - '@oxlint/linux-arm64-musl@1.33.0': + '@oxlint-tsgolint/linux-arm64@0.11.5': optional: true - '@oxlint/linux-x64-gnu@1.33.0': + '@oxlint-tsgolint/linux-x64@0.11.5': optional: true - '@oxlint/linux-x64-musl@1.33.0': + '@oxlint-tsgolint/win32-arm64@0.11.5': optional: true - '@oxlint/win32-arm64@1.33.0': + '@oxlint-tsgolint/win32-x64@0.11.5': optional: true - '@oxlint/win32-x64@1.33.0': + '@oxlint/binding-android-arm-eabi@1.46.0': + optional: true + + '@oxlint/binding-android-arm64@1.46.0': + optional: true + + '@oxlint/binding-darwin-arm64@1.46.0': + optional: true + + '@oxlint/binding-darwin-x64@1.46.0': + optional: true + + '@oxlint/binding-freebsd-x64@1.46.0': + optional: true + + '@oxlint/binding-linux-arm-gnueabihf@1.46.0': + optional: true + + '@oxlint/binding-linux-arm-musleabihf@1.46.0': + optional: true + + '@oxlint/binding-linux-arm64-gnu@1.46.0': + optional: true + + '@oxlint/binding-linux-arm64-musl@1.46.0': + optional: true + + '@oxlint/binding-linux-ppc64-gnu@1.46.0': + optional: true + + '@oxlint/binding-linux-riscv64-gnu@1.46.0': + optional: true + + '@oxlint/binding-linux-riscv64-musl@1.46.0': + optional: true + + '@oxlint/binding-linux-s390x-gnu@1.46.0': + optional: true + + '@oxlint/binding-linux-x64-gnu@1.46.0': + optional: true + + '@oxlint/binding-linux-x64-musl@1.46.0': + optional: true + + '@oxlint/binding-openharmony-arm64@1.46.0': + optional: true + + '@oxlint/binding-win32-arm64-msvc@1.46.0': + optional: true + + '@oxlint/binding-win32-ia32-msvc@1.46.0': + optional: true + + '@oxlint/binding-win32-x64-msvc@1.46.0': optional: true '@phenomnomnominal/tsquery@5.0.1(typescript@5.9.3)': @@ -14489,7 +14716,7 @@ snapshots: acorn: 8.15.0 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - semver: 7.7.3 + semver: 7.7.4 jsonc-parser@3.2.0: {} @@ -15512,39 +15739,61 @@ snapshots: '@oxc-resolver/binding-win32-ia32-msvc': 11.15.0 '@oxc-resolver/binding-win32-x64-msvc': 11.15.0 - oxfmt@0.26.0: + oxfmt@0.31.0: dependencies: - tinypool: 2.0.0 + tinypool: 2.1.0 optionalDependencies: - '@oxfmt/darwin-arm64': 0.26.0 - '@oxfmt/darwin-x64': 0.26.0 - '@oxfmt/linux-arm64-gnu': 0.26.0 - '@oxfmt/linux-arm64-musl': 0.26.0 - '@oxfmt/linux-x64-gnu': 0.26.0 - '@oxfmt/linux-x64-musl': 0.26.0 - '@oxfmt/win32-arm64': 0.26.0 - '@oxfmt/win32-x64': 0.26.0 - - oxlint-tsgolint@0.9.1: + '@oxfmt/binding-android-arm-eabi': 0.31.0 + '@oxfmt/binding-android-arm64': 0.31.0 + '@oxfmt/binding-darwin-arm64': 0.31.0 + '@oxfmt/binding-darwin-x64': 0.31.0 + '@oxfmt/binding-freebsd-x64': 0.31.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.31.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.31.0 + '@oxfmt/binding-linux-arm64-gnu': 0.31.0 + '@oxfmt/binding-linux-arm64-musl': 0.31.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.31.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.31.0 + '@oxfmt/binding-linux-riscv64-musl': 0.31.0 + '@oxfmt/binding-linux-s390x-gnu': 0.31.0 + '@oxfmt/binding-linux-x64-gnu': 0.31.0 + '@oxfmt/binding-linux-x64-musl': 0.31.0 + '@oxfmt/binding-openharmony-arm64': 0.31.0 + '@oxfmt/binding-win32-arm64-msvc': 0.31.0 + '@oxfmt/binding-win32-ia32-msvc': 0.31.0 + '@oxfmt/binding-win32-x64-msvc': 0.31.0 + + oxlint-tsgolint@0.11.5: optionalDependencies: - '@oxlint-tsgolint/darwin-arm64': 0.9.1 - '@oxlint-tsgolint/darwin-x64': 0.9.1 - '@oxlint-tsgolint/linux-arm64': 0.9.1 - '@oxlint-tsgolint/linux-x64': 0.9.1 - '@oxlint-tsgolint/win32-arm64': 0.9.1 - '@oxlint-tsgolint/win32-x64': 0.9.1 - - oxlint@1.33.0(oxlint-tsgolint@0.9.1): + '@oxlint-tsgolint/darwin-arm64': 0.11.5 + '@oxlint-tsgolint/darwin-x64': 0.11.5 + '@oxlint-tsgolint/linux-arm64': 0.11.5 + '@oxlint-tsgolint/linux-x64': 0.11.5 + '@oxlint-tsgolint/win32-arm64': 0.11.5 + '@oxlint-tsgolint/win32-x64': 0.11.5 + + oxlint@1.46.0(oxlint-tsgolint@0.11.5): optionalDependencies: - '@oxlint/darwin-arm64': 1.33.0 - '@oxlint/darwin-x64': 1.33.0 - '@oxlint/linux-arm64-gnu': 1.33.0 - '@oxlint/linux-arm64-musl': 1.33.0 - '@oxlint/linux-x64-gnu': 1.33.0 - '@oxlint/linux-x64-musl': 1.33.0 - '@oxlint/win32-arm64': 1.33.0 - '@oxlint/win32-x64': 1.33.0 - oxlint-tsgolint: 0.9.1 + '@oxlint/binding-android-arm-eabi': 1.46.0 + '@oxlint/binding-android-arm64': 1.46.0 + '@oxlint/binding-darwin-arm64': 1.46.0 + '@oxlint/binding-darwin-x64': 1.46.0 + '@oxlint/binding-freebsd-x64': 1.46.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.46.0 + '@oxlint/binding-linux-arm-musleabihf': 1.46.0 + '@oxlint/binding-linux-arm64-gnu': 1.46.0 + '@oxlint/binding-linux-arm64-musl': 1.46.0 + '@oxlint/binding-linux-ppc64-gnu': 1.46.0 + '@oxlint/binding-linux-riscv64-gnu': 1.46.0 + '@oxlint/binding-linux-riscv64-musl': 1.46.0 + '@oxlint/binding-linux-s390x-gnu': 1.46.0 + '@oxlint/binding-linux-x64-gnu': 1.46.0 + '@oxlint/binding-linux-x64-musl': 1.46.0 + '@oxlint/binding-openharmony-arm64': 1.46.0 + '@oxlint/binding-win32-arm64-msvc': 1.46.0 + '@oxlint/binding-win32-ia32-msvc': 1.46.0 + '@oxlint/binding-win32-x64-msvc': 1.46.0 + oxlint-tsgolint: 0.11.5 p-limit@3.1.0: dependencies: @@ -16282,6 +16531,8 @@ snapshots: semver@7.7.3: {} + semver@7.7.4: {} + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -16682,7 +16933,7 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 - tinypool@2.0.0: {} + tinypool@2.1.0: {} tinyrainbow@2.0.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 265e95b32ca..1b8a3c6ec3c 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -69,9 +69,9 @@ catalog: markdown-table: ^3.0.4 mixpanel-browser: ^2.71.0 nx: 22.2.6 - oxfmt: ^0.26.0 - oxlint: ^1.33.0 - oxlint-tsgolint: ^0.9.1 + oxfmt: ^0.31.0 + oxlint: ^1.46.0 + oxlint-tsgolint: ^0.11.5 picocolors: ^1.1.1 pinia: ^3.0.4 postcss-html: ^1.8.0 diff --git a/scripts/cicd/check-json.sh b/scripts/cicd/check-json.sh index 89e6a5c8f11..3a9c4bb5f05 100755 --- a/scripts/cicd/check-json.sh +++ b/scripts/cicd/check-json.sh @@ -33,6 +33,7 @@ fi EXCLUDE_PATTERNS=( '**/tsconfig*.json' + '.oxlintrc.json' ) if [ -n "${JSON_LINT_EXCLUDES:-}" ]; then diff --git a/src/App.vue b/src/App.vue index f9e34fc683e..5eec915246a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -16,12 +16,12 @@ import { computed, onMounted } from 'vue' import GlobalDialog from '@/components/dialog/GlobalDialog.vue' import config from '@/config' +import { app } from '@/scripts/app' import { useWorkspaceStore } from '@/stores/workspaceStore' import { useConflictDetection } from '@/workbench/extensions/manager/composables/useConflictDetection' import { electronAPI } from '@/utils/envUtil' import { isDesktop } from '@/platform/distribution/types' -import { app } from '@/scripts/app' const workspaceStore = useWorkspaceStore() app.extensionManager = useWorkspaceStore() diff --git a/src/base/common/downloadUtil.test.ts b/src/base/common/downloadUtil.test.ts index 7ab107f39df..36a0b913340 100644 --- a/src/base/common/downloadUtil.test.ts +++ b/src/base/common/downloadUtil.test.ts @@ -49,7 +49,7 @@ describe('downloadUtil', () => { vi.unstubAllGlobals() }) - describe('downloadFile', () => { + describe(downloadFile, () => { it('should create and trigger download with basic URL', () => { const testUrl = 'https://example.com/image.png' @@ -285,7 +285,7 @@ describe('downloadUtil', () => { }) }) - describe('extractFilenameFromContentDisposition', () => { + describe(extractFilenameFromContentDisposition, () => { it('returns null for null header', () => { expect(extractFilenameFromContentDisposition(null)).toBeNull() }) diff --git a/src/components/LiteGraphCanvasSplitterOverlay.vue b/src/components/LiteGraphCanvasSplitterOverlay.vue index 4a7695d1847..1a00c5a391e 100644 --- a/src/components/LiteGraphCanvasSplitterOverlay.vue +++ b/src/components/LiteGraphCanvasSplitterOverlay.vue @@ -172,19 +172,17 @@ const splitterRefreshKey = computed(() => { return `main-splitter${rightSidePanelVisible.value ? '-with-right-panel' : ''}-${sidebarLocation.value}` }) -const firstPanelStyle = computed(() => { - if (sidebarLocation.value === 'left') { - return { display: sidebarPanelVisible.value ? 'flex' : 'none' } - } - return undefined -}) +const firstPanelStyle = computed(() => + sidebarLocation.value === 'left' + ? { display: sidebarPanelVisible.value ? 'flex' : 'none' } + : undefined +) -const lastPanelStyle = computed(() => { - if (sidebarLocation.value === 'right') { - return { display: sidebarPanelVisible.value ? 'flex' : 'none' } - } - return undefined -}) +const lastPanelStyle = computed(() => + sidebarLocation.value === 'right' + ? { display: sidebarPanelVisible.value ? 'flex' : 'none' } + : undefined +)