Prune console.log() (#5867)

Introduce a no-console rule in ESLint configuration and remove existing
console log statements throughout the codebase, replacing some with
warnings or comments.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5867-Prune-console-log-27e6d73d365081bcbad8c36cfb5b258c)
by [Unito](https://www.unito.io)
This commit is contained in:
Johnpaul Chiwetelu
2025-10-02 02:34:58 +01:00
committed by GitHub
parent 20731fe3f0
commit 01b3aeae68
28 changed files with 61 additions and 140 deletions

View File

@@ -57,12 +57,10 @@ export const Default: Story = {
render: (args) => ({
components: { AssetBrowserModal },
setup() {
const onAssetSelect = (asset: AssetDisplayItem) => {
console.log('Selected asset:', asset)
}
const onClose = () => {
console.log('Modal closed')
const onAssetSelect = (_asset: AssetDisplayItem) => {
// Asset selection handler for story
}
const onClose = () => {}
return {
...args,
@@ -97,11 +95,11 @@ export const SingleAssetType: Story = {
render: (args) => ({
components: { AssetBrowserModal },
setup() {
const onAssetSelect = (asset: AssetDisplayItem) => {
console.log('Selected asset:', asset)
const onAssetSelect = (_asset: AssetDisplayItem) => {
// Asset selection handler for story
}
const onClose = () => {
console.log('Modal closed')
// Modal close handler for story
}
// Create assets with only one type (checkpoints)
@@ -146,11 +144,11 @@ export const NoLeftPanel: Story = {
render: (args) => ({
components: { AssetBrowserModal },
setup() {
const onAssetSelect = (asset: AssetDisplayItem) => {
console.log('Selected asset:', asset)
const onAssetSelect = (_asset: AssetDisplayItem) => {
// Asset selection handler for story
}
const onClose = () => {
console.log('Modal closed')
// Modal close handler for story
}
return { ...args, onAssetSelect, onClose, assets: mockAssets }

View File

@@ -198,10 +198,6 @@ export function useAssetBrowser(assets: AssetItem[] = []) {
assetId: string,
onSelect?: (filename: string) => void
): Promise<void> {
if (import.meta.env.DEV) {
console.debug('Asset selected:', assetId)
}
if (!onSelect) {
return
}

View File

@@ -29,7 +29,6 @@ const DialogDemoComponent = {
}
const handleAssetSelected = (assetPath: string) => {
console.log('Asset selected:', assetPath)
alert(`Selected asset: ${assetPath}`)
isDialogOpen.value = false // Auto-close like the real composable
}

View File

@@ -87,7 +87,6 @@ export class ComfyWorkflow extends UserFile {
}
// Note: originalContent is populated by super.load()
console.debug('load and start tracking of workflow', this.path)
this.changeTracker = markRaw(
new ChangeTracker(
this,
@@ -98,7 +97,6 @@ export class ComfyWorkflow extends UserFile {
}
override unload(): void {
console.debug('unload workflow', this.path)
this.changeTracker = null
super.unload()
}
@@ -302,7 +300,6 @@ export const useWorkflowStore = defineStore('workflow', () => {
const loadedWorkflow = await workflow.load()
activeWorkflow.value = loadedWorkflow
comfyApp.canvas.bg_tint = loadedWorkflow.tintCanvasBg
console.debug('[workflowStore] open workflow', workflow.path)
return loadedWorkflow
}
@@ -379,7 +376,6 @@ export const useWorkflowStore = defineStore('workflow', () => {
} else {
workflow.unload()
}
console.debug('[workflowStore] close workflow', workflow.path)
}
/**