diff --git a/src/components/common/ComfyImage.vue b/src/components/common/ComfyImage.vue index efb269135..b8afcf7ea 100644 --- a/src/components/common/ComfyImage.vue +++ b/src/components/common/ComfyImage.vue @@ -45,7 +45,7 @@ const props = withDefaults( ) const imageBroken = ref(false) -const handleImageError = (e: Event) => { +const handleImageError = () => { imageBroken.value = true } diff --git a/src/components/common/ElectronFileDownload.vue b/src/components/common/ElectronFileDownload.vue index 73b2336c7..acf3aba69 100644 --- a/src/components/common/ElectronFileDownload.vue +++ b/src/components/common/ElectronFileDownload.vue @@ -103,7 +103,7 @@ const fileSize = computed(() => const electronDownloadStore = useElectronDownloadStore() const [savePath, filename] = props.label.split('/') -electronDownloadStore.$subscribe((mutation, { downloads }) => { +electronDownloadStore.$subscribe((_, { downloads }) => { const download = downloads.find((download) => props.url === download.url) if (download) { diff --git a/src/components/dialog/content/setting/__tests__/SettingItem.spec.ts b/src/components/dialog/content/setting/__tests__/SettingItem.spec.ts index dcbed0fa4..44ab9395f 100644 --- a/src/components/dialog/content/setting/__tests__/SettingItem.spec.ts +++ b/src/components/dialog/content/setting/__tests__/SettingItem.spec.ts @@ -34,7 +34,7 @@ describe('SettingItem', () => { name: 'Node Input Conversion Submenus', type: 'combo', value: 'Top', - options: (value: string) => ['Correctly Translated'] + options: () => ['Correctly Translated'] } }) diff --git a/src/composables/widgets/useImagePreviewWidget.ts b/src/composables/widgets/useImagePreviewWidget.ts index 3c404082b..df1682a74 100644 --- a/src/composables/widgets/useImagePreviewWidget.ts +++ b/src/composables/widgets/useImagePreviewWidget.ts @@ -247,14 +247,14 @@ class ImagePreviewWidget implements ICustomWidget { draw( ctx: CanvasRenderingContext2D, node: LGraphNode, - widget_width: number, + _width: number, y: number, - H: number + _height: number ): void { renderPreview(ctx, node, y) } - computeLayoutSize(this: IBaseWidget, node: LGraphNode) { + computeLayoutSize(this: IBaseWidget) { return { minHeight: 220, minWidth: 1 diff --git a/src/composables/widgets/useImageUploadWidget.ts b/src/composables/widgets/useImageUploadWidget.ts index 532817507..d31e74d3b 100644 --- a/src/composables/widgets/useImageUploadWidget.ts +++ b/src/composables/widgets/useImageUploadWidget.ts @@ -9,7 +9,6 @@ import type { ResultItem } from '@/schemas/apiSchema' import type { InputSpec } from '@/schemas/nodeDefSchema' import type { ComfyWidgetConstructor } from '@/scripts/widgets' import { useNodeOutputStore } from '@/stores/imagePreviewStore' -import type { ComfyApp } from '@/types' import { createAnnotatedPath } from '@/utils/formatUtil' import { addToComboValues } from '@/utils/litegraphUtil' @@ -32,8 +31,7 @@ export const useImageUploadWidget = () => { const widgetConstructor: ComfyWidgetConstructor = ( node: LGraphNode, inputName: string, - inputData: InputSpec, - app: ComfyApp + inputData: InputSpec ) => { const inputOptions = inputData[1] ?? {} const { imageInputName, allow_batch, image_folder = 'input' } = inputOptions diff --git a/src/extensions/core/editAttention.ts b/src/extensions/core/editAttention.ts index d2e70dfb5..119b27758 100644 --- a/src/extensions/core/editAttention.ts +++ b/src/extensions/core/editAttention.ts @@ -153,7 +153,7 @@ app.registerExtension({ const weightDelta = event.key === 'ArrowUp' ? delta : -delta const updatedText = selectedText.replace( /\((.*):([+-]?\d+(?:\.\d+)?)\)/, - (match, text, weight) => { + (_, text, weight) => { weight = incrementWeight(weight, weightDelta) if (weight == 1) { return text diff --git a/src/extensions/core/groupNode.ts b/src/extensions/core/groupNode.ts index 4ba4e32d0..8ef553aed 100644 --- a/src/extensions/core/groupNode.ts +++ b/src/extensions/core/groupNode.ts @@ -1020,7 +1020,7 @@ export class GroupNodeHandler { // Draw custom collapse icon to identity this as a group const onDrawTitleBox = this.node.onDrawTitleBox - this.node.onDrawTitleBox = function (ctx, height, size, scale) { + this.node.onDrawTitleBox = function (ctx, height) { onDrawTitleBox?.apply(this, arguments) const fill = ctx.fillStyle @@ -1128,7 +1128,7 @@ export class GroupNodeHandler { this, 'executing', (d) => d, - (d, id, node) => id + (_, id) => id ) const executed = handleEvent.call( @@ -1223,7 +1223,7 @@ export class GroupNodeHandler { } } - populatePrimitive(node, nodeId, oldName, i, linkedShift) { + populatePrimitive(_node, nodeId, oldName) { // Converted widget, populate primitive if linked const primitiveId = this.groupData.widgetToPrimitive[nodeId]?.[oldName] if (primitiveId == null) return @@ -1301,7 +1301,7 @@ export class GroupNodeHandler { ) const mainWidget = this.node.widgets[widgetIndex] if ( - this.populatePrimitive(node, nodeId, oldName, i, linkedShift) || + this.populatePrimitive(node, nodeId, oldName) || widgetIndex === -1 ) { // Find the inner widget and shift by the number of linked widgets as they will have been removed too diff --git a/src/extensions/core/groupNodeManage.ts b/src/extensions/core/groupNodeManage.ts index 72d8ad81b..6ffc1ec6a 100644 --- a/src/extensions/core/groupNodeManage.ts +++ b/src/extensions/core/groupNodeManage.ts @@ -394,7 +394,7 @@ export class ManageGroupDialog extends ComfyDialog { $el( 'button.comfy-btn', { - onclick: (e) => { + onclick: () => { const node = app.graph.nodes.find( (n) => n.type === `${PREFIX}${SEPARATOR}` + this.selectedGroup ) diff --git a/src/extensions/core/load3d.ts b/src/extensions/core/load3d.ts index caebb6a09..2382ceb8b 100644 --- a/src/extensions/core/load3d.ts +++ b/src/extensions/core/load3d.ts @@ -275,7 +275,7 @@ app.registerExtension({ app.registerExtension({ name: 'Comfy.Preview3D', - async beforeRegisterNodeDef(nodeType, nodeData) { + async beforeRegisterNodeDef(_nodeType, nodeData) { if ('Preview3D' === nodeData.name) { // @ts-expect-error InputSpec is not typed correctly nodeData.input.required.image = ['PREVIEW_3D'] @@ -348,7 +348,7 @@ app.registerExtension({ app.registerExtension({ name: 'Comfy.Preview3DAnimation', - async beforeRegisterNodeDef(nodeType, nodeData) { + async beforeRegisterNodeDef(_nodeType, nodeData) { if ('Preview3DAnimation' === nodeData.name) { // @ts-expect-error InputSpec is not typed correctly nodeData.input.required.image = ['PREVIEW_3D_ANIMATION'] diff --git a/src/extensions/core/maskEditorOld.ts b/src/extensions/core/maskEditorOld.ts index e8239b9b8..11ab93f17 100644 --- a/src/extensions/core/maskEditorOld.ts +++ b/src/extensions/core/maskEditorOld.ts @@ -19,7 +19,7 @@ function dataURLToBlob(dataURL) { } function loadImage(imagePath) { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { const image = new Image() image.onload = function () { @@ -36,7 +36,6 @@ async function uploadMask(filepath, formData) { method: 'POST', body: formData }) - .then((response) => {}) .catch((error) => { console.error('Error:', error) }) @@ -625,10 +624,10 @@ export class MaskEditorDialogOld extends ComfyDialog { maskCanvas.addEventListener('touchmove', (event) => this.draw_move(self, event) ) - maskCanvas.addEventListener('pointerover', (event) => { + maskCanvas.addEventListener('pointerover', () => { this.brush.style.display = 'block' }) - maskCanvas.addEventListener('pointerleave', (event) => { + maskCanvas.addEventListener('pointerleave', () => { this.brush.style.display = 'none' }) @@ -763,7 +762,7 @@ export class MaskEditorDialogOld extends ComfyDialog { brush.style.top = centerY - self.brush_size * this.zoom_ratio + 'px' } - handleWheelEvent(self, event) { + handleWheelEvent(_, event) { event.preventDefault() if (event.ctrlKey) { diff --git a/src/extensions/core/maskeditor.ts b/src/extensions/core/maskeditor.ts index 3511461ce..bf6279020 100644 --- a/src/extensions/core/maskeditor.ts +++ b/src/extensions/core/maskeditor.ts @@ -2832,7 +2832,7 @@ class UIManager { 100, 1, (await this.messageBroker.pull('brushSettings')).size, - (event, value) => { + (_, value) => { this.messageBroker.publish('setBrushSize', parseInt(value)) this.updateBrushPreview() } @@ -2845,7 +2845,7 @@ class UIManager { 1, 0.01, (await this.messageBroker.pull('brushSettings')).opacity, - (event, value) => { + (_, value) => { this.messageBroker.publish('setBrushOpacity', parseFloat(value)) this.updateBrushPreview() } @@ -2858,7 +2858,7 @@ class UIManager { 1, 0.01, (await this.messageBroker.pull('brushSettings')).hardness, - (event, value) => { + (_, value) => { this.messageBroker.publish('setBrushHardness', parseFloat(value)) this.updateBrushPreview() } @@ -2871,7 +2871,7 @@ class UIManager { 100, 1, (await this.messageBroker.pull('brushSettings')).smoothingPrecision, - (event, value) => { + (_, value) => { this.messageBroker.publish( 'setBrushSmoothingPrecision', parseInt(value) @@ -2929,7 +2929,7 @@ class UIManager { 255, 1, tolerance, - (event, value) => { + (_, value) => { this.messageBroker.publish('setPaintBucketTolerance', parseInt(value)) } ) @@ -2942,7 +2942,7 @@ class UIManager { 100, 1, fillOpacity, - (event, value) => { + (_, value) => { this.messageBroker.publish('setFillOpacity', parseInt(value)) } ) @@ -2971,7 +2971,7 @@ class UIManager { 255, 1, tolerance, - (event, value) => { + (_, value) => { this.messageBroker.publish('setColorSelectTolerance', parseInt(value)) } ) @@ -2983,21 +2983,21 @@ class UIManager { 100, 1, 100, // Default to 100% - (event, value) => { + (_, value) => { this.messageBroker.publish('setSelectionOpacity', parseInt(value)) } ) const livePreviewToggle = this.createToggle( t('maskEditor.Live Preview'), - (event, value) => { + (_, value) => { this.messageBroker.publish('setLivePreview', value) } ) const wholeImageToggle = this.createToggle( t('maskEditor.Apply to Whole Image'), - (event, value) => { + (_, value) => { this.messageBroker.publish('setWholeImage', value) } ) @@ -3006,14 +3006,14 @@ class UIManager { const methodSelect = this.createDropdown( t('maskEditor.Method'), methodOptions, - (event, value) => { + (_, value) => { this.messageBroker.publish('setColorComparisonMethod', value) } ) const maskBoundaryToggle = this.createToggle( t('maskEditor.Stop at mask'), - (event, value) => { + (_, value) => { this.messageBroker.publish('setMaskBoundary', value) } ) @@ -3024,7 +3024,7 @@ class UIManager { 255, 1, 0, - (event, value) => { + (_, value) => { this.messageBroker.publish('setMaskTolerance', parseInt(value)) } ) @@ -3125,7 +3125,7 @@ class UIManager { 1.0, 0.01, this.mask_opacity, - (event, value) => { + (_, value) => { this.mask_opacity = parseFloat(value) this.maskCanvas.style.opacity = String(this.mask_opacity) @@ -3635,7 +3635,7 @@ class UIManager { this.messageBroker.publish('pointerUp', event) }) - pointer_zone.addEventListener('pointerleave', (event: PointerEvent) => { + pointer_zone.addEventListener('pointerleave', () => { this.brush.style.opacity = '0' this.pointerZone.style.cursor = '' }) @@ -3656,12 +3656,9 @@ class UIManager { this.messageBroker.publish('wheel', event) ) - pointer_zone.addEventListener( - 'pointerenter', - async (event: PointerEvent) => { - this.updateCursor() - } - ) + pointer_zone.addEventListener('pointerenter', async () => { + this.updateCursor() + }) return pointer_zone } diff --git a/src/extensions/core/nodeTemplates.ts b/src/extensions/core/nodeTemplates.ts index a635bf9ca..2e5be38f8 100644 --- a/src/extensions/core/nodeTemplates.ts +++ b/src/extensions/core/nodeTemplates.ts @@ -64,7 +64,7 @@ class ManageTemplates extends ComfyDialog { createButtons() { const btns = super.createButtons() btns[0].textContent = 'Close' - btns[0].onclick = (e) => { + btns[0].onclick = () => { clearTimeout(this.saveVisualCue) this.close() } @@ -279,7 +279,7 @@ class ManageTemplates extends ComfyDialog { fontSize: '12px', fontWeight: 'normal' }, - onclick: (e) => { + onclick: () => { const json = JSON.stringify({ templates: [t] }, null, 2) // convert the data to a JSON string const blob = new Blob([json], { type: 'application/json' diff --git a/src/extensions/core/rerouteNode.ts b/src/extensions/core/rerouteNode.ts index 877768e41..428ea60bf 100644 --- a/src/extensions/core/rerouteNode.ts +++ b/src/extensions/core/rerouteNode.ts @@ -35,7 +35,7 @@ app.registerExtension({ }) } - this.onConnectionsChange = (type, index, connected, link_info) => { + this.onConnectionsChange = (type, _index, connected) => { if (app.configuringGraph) return // Prevent multiple connections to different types when we have no input diff --git a/src/extensions/core/simpleTouchSupport.ts b/src/extensions/core/simpleTouchSupport.ts index 9b089439e..a37189c10 100644 --- a/src/extensions/core/simpleTouchSupport.ts +++ b/src/extensions/core/simpleTouchSupport.ts @@ -134,7 +134,7 @@ app.registerExtension({ }) const processMouseDown = LGraphCanvas.prototype.processMouseDown -LGraphCanvas.prototype.processMouseDown = function (e) { +LGraphCanvas.prototype.processMouseDown = function () { if (touchZooming || touchCount) { return } @@ -143,7 +143,7 @@ LGraphCanvas.prototype.processMouseDown = function (e) { } const processMouseMove = LGraphCanvas.prototype.processMouseMove -LGraphCanvas.prototype.processMouseMove = function (e) { +LGraphCanvas.prototype.processMouseMove = function () { if (touchZooming || touchCount > 1) { return } diff --git a/src/extensions/core/slotDefaults.ts b/src/extensions/core/slotDefaults.ts index 07871d465..ac5071699 100644 --- a/src/extensions/core/slotDefaults.ts +++ b/src/extensions/core/slotDefaults.ts @@ -23,14 +23,14 @@ app.registerExtension({ step: 1 }, defaultValue: 5, - onChange: (newVal, oldVal) => { + onChange: (newVal) => { this.setDefaults(newVal) } }) }, slot_types_default_out: {}, slot_types_default_in: {}, - async beforeRegisterNodeDef(nodeType, nodeData, app) { + async beforeRegisterNodeDef(nodeType, nodeData) { var nodeId = nodeData.name const inputs = nodeData['input']?.['required'] //only show required inputs to reduce the mess also not logical to create node with optional inputs for (const inputKey in inputs) { diff --git a/src/extensions/core/uploadAudio.ts b/src/extensions/core/uploadAudio.ts index d43c793ad..808e95701 100644 --- a/src/extensions/core/uploadAudio.ts +++ b/src/extensions/core/uploadAudio.ts @@ -148,7 +148,7 @@ app.registerExtension({ app.registerExtension({ name: 'Comfy.UploadAudio', - async beforeRegisterNodeDef(nodeType, nodeData: ComfyNodeDef) { + async beforeRegisterNodeDef(_nodeType, nodeData: ComfyNodeDef) { if (nodeData?.input?.required?.audio?.[1]?.audio_upload === true) { nodeData.input.required.upload = ['AUDIOUPLOAD', {}] } diff --git a/src/extensions/core/uploadImage.ts b/src/extensions/core/uploadImage.ts index 5f76e5573..755f9000f 100644 --- a/src/extensions/core/uploadImage.ts +++ b/src/extensions/core/uploadImage.ts @@ -34,7 +34,7 @@ const createUploadInput = ( app.registerExtension({ name: 'Comfy.UploadImage', - beforeRegisterNodeDef(nodeType, nodeData: ComfyNodeDef) { + beforeRegisterNodeDef(_nodeType, nodeData: ComfyNodeDef) { const { input } = nodeData ?? {} const { required } = input ?? {} if (!required) return diff --git a/src/extensions/core/webcamCapture.ts b/src/extensions/core/webcamCapture.ts index f406f1880..1b2fabf4b 100644 --- a/src/extensions/core/webcamCapture.ts +++ b/src/extensions/core/webcamCapture.ts @@ -9,7 +9,7 @@ const WEBCAM_READY = Symbol() app.registerExtension({ name: 'Comfy.WebcamCapture', - getCustomWidgets(app) { + getCustomWidgets() { return { WEBCAM(node, inputName) { let res diff --git a/src/extensions/core/widgetInputs.ts b/src/extensions/core/widgetInputs.ts index 4e9006f83..b7026f7ca 100644 --- a/src/extensions/core/widgetInputs.ts +++ b/src/extensions/core/widgetInputs.ts @@ -120,7 +120,7 @@ export class PrimitiveNode extends LGraphNode { } } - onConnectionsChange(type: ISlotType, index: number, connected: boolean) { + onConnectionsChange(_type: ISlotType, _index: number, connected: boolean) { if (app.configuringGraph) { // Dont run while the graph is still setting up return @@ -143,7 +143,7 @@ export class PrimitiveNode extends LGraphNode { onConnectOutput( slot: number, - type: string, + _type: string, input: INodeInputSlot, target_node: LGraphNode, target_slot: number @@ -651,7 +651,7 @@ app.registerExtension({ } ) }, - async beforeRegisterNodeDef(nodeType, nodeData, app) { + async beforeRegisterNodeDef(nodeType, _nodeData, app) { // Add menu options to convert to/from widgets const origGetExtraMenuOptions = nodeType.prototype.getExtraMenuOptions // @ts-expect-error adding extra property diff --git a/src/router.ts b/src/router.ts index 7465e7f8a..69f1a249a 100644 --- a/src/router.ts +++ b/src/router.ts @@ -15,8 +15,8 @@ const isFileProtocol = window.location.protocol === 'file:' const basePath = isElectron() ? '/' : window.location.pathname const guardElectronAccess = ( - to: RouteLocationNormalized, - from: RouteLocationNormalized, + _to: RouteLocationNormalized, + _from: RouteLocationNormalized, next: NavigationGuardNext ) => { if (isElectron()) { @@ -42,7 +42,7 @@ const router = createRouter({ path: '', name: 'GraphView', component: () => import('@/views/GraphView.vue'), - beforeEnter: async (to, from, next) => { + beforeEnter: async (_to, _from, next) => { const userStore = useUserStore() await userStore.initialize() if (userStore.needsLogin) { @@ -121,7 +121,7 @@ const router = createRouter({ } ], - scrollBehavior(to, from, savedPosition) { + scrollBehavior(_to, _from, savedPosition) { if (savedPosition) { return savedPosition } else { diff --git a/src/scripts/app.ts b/src/scripts/app.ts index 82ec8664c..69b523f4c 100644 --- a/src/scripts/app.ts +++ b/src/scripts/app.ts @@ -547,9 +547,8 @@ export class ComfyApp { node, ctx, size, - fgcolor, - bgcolor, - selected + _fgcolor, + bgcolor ) { const res = origDrawNodeShape.apply(this, arguments) @@ -627,7 +626,7 @@ export class ComfyApp { } const origDrawNode = LGraphCanvas.prototype.drawNode - LGraphCanvas.prototype.drawNode = function (node, ctx) { + LGraphCanvas.prototype.drawNode = function (node) { const editor_alpha = this.editor_alpha const old_color = node.color const old_bgcolor = node.bgcolor @@ -678,11 +677,11 @@ export class ComfyApp { this.ui.setStatus(detail) }) - api.addEventListener('progress', ({ detail }) => { + api.addEventListener('progress', () => { this.graph.setDirtyCanvas(true, false) }) - api.addEventListener('executing', ({ detail }) => { + api.addEventListener('executing', () => { this.graph.setDirtyCanvas(true, false) this.revokePreviews(this.runningNodeId) delete this.nodePreviewImages[this.runningNodeId] @@ -708,7 +707,7 @@ export class ComfyApp { } }) - api.addEventListener('execution_start', ({ detail }) => { + api.addEventListener('execution_start', () => { this.lastExecutionError = null this.graph.nodes.forEach((node) => { if (node.onExecutionStart) node.onExecutionStart() diff --git a/src/scripts/changeTracker.ts b/src/scripts/changeTracker.ts index 3d7a47574..6f3e44492 100644 --- a/src/scripts/changeTracker.ts +++ b/src/scripts/changeTracker.ts @@ -240,7 +240,7 @@ export class ChangeTracker { true ) - window.addEventListener('keyup', (e) => { + window.addEventListener('keyup', () => { if (keyIgnored) { keyIgnored = false logger.debug('checkState on keyup') @@ -352,7 +352,7 @@ export class ChangeTracker { }) } - static bindInput(app: ComfyApp, activeEl: Element | null): boolean { + static bindInput(_app: ComfyApp, activeEl: Element | null): boolean { if ( !activeEl || activeEl.tagName === 'CANVAS' || diff --git a/src/scripts/pnginfo.ts b/src/scripts/pnginfo.ts index 2f9954243..24fd5df7d 100644 --- a/src/scripts/pnginfo.ts +++ b/src/scripts/pnginfo.ts @@ -280,7 +280,7 @@ export async function importA1111(graph, parameters) { model(v) { setWidgetValue(ckptNode, 'ckpt_name', v, true) }, - vae(v) {}, + vae() {}, 'cfg scale'(v) { setWidgetValue(samplerNode, 'cfg', +v) }, diff --git a/src/scripts/ui.ts b/src/scripts/ui.ts index 03d45a0af..c562223db 100644 --- a/src/scripts/ui.ts +++ b/src/scripts/ui.ts @@ -92,7 +92,7 @@ export function $el( return element as ElementType } -function dragElement(dragEl, settings): () => void { +function dragElement(dragEl): () => void { var posDiffX = 0, posDiffY = 0, posStartX = 0, @@ -640,7 +640,7 @@ export class ComfyUI { // Hide by default on construction so it does not interfere with other views. this.menuContainer.style.display = 'none' - this.restoreMenuPosition = dragElement(this.menuContainer, this.settings) + this.restoreMenuPosition = dragElement(this.menuContainer) // @ts-expect-error this.setStatus({ exec_info: { queue_remaining: 'X' } }) diff --git a/src/scripts/ui/draggableList.ts b/src/scripts/ui/draggableList.ts index 7f7ae33bb..d34035771 100644 --- a/src/scripts/ui/draggableList.ts +++ b/src/scripts/ui/draggableList.ts @@ -287,7 +287,7 @@ export class DraggableList extends EventTarget { } unsetItemState() { - this.getIdleItems().forEach((item, i) => { + this.getIdleItems().forEach((item) => { delete item.dataset.isAbove delete item.dataset.isToggled item.style.transform = '' diff --git a/src/scripts/widgets.ts b/src/scripts/widgets.ts index e1af1a0b9..a9a56a8a7 100644 --- a/src/scripts/widgets.ts +++ b/src/scripts/widgets.ts @@ -74,7 +74,7 @@ export function addValueControlWidget( node: LGraphNode, targetWidget: IWidget, defaultValue?: string, - values?: unknown, + _values?: unknown, widgetName?: string, inputData?: InputSpec ): IWidget { diff --git a/src/services/litegraphService.ts b/src/services/litegraphService.ts index 6e577350a..81b540069 100644 --- a/src/services/litegraphService.ts +++ b/src/services/litegraphService.ts @@ -306,7 +306,7 @@ export const useLitegraphService = () => { options.push({ content: 'Bypass', - callback: (obj) => { + callback: () => { const mode = this.mode === LGraphEventMode.BYPASS ? LGraphEventMode.ALWAYS @@ -322,7 +322,7 @@ export const useLitegraphService = () => { if (!ComfyApp.clipspace_return_node) { options.push({ content: 'Copy (Clipspace)', - callback: (obj) => { + callback: () => { ComfyApp.copyToClipspace(this) } }) @@ -339,7 +339,7 @@ export const useLitegraphService = () => { if (isImageNode(this)) { options.push({ content: 'Open in MaskEditor', - callback: (obj) => { + callback: () => { ComfyApp.copyToClipspace(this) ComfyApp.clipspace_return_node = this ComfyApp.open_maskeditor() @@ -361,19 +361,13 @@ export const useLitegraphService = () => { /** * @deprecated No longer needed as we use {@link useImagePreviewWidget} */ - node.prototype.setSizeForImage = function ( - this: LGraphNode, - force: boolean - ) { + node.prototype.setSizeForImage = function (this: LGraphNode) { console.warn( 'node.setSizeForImage is deprecated. Now it has no effect. Please remove the call to it.' ) } - function unsafeDrawBackground( - this: LGraphNode, - ctx: CanvasRenderingContext2D - ) { + function unsafeDrawBackground(this: LGraphNode) { if (this.flags.collapsed) return const nodeOutputStore = useNodeOutputStore() @@ -418,9 +412,9 @@ export const useLitegraphService = () => { } } - node.prototype.onDrawBackground = function (ctx) { + node.prototype.onDrawBackground = function () { try { - unsafeDrawBackground.call(this, ctx) + unsafeDrawBackground.call(this) } catch (error) { console.error('Error drawing node background', error) } diff --git a/src/stores/executionStore.ts b/src/stores/executionStore.ts index 2ab4b3fa1..b0b9bb08c 100644 --- a/src/stores/executionStore.ts +++ b/src/stores/executionStore.ts @@ -6,8 +6,7 @@ import type { ExecutingWsMessage, ExecutionCachedWsMessage, ExecutionStartWsMessage, - ProgressWsMessage, - StatusWsMessage + ProgressWsMessage } from '@/schemas/apiSchema' import type { ComfyNode, @@ -149,7 +148,7 @@ export const useExecutionStore = defineStore('execution', () => { _executingNodeProgress.value = e.detail } - function handleStatus(e: CustomEvent) { + function handleStatus() { if (api.clientId) { clientId.value = api.clientId diff --git a/tests-ui/tests/colorUtil.test.ts b/tests-ui/tests/colorUtil.test.ts index ecd6f16f9..b47fa518c 100644 --- a/tests-ui/tests/colorUtil.test.ts +++ b/tests-ui/tests/colorUtil.test.ts @@ -80,7 +80,7 @@ describe('colorUtil - adjustColor', () => { }) } - describe.each(Object.entries(colors))('%s color', (colorName, color) => { + describe.each(Object.entries(colors))('%s color', (_colorName, color) => { describe.each(formats)('%s format', (format) => { runAdjustColorTests(color, format as ColorFormat) }) diff --git a/tests-ui/tests/composables/useCachedRequest.test.ts b/tests-ui/tests/composables/useCachedRequest.test.ts index e5ae13471..8d2a92a23 100644 --- a/tests-ui/tests/composables/useCachedRequest.test.ts +++ b/tests-ui/tests/composables/useCachedRequest.test.ts @@ -22,7 +22,7 @@ describe('useCachedRequest', () => { ) // Create a mock request function that returns different results based on params - mockRequestFn = vi.fn(async (params: any, signal?: AbortSignal) => { + mockRequestFn = vi.fn(async (params: any) => { // Simulate a request that takes some time await new Promise((resolve) => setTimeout(resolve, 8)) diff --git a/tsconfig.json b/tsconfig.json index 5de8ed87e..5255e9b4d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,7 @@ /* Linting */ "strict": false, "noUnusedLocals": true, - "noUnusedParameters": false, + "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, "downlevelIteration": true,