[chore] Upgrade Prettier from 3.3.2 to 3.6.2 (#6089)

## Summary
- Updated Prettier from 3.3.2 to 3.6.2 in pnpm-workspace.yaml
- Ran `pnpm install` to update dependencies
- Ran `pnpm format` to apply new formatting rules
- Verified typecheck passes

## Test plan
- [x] TypeScript typecheck passes
- [x] Prettier formatting applied successfully

🤖 Generated with [Claude Code](https://claude.com/claude-code)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6089-chore-Upgrade-Prettier-from-3-3-2-to-3-6-2-28e6d73d3650816a888ff1129b14e0bc)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
This commit is contained in:
sno
2025-10-17 12:46:59 +09:00
committed by GitHub
parent 626fcff80b
commit 653cf64e01
23 changed files with 90 additions and 82 deletions

View File

@@ -75,7 +75,7 @@ let promptInput = findPromptInput()
const previousPromptInput = ref<string | null>(null)
const getPreviousResponseId = (index: number) =>
index > 0 ? parsedHistory.value[index - 1]?.response_id ?? '' : ''
index > 0 ? (parsedHistory.value[index - 1]?.response_id ?? '') : ''
const storePromptInput = () => {
promptInput ??= widget?.node.widgets?.find((w) => w.name === 'prompt')

View File

@@ -106,7 +106,7 @@ const getLabel = (val: string | null | undefined) => {
if (val == null) return label ?? ''
if (!options) return label ?? ''
const found = options.find((o) => o.value === val)
return found ? found.name : label ?? ''
return found ? found.name : (label ?? '')
}
// Extract complex style logic from template

View File

@@ -74,7 +74,7 @@ const emit = defineEmits<{
(e: 'click', event: MouseEvent): void
}>()
const overlayValue = computed(() =>
typeof iconBadge === 'function' ? iconBadge() ?? '' : iconBadge
typeof iconBadge === 'function' ? (iconBadge() ?? '') : iconBadge
)
const shouldShowBadge = computed(() => !!overlayValue.value)
const computedTooltip = computed(() => t(tooltip) + tooltipSuffix)

View File

@@ -100,9 +100,9 @@ const coverResult = flatOutputs.length
// Using `==` instead of `===` because NodeId can be a string or a number
const node: ComfyNode | null =
flatOutputs.length && props.task.workflow
? props.task.workflow.nodes.find(
? (props.task.workflow.nodes.find(
(n: ComfyNode) => n.id == coverResult?.nodeId
) ?? null
) ?? null)
: null
const progressPreviewBlobUrl = ref('')

View File

@@ -125,7 +125,7 @@ export function useNumberWidgetValue(
transform: (value: number | number[]) => {
// Handle PrimeVue Slider which can emit number | number[]
if (Array.isArray(value)) {
return value.length > 0 ? value[0] ?? 0 : 0
return value.length > 0 ? (value[0] ?? 0) : 0
}
return Number(value) || 0
}

View File

@@ -86,10 +86,10 @@ export const useNodeBadge = () => {
? `#${node.id}`
: '',
badgeTextVisible(nodeDef, nodeLifeCycleBadgeMode.value)
? nodeDef?.nodeLifeCycleBadgeText ?? ''
? (nodeDef?.nodeLifeCycleBadgeText ?? '')
: '',
badgeTextVisible(nodeDef, nodeSourceBadgeMode.value)
? nodeDef?.nodeSource?.badgeText ?? ''
? (nodeDef?.nodeSource?.badgeText ?? '')
: ''
]
.filter((s) => s.length > 0)

View File

@@ -1647,7 +1647,7 @@ const apiNodeCosts: Record<string, { displayPrice: string | PricingFunction }> =
? '720p'
: resolutionStr.includes('480')
? '480p'
: resolutionStr.match(/^\s*(\d{3,4}p)/)?.[1] ?? ''
: (resolutionStr.match(/^\s*(\d{3,4}p)/)?.[1] ?? '')
const pricePerSecond: Record<string, number> = {
'480p': 0.05,

View File

@@ -542,7 +542,7 @@ export class GroupNodeConfig {
primitiveConfig
)
primitiveConfig[1] =
config?.customConfig ?? inputs[inputName][1]
(config?.customConfig ?? inputs[inputName][1])
? { ...inputs[inputName][1] }
: {}

View File

@@ -553,8 +553,8 @@ export class ManageGroupDialog extends ComfyDialog<HTMLDialogElement> {
this.element.replaceChildren(outer)
this.changeGroup(
type
? groupNodes.find((g) => `${PREFIX}${SEPARATOR}${g}` === type) ??
groupNodes[0]
? (groupNodes.find((g) => `${PREFIX}${SEPARATOR}${g}` === type) ??
groupNodes[0])
: groupNodes[0]
)
this.element.showModal()

View File

@@ -370,7 +370,7 @@ class Load3d {
await ModelExporter.exportOBJ(model, filename, originalURL)
break
case 'stl':
await ModelExporter.exportSTL(model, filename), originalURL
;(await ModelExporter.exportSTL(model, filename), originalURL)
break
default:
throw new Error(`Unsupported export format: ${format}`)

View File

@@ -4888,9 +4888,9 @@ export class LGraphCanvas
/** Get the target snap / highlight point in graph space */
#getHighlightPosition(): Readonly<Point> {
return LiteGraph.snaps_for_comfy
? this.linkConnector.state.snapLinksPos ??
? (this.linkConnector.state.snapLinksPos ??
this._highlight_pos ??
this.graph_mouse
this.graph_mouse)
: this.graph_mouse
}

View File

@@ -2467,7 +2467,7 @@ export class LGraphNode
}
}
return doNotUseOccupied ? -1 : occupiedSlot ?? -1
return doNotUseOccupied ? -1 : (occupiedSlot ?? -1)
}
/**

View File

@@ -312,7 +312,7 @@ export class LLink implements LinkSegment, Serialisable<SerialisableLLink> {
const inputNode =
this.target_id === -1
? undefined
: network.getNodeById(this.target_id) ?? undefined
: (network.getNodeById(this.target_id) ?? undefined)
const input = inputNode?.inputs[this.target_slot]
const subgraphInput = this.originIsIoNode
? network.inputNode?.slots[this.origin_slot]
@@ -324,7 +324,7 @@ export class LLink implements LinkSegment, Serialisable<SerialisableLLink> {
const outputNode =
this.origin_id === -1
? undefined
: network.getNodeById(this.origin_id) ?? undefined
: (network.getNodeById(this.origin_id) ?? undefined)
const output = outputNode?.outputs[this.origin_slot]
const subgraphOutput = this.targetIsIoNode
? network.outputNode?.slots[this.target_slot]

View File

@@ -133,7 +133,7 @@ const searchResults = computed<ISettingGroup[]>(() =>
)
const tabValue = computed<string>(() =>
inSearch.value ? 'Search Results' : activeCategory.value?.label ?? ''
inSearch.value ? 'Search Results' : (activeCategory.value?.label ?? '')
)
// Don't allow null category to be set outside of search.

View File

@@ -78,7 +78,7 @@ export function useTemplateWorkflows() {
const fallback =
template.title ?? template.name ?? `${sourceModule} Template`
return sourceModule === 'default'
? template.localizedTitle ?? fallback
? (template.localizedTitle ?? fallback)
: fallback
}

View File

@@ -309,7 +309,7 @@ export function useSlotLinkInteraction({
hoveredSlotKey = elWithSlot?.dataset['slotKey'] ?? null
hoveredNodeId = hoveredSlotKey
? null
: elWithNode?.dataset['nodeId'] ?? null
: (elWithNode?.dataset['nodeId'] ?? null)
dragContext.lastPointerEventTarget = target
dragContext.lastPointerTargetSlotKey = hoveredSlotKey
dragContext.lastPointerTargetNodeId = hoveredNodeId
@@ -620,8 +620,8 @@ export function useSlotLinkInteraction({
}
const baseDirection = isInputSlot
? inputSlot?.dir ?? LinkDirection.LEFT
: outputSlot?.dir ?? LinkDirection.RIGHT
? (inputSlot?.dir ?? LinkDirection.LEFT)
: (outputSlot?.dir ?? LinkDirection.RIGHT)
const existingAnchor =
isInputSlot && !shouldBreakExistingInputLink

View File

@@ -84,8 +84,8 @@ function isIPv6Loopback(h: string): boolean {
// Count explicit zero groups on each side of '::' to ensure at least one group is compressed.
// (leftCount + rightCount) must be ≤ 6 so that the total expanded groups = 8.
const leftCount = m[1] ? m[1].match(/0{1,4}:/gi)?.length ?? 0 : 0
const rightCount = m[2] ? m[2].match(/0{1,4}:/gi)?.length ?? 0 : 0
const leftCount = m[1] ? (m[1].match(/0{1,4}:/gi)?.length ?? 0) : 0
const rightCount = m[2] ? (m[2].match(/0{1,4}:/gi)?.length ?? 0) : 0
// Require that at least one group was actually compressed: i.e., leftCount + rightCount ≤ 6.
return leftCount + rightCount <= 6

View File

@@ -236,7 +236,7 @@ const handleSubmit = async () => {
// Convert 'latest' to actual version number for installation
const actualVersion =
selectedVersion.value === 'latest'
? nodePack.latest_version?.version ?? 'latest'
? (nodePack.latest_version?.version ?? 'latest')
: selectedVersion.value
await managerStore.installPack.call({

View File

@@ -74,8 +74,8 @@ const createPayload = (installItem: NodePack) => {
const isUnclaimedPack = installItem.publisher?.name === 'Unclaimed'
const versionToInstall = isUnclaimedPack
? ('nightly' as ManagerComponents['schemas']['SelectedVersion'])
: installItem.latest_version?.version ??
('latest' as ManagerComponents['schemas']['SelectedVersion'])
: (installItem.latest_version?.version ??
('latest' as ManagerComponents['schemas']['SelectedVersion']))
return {
id: installItem.id,
@@ -140,7 +140,7 @@ const performInstallation = async (packs: NodePack[]) => {
const computedLabel = computed(() =>
isInstalling.value
? t('g.installing')
: label ??
(nodePacks.length > 1 ? t('manager.installSelected') : t('g.install'))
: (label ??
(nodePacks.length > 1 ? t('manager.installSelected') : t('g.install')))
)
</script>