diff --git a/.github/workflows/release-version-bump.yaml b/.github/workflows/release-version-bump.yaml index 30254c6aa..5f3152285 100644 --- a/.github/workflows/release-version-bump.yaml +++ b/.github/workflows/release-version-bump.yaml @@ -59,6 +59,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: lts/* + cache: 'pnpm' - name: Bump version id: bump-version diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 000000000..ee29da38b --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,43 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "ignorePatterns": [ + ".i18nrc.cjs", + "components.d.ts", + "lint-staged.config.js", + "vitest.setup.ts", + "**/vite.config.*.timestamp*", + "**/vitest.config.*.timestamp*", + "packages/registry-types/src/comfyRegistryTypes.ts", + "src/extensions/core/*", + "src/scripts/*", + "src/types/generatedManagerTypes.ts", + "src/types/vue-shim.d.ts" + ], + "rules": { + "no-async-promise-executor": "off", + "no-control-regex": "off", + "no-eval": "off", + "no-self-assign": "allow", + "no-unused-expressions": "off", + "no-unused-private-class-members": "off", + "no-useless-rename": "off", + "typescript/no-this-alias": "off", + "typescript/no-unnecessary-parameter-property-assignment": "off", + "typescript/no-unsafe-declaration-merging": "off", + "typescript/no-unused-vars": "off", + "unicorn/no-empty-file": "off", + "unicorn/no-new-array": "off", + "unicorn/no-single-promise-in-promise-methods": "off", + "unicorn/no-useless-fallback-in-spread": "off", + "unicorn/no-useless-spread": "off", + "typescript/await-thenable": "off", + "typescript/no-base-to-string": "off", + "typescript/no-duplicate-type-constituents": "off", + "typescript/no-for-in-array": "off", + "typescript/no-meaningless-void-operator": "off", + "typescript/no-redundant-type-constituents": "off", + "typescript/restrict-template-expressions": "off", + "typescript/unbound-method": "off", + "typescript/no-floating-promises": "error" + } +} \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md index 4866c2dce..7a456b1fa 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,6 +17,7 @@ This bootstraps the monorepo with dependencies, builds, tests, and dev server ve - `pnpm typecheck`: Type checking - `pnpm build`: Build for production (via nx) - `pnpm lint`: Linting (via nx) +- `pnpm oxlint`: Fast Rust-based linting with Oxc - `pnpm format`: Prettier formatting - `pnpm test:unit`: Run all unit tests - `pnpm test:browser`: Run E2E tests via Playwright diff --git a/apps/desktop-ui/tsconfig.json b/apps/desktop-ui/tsconfig.json index 026fca248..81665ab5c 100644 --- a/apps/desktop-ui/tsconfig.json +++ b/apps/desktop-ui/tsconfig.json @@ -3,9 +3,8 @@ "compilerOptions": { "noEmit": true, "allowImportingTsExtensions": true, - "baseUrl": ".", "paths": { - "@/*": ["src/*"], + "@/*": ["./src/*"], "@frontend-locales/*": ["../../src/locales/*"] } }, diff --git a/eslint.config.ts b/eslint.config.ts index 84fda7979..a2dd753cc 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -3,6 +3,7 @@ import pluginJs from '@eslint/js' import pluginI18n from '@intlify/eslint-plugin-vue-i18n' import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript' import { importX } from 'eslint-plugin-import-x' +import oxlint from 'eslint-plugin-oxlint' import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' import storybook from 'eslint-plugin-storybook' import unusedImports from 'eslint-plugin-unused-imports' @@ -105,19 +106,23 @@ export default defineConfig([ // @ts-ignore Bad types in the plugin pluginVue.configs['flat/recommended'], eslintPluginPrettierRecommended, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore Type incompatibility between import-x plugin and ESLint config types storybook.configs['flat/recommended'], - // @ts-expect-error Bad types in the plugin + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore Type incompatibility between import-x plugin and ESLint config types importX.flatConfigs.recommended, - // @ts-expect-error Bad types in the plugin + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore Type incompatibility between import-x plugin and ESLint config types importX.flatConfigs.typescript, { plugins: { 'unused-imports': unusedImports, - // @ts-expect-error Bad types in the plugin + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore Type incompatibility in i18n plugin '@intlify/vue-i18n': pluginI18n }, rules: { - '@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/prefer-as-const': 'off', @@ -270,5 +275,7 @@ export default defineConfig([ '@typescript-eslint/no-floating-promises': 'off', 'no-console': 'off' } - } + }, + // Turn off ESLint rules that are already handled by oxlint + ...oxlint.buildFromOxlintConfigFile('./.oxlintrc.json') ]) diff --git a/package.json b/package.json index 9cd6d2fee..e1b43debf 100644 --- a/package.json +++ b/package.json @@ -28,13 +28,14 @@ "json-schema": "tsx scripts/generate-json-schema.ts", "knip:no-cache": "knip", "knip": "knip --cache", - "lint:fix:no-cache": "eslint src --fix", - "lint:fix": "eslint src --cache --fix", - "lint:no-cache": "eslint src", + "lint:fix:no-cache": "oxlint src --type-aware --fix && eslint src --fix", + "lint:fix": "oxlint src --type-aware --fix && eslint src --cache --fix", + "lint:no-cache": "oxlint src --type-aware && eslint src", "lint:unstaged:fix": "git diff --name-only HEAD | grep -E '\\.(js|ts|vue|mts)$' | xargs -r eslint --cache --fix", "lint:unstaged": "git diff --name-only HEAD | grep -E '\\.(js|ts|vue|mts)$' | xargs -r eslint --cache", - "lint": "eslint src --cache", + "lint": "oxlint src --type-aware && eslint src --cache", "locale": "lobe-i18n locale", + "oxlint": "oxlint src --type-aware", "preinstall": "pnpm dlx only-allow pnpm", "prepare": "husky || true && git config blame.ignoreRevsFile .git-blame-ignore-revs || true", "preview": "nx preview", @@ -78,6 +79,7 @@ "eslint-config-prettier": "catalog:", "eslint-import-resolver-typescript": "catalog:", "eslint-plugin-import-x": "catalog:", + "eslint-plugin-oxlint": "catalog:", "eslint-plugin-prettier": "catalog:", "eslint-plugin-storybook": "catalog:", "eslint-plugin-unused-imports": "catalog:", @@ -93,6 +95,8 @@ "markdown-table": "catalog:", "mixpanel-browser": "catalog:", "nx": "catalog:", + "oxlint": "catalog:", + "oxlint-tsgolint": "catalog:", "picocolors": "catalog:", "postcss-html": "catalog:", "prettier": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9fde29d3e..1fc27afcd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,9 +12,15 @@ catalogs: '@eslint/js': specifier: ^9.35.0 version: 9.35.0 + '@iconify-json/lucide': + specifier: ^1.1.178 + version: 1.2.66 '@iconify/json': specifier: ^2.2.380 version: 2.2.380 + '@iconify/tailwind': + specifier: ^1.1.3 + version: 1.2.0 '@intlify/eslint-plugin-vue-i18n': specifier: ^4.1.0 version: 4.1.0 @@ -141,6 +147,9 @@ catalogs: eslint-plugin-import-x: specifier: ^4.16.1 version: 4.16.1 + eslint-plugin-oxlint: + specifier: 1.25.0 + version: 1.25.0 eslint-plugin-prettier: specifier: ^5.5.4 version: 5.5.4 @@ -186,6 +195,12 @@ catalogs: nx: specifier: 21.4.1 version: 21.4.1 + oxlint: + specifier: ^1.25.0 + version: 1.28.0 + oxlint-tsgolint: + specifier: ^0.4.0 + version: 0.4.0 picocolors: specifier: ^1.1.1 version: 1.1.1 @@ -555,6 +570,9 @@ importers: eslint-plugin-import-x: specifier: 'catalog:' version: 4.16.1(@typescript-eslint/utils@8.44.0(eslint@9.35.0(jiti@2.4.2))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint@9.35.0(jiti@2.4.2)) + eslint-plugin-oxlint: + specifier: 'catalog:' + version: 1.25.0 eslint-plugin-prettier: specifier: 'catalog:' version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.35.0(jiti@2.4.2)))(eslint@9.35.0(jiti@2.4.2))(prettier@3.6.2) @@ -600,6 +618,12 @@ importers: nx: specifier: 'catalog:' version: 21.4.1 + oxlint: + specifier: 'catalog:' + version: 1.28.0(oxlint-tsgolint@0.4.0) + oxlint-tsgolint: + specifier: 'catalog:' + version: 0.4.0 picocolors: specifier: 'catalog:' version: 1.1.1 @@ -2529,6 +2553,76 @@ packages: cpu: [x64] os: [win32] + '@oxlint-tsgolint/darwin-arm64@0.4.0': + resolution: {integrity: sha512-2jNvhxs6JJy93Z4SQ/VErODBzZtFKxQ+sybcKYcw5/K41tXOiBbJSwBMZ2PPvivCVkVcyOkJvfs5UXWW7o79uw==} + cpu: [arm64] + os: [darwin] + + '@oxlint-tsgolint/darwin-x64@0.4.0': + resolution: {integrity: sha512-6A+YBecdZhk2NJ8Dh3kRkR6htNekDmAopFkdyrtNvsHJs5qNNuwUv5RZlVMYiaQTh/Y/tZ0YWE4+cVdqPIEyxQ==} + cpu: [x64] + os: [darwin] + + '@oxlint-tsgolint/linux-arm64@0.4.0': + resolution: {integrity: sha512-JaX8JfQnY3UwX7l6BXIjhEaJAVeKVASELLFCdoo5+DOHgPuiiSKcxCVgTl92WPAuS0TYFXOgqOg31WXkvdi8bQ==} + cpu: [arm64] + os: [linux] + + '@oxlint-tsgolint/linux-x64@0.4.0': + resolution: {integrity: sha512-iu106lxV1O64O4vK2eRoIuY2iHuil/hyDNKLRNVaTg1un+yoxN6/C5uxrJix/EJ+1O27P9c+sXmMplcmbXujtg==} + cpu: [x64] + os: [linux] + + '@oxlint-tsgolint/win32-arm64@0.4.0': + resolution: {integrity: sha512-KTp9EzkTCGAh4/sL3l5a9otX63TvTs5riBcrcqu0jYS3P762rZSezzMMDc0Ld51x+I37125p9+bue2vmlH/KbQ==} + cpu: [arm64] + os: [win32] + + '@oxlint-tsgolint/win32-x64@0.4.0': + resolution: {integrity: sha512-ioyBLHx0HA+hn5of8mhnA8W8DWQyJEHc7SBvwku0EW9bWt7zvBtWRJfx1YilvM+KVBdLVX731qeofdJT1fbJiQ==} + cpu: [x64] + os: [win32] + + '@oxlint/darwin-arm64@1.28.0': + resolution: {integrity: sha512-H7J41/iKbgm7tTpdSnA/AtjEAhxyzNzCMKWtKU5wDuP2v39jrc3fasQEJruk6hj1YXPbJY4N+1nK/jE27GMGDQ==} + cpu: [arm64] + os: [darwin] + + '@oxlint/darwin-x64@1.28.0': + resolution: {integrity: sha512-bGsSDEwpyYzNc6FIwhTmbhSK7piREUjMlmWBt7eoR3ract0+RfhZYYG4se1Ngs+4WOFC0B3gbv23fyF+cnbGGQ==} + cpu: [x64] + os: [darwin] + + '@oxlint/linux-arm64-gnu@1.28.0': + resolution: {integrity: sha512-eNH/evMpV3xAA4jIS8dMLcGkM/LK0WEHM0RO9bxrHPAwfS72jhyPJtd0R7nZhvhG6U1bhn5jhoXbk1dn27XIAQ==} + cpu: [arm64] + os: [linux] + + '@oxlint/linux-arm64-musl@1.28.0': + resolution: {integrity: sha512-ickvpcekNeRLND3llndiZOtJBb6LDZqNnZICIDkovURkOIWPGJGmAxsHUOI6yW6iny9gLmIEIGl/c1b5nFk6Ag==} + cpu: [arm64] + os: [linux] + + '@oxlint/linux-x64-gnu@1.28.0': + resolution: {integrity: sha512-DkgAh4LQ8NR3DwTT7/LGMhaMau0RtZkih91Ez5Usk7H7SOxo1GDi84beE7it2Q+22cAzgY4hbw3c6svonQTjxg==} + cpu: [x64] + os: [linux] + + '@oxlint/linux-x64-musl@1.28.0': + resolution: {integrity: sha512-VBnMi3AJ2w5p/kgeyrjcGOKNY8RzZWWvlGHjCJwzqPgob4MXu6T+5Yrdi7EVJyIlouL8E3LYPYjmzB9NBi9gZw==} + cpu: [x64] + os: [linux] + + '@oxlint/win32-arm64@1.28.0': + resolution: {integrity: sha512-tomhIks+4dKs8axB+s4GXHy+ZWXhUgptf1XnG5cZg8CzRfX4JFX9k8l2fPUgFwytWnyyvZaaXLRPWGzoZ6yoHQ==} + cpu: [arm64] + os: [win32] + + '@oxlint/win32-x64@1.28.0': + resolution: {integrity: sha512-4+VO5P/UJ2nq9sj6kQToJxFy5cKs7dGIN2DiUSQ7cqyUi7EKYNQKe+98HFcDOjtm33jQOQnc4kw8Igya5KPozg==} + cpu: [x64] + os: [win32] + '@phenomnomnominal/tsquery@5.0.1': resolution: {integrity: sha512-3nVv+e2FQwsW8Aw6qTU6f+1rfcJ3hrcnvH/mu9i8YhxO+9sqbOfpL8m6PbET5+xKOlz/VSbp0RoYWYCtIsnmuA==} peerDependencies: @@ -4732,6 +4826,9 @@ packages: '@typescript-eslint/parser': optional: true + eslint-plugin-oxlint@1.25.0: + resolution: {integrity: sha512-grS4KdR9FAxoQC+wMkepeQHL4osMhoYfUI11Pot6Gitqr4wWi+JZrX0Shr8Bs9fjdWhEjtaZIV6cr4mbfytmyw==} + eslint-plugin-prettier@5.5.4: resolution: {integrity: sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==} engines: {node: ^14.18.0 || >=16.0.0} @@ -5692,6 +5789,9 @@ packages: jsonc-parser@3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + jsondiffpatch@0.6.0: resolution: {integrity: sha512-3QItJOXp2AP1uv7waBkao5nCvhEv+QmJAd38Ybq7wNI74Q+BBmnLn4EDKz6yI9xGAIQoUF87qHt+kc1IVxB4zQ==} engines: {node: ^18.0.0 || >=20.0.0} @@ -6386,6 +6486,20 @@ packages: oxc-resolver@11.6.1: resolution: {integrity: sha512-WQgmxevT4cM5MZ9ioQnEwJiHpPzbvntV5nInGAKo9NQZzegcOonHvcVcnkYqld7bTG35UFHEKeF7VwwsmA3cZg==} + oxlint-tsgolint@0.4.0: + resolution: {integrity: sha512-RpvLxPvSt0Xzr3frTiw5rP6HUW0djZ2uNdzHc8Pv556sbTnFWXmLdK8FRqqy7vVXZTkoVSdY3PsvOsVAqGjc+Q==} + hasBin: true + + oxlint@1.28.0: + resolution: {integrity: sha512-gE97d0BcIlTTSJrim395B49mIbQ9VO8ZVoHdWai7Svl+lEeUAyCLTN4d7piw1kcB8VfgTp1JFVlAvMPD9GewMA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + oxlint-tsgolint: '>=0.4.0' + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} @@ -7698,8 +7812,8 @@ packages: vue-component-type-helpers@3.1.1: resolution: {integrity: sha512-B0kHv7qX6E7+kdc5nsaqjdGZ1KwNKSUQDWGy7XkTYT7wFsOpkEyaJ1Vq79TjwrrtuLRgizrTV7PPuC4rRQo+vw==} - vue-component-type-helpers@3.1.2: - resolution: {integrity: sha512-ch3/SKBtxdZq18vsEntiGCdSszCRNfhX5QaTxjSacCAXLlNQRXfXo+ANjoQEYJMsJOJy1/vHF6Tkc4s85MS+zw==} + vue-component-type-helpers@3.1.3: + resolution: {integrity: sha512-V1dOD8XYfstOKCnXbWyEJIrhTBMwSyNjv271L1Jlx9ExpNlCSuqOs3OdWrGJ0V544zXufKbcYabi/o+gK8lyfQ==} vue-demi@0.14.10: resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==} @@ -10092,6 +10206,48 @@ snapshots: '@oxc-resolver/binding-win32-x64-msvc@11.6.1': optional: true + '@oxlint-tsgolint/darwin-arm64@0.4.0': + optional: true + + '@oxlint-tsgolint/darwin-x64@0.4.0': + optional: true + + '@oxlint-tsgolint/linux-arm64@0.4.0': + optional: true + + '@oxlint-tsgolint/linux-x64@0.4.0': + optional: true + + '@oxlint-tsgolint/win32-arm64@0.4.0': + optional: true + + '@oxlint-tsgolint/win32-x64@0.4.0': + optional: true + + '@oxlint/darwin-arm64@1.28.0': + optional: true + + '@oxlint/darwin-x64@1.28.0': + optional: true + + '@oxlint/linux-arm64-gnu@1.28.0': + optional: true + + '@oxlint/linux-arm64-musl@1.28.0': + optional: true + + '@oxlint/linux-x64-gnu@1.28.0': + optional: true + + '@oxlint/linux-x64-musl@1.28.0': + optional: true + + '@oxlint/win32-arm64@1.28.0': + optional: true + + '@oxlint/win32-x64@1.28.0': + optional: true + '@phenomnomnominal/tsquery@5.0.1(typescript@5.9.2)': dependencies: esquery: 1.6.0 @@ -10458,7 +10614,7 @@ snapshots: storybook: 9.1.6(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@5.4.19(@types/node@20.14.10)(lightningcss@1.30.1)(terser@5.39.2)) type-fest: 2.19.0 vue: 3.5.13(typescript@5.9.2) - vue-component-type-helpers: 3.1.2 + vue-component-type-helpers: 3.1.3 '@swc/helpers@0.5.17': dependencies: @@ -12516,6 +12672,10 @@ snapshots: - supports-color optional: true + eslint-plugin-oxlint@1.25.0: + dependencies: + jsonc-parser: 3.3.1 + eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.35.0(jiti@2.4.2)))(eslint@9.35.0(jiti@2.4.2))(prettier@3.6.2): dependencies: eslint: 9.35.0(jiti@2.4.2) @@ -13581,6 +13741,8 @@ snapshots: jsonc-parser@3.2.0: {} + jsonc-parser@3.3.1: {} + jsondiffpatch@0.6.0: dependencies: '@types/diff-match-patch': 1.0.36 @@ -14548,6 +14710,27 @@ snapshots: '@oxc-resolver/binding-win32-ia32-msvc': 11.6.1 '@oxc-resolver/binding-win32-x64-msvc': 11.6.1 + oxlint-tsgolint@0.4.0: + optionalDependencies: + '@oxlint-tsgolint/darwin-arm64': 0.4.0 + '@oxlint-tsgolint/darwin-x64': 0.4.0 + '@oxlint-tsgolint/linux-arm64': 0.4.0 + '@oxlint-tsgolint/linux-x64': 0.4.0 + '@oxlint-tsgolint/win32-arm64': 0.4.0 + '@oxlint-tsgolint/win32-x64': 0.4.0 + + oxlint@1.28.0(oxlint-tsgolint@0.4.0): + optionalDependencies: + '@oxlint/darwin-arm64': 1.28.0 + '@oxlint/darwin-x64': 1.28.0 + '@oxlint/linux-arm64-gnu': 1.28.0 + '@oxlint/linux-arm64-musl': 1.28.0 + '@oxlint/linux-x64-gnu': 1.28.0 + '@oxlint/linux-x64-musl': 1.28.0 + '@oxlint/win32-arm64': 1.28.0 + '@oxlint/win32-x64': 1.28.0 + oxlint-tsgolint: 0.4.0 + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 @@ -16157,7 +16340,7 @@ snapshots: vue-component-type-helpers@3.1.1: {} - vue-component-type-helpers@3.1.2: {} + vue-component-type-helpers@3.1.3: {} vue-demi@0.14.10(vue@3.5.13(typescript@5.9.2)): dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index c64337b06..d2d081e89 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -50,6 +50,7 @@ catalog: eslint-config-prettier: ^10.1.8 eslint-import-resolver-typescript: ^4.4.4 eslint-plugin-import-x: ^4.16.1 + eslint-plugin-oxlint: 1.25.0 eslint-plugin-prettier: ^5.5.4 eslint-plugin-storybook: ^9.1.6 eslint-plugin-unused-imports: ^4.2.0 @@ -65,6 +66,8 @@ catalog: markdown-table: ^3.0.4 mixpanel-browser: ^2.71.0 nx: 21.4.1 + oxlint: ^1.25.0 + oxlint-tsgolint: ^0.4.0 picocolors: ^1.1.1 pinia: ^2.1.7 postcss-html: ^1.8.0 diff --git a/src/composables/graph/useMoreOptionsMenu.ts b/src/composables/graph/useMoreOptionsMenu.ts index fcf8ab8c7..45ea6eb1f 100644 --- a/src/composables/graph/useMoreOptionsMenu.ts +++ b/src/composables/graph/useMoreOptionsMenu.ts @@ -125,7 +125,7 @@ export function useMoreOptionsMenu() { const menuOptions = computed((): MenuOption[] => { // Reference selection flags to ensure re-computation when they change - // eslint-disable-next-line @typescript-eslint/no-unused-expressions + optionsVersion.value const states = computeSelectionFlags() diff --git a/src/lib/litegraph/src/ContextMenu.ts b/src/lib/litegraph/src/ContextMenu.ts index 40aed5c09..dc858da08 100644 --- a/src/lib/litegraph/src/ContextMenu.ts +++ b/src/lib/litegraph/src/ContextMenu.ts @@ -15,7 +15,7 @@ export interface ContextMenu { /** * ContextMenu from LiteGUI */ -// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging + export class ContextMenu { options: IContextMenuOptions parentMenu?: ContextMenu @@ -274,7 +274,7 @@ export class ContextMenu { } // menu option clicked - // eslint-disable-next-line @typescript-eslint/no-this-alias + const that = this function inner_onclick(this: ContextMenuDivElement, e: MouseEvent) { const value = this.value diff --git a/src/lib/litegraph/src/LGraphCanvas.ts b/src/lib/litegraph/src/LGraphCanvas.ts index 326997ba4..b7821584d 100644 --- a/src/lib/litegraph/src/LGraphCanvas.ts +++ b/src/lib/litegraph/src/LGraphCanvas.ts @@ -2672,7 +2672,7 @@ export class LGraphCanvas ): boolean { const outputLinks = [ ...(output.links ?? []), - ...(output._floatingLinks ?? new Set()) + ...[...(output._floatingLinks ?? new Set())] ] return outputLinks.some( (linkId) => @@ -6443,7 +6443,7 @@ export class LGraphCanvas optPass || {} ) const dirty = () => this.#dirty() - // eslint-disable-next-line @typescript-eslint/no-this-alias + const that = this const { graph } = this const { afterRerouteId } = opts @@ -6645,7 +6645,6 @@ export class LGraphCanvas event: CanvasPointerEvent, multiline?: boolean ): HTMLDivElement { - // eslint-disable-next-line @typescript-eslint/no-this-alias const that = this title = title || '' @@ -6816,7 +6815,7 @@ export class LGraphCanvas Object.assign(options, searchOptions) // console.log(options); - // eslint-disable-next-line @typescript-eslint/no-this-alias + const that = this const graphcanvas = LGraphCanvas.active_canvas const { canvas } = graphcanvas diff --git a/src/lib/litegraph/src/LGraphNode.ts b/src/lib/litegraph/src/LGraphNode.ts index 23326e24f..94c0310b1 100644 --- a/src/lib/litegraph/src/LGraphNode.ts +++ b/src/lib/litegraph/src/LGraphNode.ts @@ -206,7 +206,6 @@ supported callbacks: + getExtraMenuOptions: to add option to context menu */ -// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging export interface LGraphNode { constructor: LGraphNodeConstructor } @@ -218,7 +217,7 @@ export interface LGraphNode { * @param title a name for the node * @param type a type for the node */ -// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging + export class LGraphNode implements NodeLike, Positionable, IPinnable, IColorable { diff --git a/src/lib/litegraph/src/subgraph/SubgraphNode.ts b/src/lib/litegraph/src/subgraph/SubgraphNode.ts index cb0b10200..92b61460f 100644 --- a/src/lib/litegraph/src/subgraph/SubgraphNode.ts +++ b/src/lib/litegraph/src/subgraph/SubgraphNode.ts @@ -622,7 +622,7 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph { override clone() { const clone = super.clone() // force reasign so domWidgets reset ownership - // eslint-disable-next-line no-self-assign + this.properties.proxyWidgets = this.properties.proxyWidgets //TODO: Consider deep cloning subgraphs here. diff --git a/src/utils/searchAndReplace.ts b/src/utils/searchAndReplace.ts index 1e9299c40..1db9c8ee8 100644 --- a/src/utils/searchAndReplace.ts +++ b/src/utils/searchAndReplace.ts @@ -47,6 +47,7 @@ export function applyTextReplacements( console.warn('Unable to find widget', split[1], 'on node', split[0], node) return match } + return ((widget.value ?? '') + '').replaceAll( // eslint-disable-next-line no-control-regex /[/?<>\\:*|"\x00-\x1F\x7F]/g, diff --git a/tsconfig.json b/tsconfig.json index 8319194da..5470e2c2d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,19 +24,18 @@ "noImplicitOverride": true, "allowJs": true, "verbatimModuleSyntax": true, - "baseUrl": ".", "paths": { "@/*": [ - "src/*" + "./src/*" ], "@/utils/formatUtil": [ - "packages/shared-frontend-utils/src/formatUtil.ts" + "./packages/shared-frontend-utils/src/formatUtil.ts" ], "@/utils/networkUtil": [ - "packages/shared-frontend-utils/src/networkUtil.ts" + "./packages/shared-frontend-utils/src/networkUtil.ts" ], "@tests-ui/*": [ - "tests-ui/*" + "./tests-ui/*" ] }, "typeRoots": [ @@ -58,6 +57,8 @@ "src/**/*.vue", "src/**/*", "src/types/**/*.d.ts", + "playwright.config.ts", + "playwright.i18n.config.ts", "tailwind.config.ts", "tests-ui/**/*", "vite.config.mts", diff --git a/vite.config.mts b/vite.config.mts index fdeadc086..cffe4451d 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -140,6 +140,7 @@ export default defineConfig({ './node_modules/**', './tests-ui/**', '.eslintcache', + '.oxlintrc.json', '*.config.{ts,mts}', '**/.git/**', '**/.github/**',