-
Notifications
You must be signed in to change notification settings - Fork 440
Devex: Linter updates #7309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Devex: Linter updates #7309
Conversation
📝 WalkthroughWalkthroughThis PR makes linting/config updates and dependency bumps, removes numerous unused Vue component props/events/refs, consolidates dynamic import formatting, reformats TypeScript generic/class signatures, and adjusts related tests and stylelint settings. No new features or runtime behavior changes are introduced. Changes
Possibly related PRs
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 12/10/2025, 06:52:55 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results⏰ Completed at: 12/10/2025, 07:03:48 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.22 MB (baseline 3.23 MB) • 🟢 -174 BMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 991 kB (baseline 991 kB) • 🟢 -210 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 298 kB (baseline 298 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 178 kB (baseline 178 kB) • 🟢 -213 BReusable component library chunks
Status: 6 added / 6 removed Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 2 added / 2 removed Utilities & Hooks — 3.18 kB (baseline 3.18 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 1 added / 1 removed Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 3.81 MB (baseline 3.81 MB) • 🟢 -345 BBundles that do not match a named category
Status: 18 added / 18 removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
src/stores/electronDownloadStore.ts (1)
33-33: Use standard "TODO" convention in comments.Change
ToDOtoTODOto match standard conventions and improve searchability.- // ToDO: replace with ElectronDownload type + // TODO: replace with ElectronDownload typesrc/components/queue/CompletionSummaryBanner.vue (1)
102-104: ReplacewithDefaultswith Vue 3.5 reactive props destructuring.As per coding guidelines, use Vue 3.5 TypeScript style for default prop declaration instead of
withDefaults.Apply this diff:
-const props = withDefaults(defineProps<Props>(), { - thumbnailUrls: () => [] -}) +const { + mode, + completedCount, + failedCount, + thumbnailUrls = [], + ariaLabel +} = defineProps<Props>()Then update template references from
props.modetomode,props.completedCounttocompletedCount, etc.src/components/queue/job/QueueJobItem.stories.ts (1)
111-118: Gallery story still passes removedrunning-node-nameprop
QueueJobItemno longer exposes arunningNodeNameprop, but the Gallery story template still passesrunning-node-name="KSampler". This is now a stale attribute that won’t be used by the component and may confuse readers about the current API.Consider removing it to keep stories in sync with the component:
- <QueueJobItem - job-id="job-running-2" - state="running" - title="Generating image" - :progress-total-percent="66" - :progress-current-percent="10" - running-node-name="KSampler" - v-bind="args" - /> + <QueueJobItem + job-id="job-running-2" + state="running" + title="Generating image" + :progress-total-percent="66" + :progress-current-percent="10" + v-bind="args" + />src/lib/litegraph/src/interfaces.ts (1)
383-406: Alignextracallback param type withTExtraThe multiline generic formatting for
IContextMenuOptionslooks good and keeps things within the configured line width. While you’re touching this block, consider tightening the callback signature so theextraargument matches theextra?: TExtraproperty and theIContextMenuValuecallback:callback?( value?: string | IContextMenuValue<TValue>, options?: unknown, event?: MouseEvent, previous_menu?: ContextMenu<TValue>, - extra?: unknown + extra?: TExtra ): void | boolean | Promise<void | boolean>This is a type-only improvement and can be done here or in a follow‑up, but it will give better type inference around context‑menu handlers.
| import type { AssetMeta } from '../schemas/mediaAssetSchema' | ||
| import MediaTitle from './MediaTitle.vue' | ||
| const { asset } = defineProps<{ | ||
| asset: AssetMeta | ||
| context: AssetContext | ||
| }>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for all MediaImageBottom component usages
rg -nP '(MediaImageBottom|import.*MediaImageBottom)' --type=vue --type=tsRepository: Comfy-Org/ComfyUI_frontend
Length of output: 97
🏁 Script executed:
#!/bin/bash
# Search for all MediaImageBottom component usages without type flag
rg 'MediaImageBottom' -A 5 --glob='*.vue' --glob='*.ts'Repository: Comfy-Org/ComfyUI_frontend
Length of output: 561
🏁 Script executed:
#!/bin/bash
# Read the MediaAssetCard.vue file to check prop usage
cat -n src/platform/assets/components/MediaAssetCard.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 12078
🏁 Script executed:
#!/bin/bash
# Read MediaImageBottom.vue to verify current prop definitions
cat -n src/platform/assets/components/MediaImageBottom.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 941
🏁 Script executed:
#!/bin/bash
# Check all media bottom components for their prop definitions
for file in src/platform/assets/components/Media*Bottom.vue; do
echo "=== $file ==="
grep -A 5 "defineProps" "$file"
doneRepository: Comfy-Org/ComfyUI_frontend
Length of output: 866
🏁 Script executed:
#!/bin/bash
# Check all media top components for their prop definitions
for file in src/platform/assets/components/Media*Top.vue; do
echo "=== $file ==="
grep -A 5 "defineProps" "$file"
doneRepository: Comfy-Org/ComfyUI_frontend
Length of output: 627
🏁 Script executed:
#!/bin/bash
# Search for provide/inject usage of context in the codebase
rg 'provide.*MediaAssetKey|inject.*MediaAssetKey' -A 3 -B 1Repository: Comfy-Org/ComfyUI_frontend
Length of output: 985
🏁 Script executed:
#!/bin/bash
# Search for inject usage in media components
rg 'inject.*MediaAssetKey' src/platform/assets/components/ -B 2 -A 3Repository: Comfy-Org/ComfyUI_frontend
Length of output: 52
Remove the context prop binding from both top and bottom component usages in MediaAssetCard.vue.
All media components (MediaImageBottom, MediaVideoBottom, MediaAudioBottom, Media3DBottom, and their Top counterparts) no longer accept a context prop. MediaAssetCard.vue still passes :context="{ type: assetType }" on lines 40 and 110, which must be removed. The context is available via the provide/inject pattern if needed, but the components do not currently consume it.
🤖 Prompt for AI Agents
In src/platform/assets/components/MediaImageBottom.vue around lines 17-22 and
related media component usages, remove the now-unused context prop binding from
MediaAssetCard.vue where it passes :context="{ type: assetType }" (specifically
at lines 40 and 110); update both top and bottom component usages
(MediaImageBottom, MediaVideoBottom, MediaAudioBottom, Media3DBottom and their
Top counterparts) to stop passing the context prop so components receive context
via provide/inject when needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange I never saw a invalid prop warning in the console. What mechanism emits those warnings anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christian-byrne Vue's prop validation warnings are emitted by Vue's runtime during component instantiation in development mode only. Here's how it works:
Warning Mechanism:
- Vue's runtime checks props passed to a component against its
definePropsdeclaration - In development builds, Vue emits console warnings when:
- A prop is passed but not declared in
defineProps(extraneous prop warning) - A declared prop fails type validation
- A required prop is missing
- A prop is passed but not declared in
Why you might not have seen warnings:
- Production mode: Warnings are completely stripped from production builds for performance
- Component not rendered: If the parent component (MediaAssetCard) wasn't actually rendered/mounted in your testing, no validation would occur
- Timing: The warning only appears when the component instance is created - if you loaded the page before making changes, the old code wouldn't warn
- Build configuration: Some build tools or Vue configurations can suppress specific warnings
- Previously declared props: If the
contextprop was previously declared (which it was), Vue wouldn't warn about it being passed - it only warns about undeclared props being passed
In this case, since context was previously a valid declared prop and you're now removing it, the warning would only appear going forward when the parent still tries to pass it to components that no longer accept it. The linter caught this issue before runtime would have!
🧠 Learnings used
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : In Vue Components, implement proper props and emits definitions
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Define proper props and emits definitions in Vue components
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Implement proper props and emits definitions
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : Prefer `useModel` to separately defining a prop and emit
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : Implement proper error handling in Vue components
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use provide/inject for dependency injection in Vue components
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/locales/en/main.json:774-780
Timestamp: 2025-12-09T04:35:40.491Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, locale files other than `src/locales/en/main.json` are generated automatically on every release. Developers only need to add English (en) key/values in `src/locales/en/main.json` when making PRs; manual updates to other locale files (fr, ja, ko, ru, zh, zh-TW, es, ar, tr, etc.) are not required and should not be suggested in reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that the media stuff is very clever with dynamic components that evade static analysis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
🔧 Auto-fixes AppliedThis PR has been automatically updated to fix linting and formatting issues.
Changes made:
|
christian-byrne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| true, | ||
| { | ||
| "typesSyntax": { | ||
| "radial-gradient()": "| <any-value>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do to the plugin exactly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fix for an issue in the newer stylelint. (Not this one, but related)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The offending site is here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
eslint.config.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js,jsx,vue,json}
📄 CodeRabbit inference engine (AGENTS.md)
Code style: Use 2-space indentation, single quotes, no trailing semicolons, and 80-character line width (see
.prettierrc)
Files:
eslint.config.ts
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,vue}: Imports must be sorted and grouped by plugin; runpnpm formatbefore committing
Use TypeScript for type safety; never useanytype - use proper TypeScript types
Never useas anytype assertions; fix the underlying type issue instead
Use es-toolkit for utility functions
Write code that is expressive and self-documenting; avoid comments unless absolutely necessary; do not add or retain redundant comments
Keep functions short and functional
Minimize nesting in code (e.g., deeply nestediforforstatements); apply the Arrow Anti-Pattern principle
Avoid mutable state; prefer immutability and assignment at point of declaration
Favor pure functions, especially testable ones
Files:
eslint.config.ts
🧠 Learnings (23)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.{ts,tsx,vue} : Imports must be sorted and grouped by plugin; run `pnpm format` before committing
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using the `pnpm lint:fix` command
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.{ts,tsx,js,jsx,vue,json} : Code style: Use 2-space indentation, single quotes, no trailing semicolons, and 80-character line width (see `.prettierrc`)
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{vue,ts,tsx} : Follow Vue 3 composition API style guide
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Follow Vue 3 style guide and naming conventions
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Implement proper TypeScript types throughout the codebase
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : Use Vue 3.5 TypeScript style for default prop declaration with reactive props destructuring; do not use `withDefaults` or runtime props declaration
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-05T23:03:52.138Z
Learning: Run typecheck, lint, and format checks during development workflow
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{components,composables}/**/*.{ts,tsx,vue} : Use vue-i18n for ALL user-facing strings by adding them to `src/locales/en/main.json`
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.{ts,tsx,vue} : Use es-toolkit for utility functions
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using the `pnpm lint:fix` command
Applied to files:
eslint.config.ts
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{vue,ts,tsx} : Follow Vue 3 composition API style guide
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.{ts,tsx,vue} : Imports must be sorted and grouped by plugin; run `pnpm format` before committing
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.{ts,tsx,js,jsx,vue,json} : Code style: Use 2-space indentation, single quotes, no trailing semicolons, and 80-character line width (see `.prettierrc`)
Applied to files:
eslint.config.ts
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Use es-toolkit for utility functions instead of other utility libraries
Applied to files:
eslint.config.ts
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{components,composables}/**/*.{ts,tsx,vue} : Use vue-i18n for ALL user-facing strings by adding them to `src/locales/en/main.json`
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.{ts,tsx,vue} : Use es-toolkit for utility functions
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : Implement proper error handling in Vue components
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : Follow Vue 3 style guide and naming conventions
Applied to files:
eslint.config.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.{vue,ts} : Implement proper error handling
Applied to files:
eslint.config.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Follow Vue 3 style guide and naming conventions
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : Use Vue 3 SFCs (Single File Components) with Composition API only; do not use Options API
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : In Vue Components, implement proper props and emits definitions
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.test.ts : For Component testing, use Vue Test Utils and follow advice about making components easy to test
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : Vue components must use `<script setup lang="ts">` for component logic
Applied to files:
eslint.config.ts
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Define proper props and emits definitions in Vue components
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : Avoid new usage of PrimeVue components; prefer shadcn/vue or Reka UI instead
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : Use Vue 3.5 TypeScript style for default prop declaration with reactive props destructuring; do not use `withDefaults` or runtime props declaration
Applied to files:
eslint.config.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T20:22:23.581Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.581Z
Learning: Applies to **/*.vue : Be judicious with addition of new refs or other state: prefer props, avoid redundant `computed`, and prefer `computed` over `watch`
Applied to files:
eslint.config.ts
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Avoid using ts-expect-error; use proper TypeScript types instead
Applied to files:
eslint.config.ts
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.
Applied to files:
eslint.config.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: lint-and-format
- GitHub Check: setup
- GitHub Check: collect
- GitHub Check: test
🔇 Additional comments (1)
eslint.config.ts (1)
149-153: Good additions for Vue code quality enforcement.These rules align well with Vue 3 best practices:
vue/no-useless-mustachesprevents redundant template interpolationsvue/no-unused-emit-declarationscatches dead emit definitionsvue/no-use-v-else-with-v-forprevents a common template anti-patternvue/one-component-per-fileenforces the recommended single-component structureBased on learnings, these rules complement the guideline for proper props and emits definitions in Vue components.
Co-authored-by: Christian Byrne <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
src/stores/electronDownloadStore.ts (1)
33-33: Technical debt: TODO comment about ElectronDownload type coverage.The TODO on line 33 indicates that the
DownloadManager.onDownloadProgresscallback data type could be better aligned with theElectronDownloadinterface. This is pre-existing and outside the scope of this linter update, but worth tracking for future store refactoring.If you'd like to address this type alignment in a follow-up PR, I can help generate a more precise type definition that covers the callback data structure.
src/components/queue/CompletionSummaryBanner.vue (1)
94-104: ReplacewithDefaultswith Vue 3.5-style prop defaultsCurrent props use
withDefaults(defineProps<Props>(), …), which goes against the repo guideline to use Vue 3.5 TypeScript-style default prop declaration and avoidwithDefaults/runtime props declarations. Consider refactoring to the recommended pattern (typed destructuring with default values) on a follow-up pass or in this PR if it’s already touching linting rules for props.Based on learnings, this repo prefers Vue 3.5 TS-style default props over
withDefaults.src/components/queue/job/QueueJobItem.stories.ts (1)
111-119: Remove the deletedrunning-node-nameprop.The
running-node-nameattribute is used here but this prop was removed from theQueueJobItemcomponent. This inconsistency will cause runtime warnings and the story won't accurately reflect the component's current API.Apply this diff to remove the obsolete prop:
<QueueJobItem job-id="job-running-2" state="running" title="Generating image" :progress-total-percent="66" :progress-current-percent="10" - running-node-name="KSampler" v-bind="args" />src/lib/litegraph/src/LGraphCanvas.ts (1)
308-317: FixoldGraphvalue insubgraphsetterThe setter assigns
this.#subgraph = valuebefore dispatching'litegraph:set-graph', causingoldGraphto always equalnewGraph. Capture the previous graph before assignment:set subgraph(value: Subgraph | undefined) { if (value !== this.#subgraph) { + const oldGraph = this.graph this.#subgraph = value if (value) this.dispatch('litegraph:set-graph', { - oldGraph: this.#subgraph, + oldGraph: oldGraph ?? null, newGraph: value }) } }Also consider whether
'litegraph:set-graph'should be dispatched from bothsubgraphsetter andsetGraphmethod. InopenSubgraph, the event fires twice (once from line 1878 with incorrectoldGraph, again fromsetGraphat line 1879 with correct value).
| @@ -1,3 +1,4 @@ | |||
| /* eslint-disable vue/one-component-per-file */ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
File‑level disable for vue/one-component-per-file is reasonable in tests
Given the explicit stub components defined alongside the tested component, disabling this rule for the test file makes sense. If lint noise becomes an issue elsewhere, you could narrow the disable to just the stub definitions, but it’s not required here.
🤖 Prompt for AI Agents
In src/renderer/extensions/vueNodes/components/NodeSlots.test.ts at line 1, the
file currently has a file‑level eslint disable for vue/one-component-per-file;
keep this disable as-is since the test defines multiple explicit stub components
alongside the tested component, or if you prefer to limit scope later, move the
disable to only surround the stub component definitions (e.g., use localized
eslint-disable comments immediately above and below the stubs) to reduce global
lint suppression.
|
Going to merge with the previous approval |
Summary
Updates for the linter/formatter deps, turning on some more rules.
┆Issue is synchronized with this Notion page by Unito