Add ts-strict-ignore plugin (#1235)

* Add ts-strict-ignore plugin

* nit

* Add to typecheck script
This commit is contained in:
Chenlei Hu
2024-10-12 11:56:49 -04:00
committed by GitHub
parent c23d95f8f9
commit 5611e90fda
82 changed files with 751 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { mount } from '@vue/test-utils'
import { describe, it, expect, beforeAll } from 'vitest'
import EditableText from '../EditableText.vue'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { describe, it, expect, vi } from 'vitest'
import { mount } from '@vue/test-utils'
import TreeExplorerTreeNode from '@/components/common/TreeExplorerTreeNode.vue'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
// Disabled because of https://github.com/Comfy-Org/ComfyUI_frontend/issues/1184
import { mount } from '@vue/test-utils'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
import { ComfyDialog, $el } from '../../scripts/ui'
import { ComfyApp } from '../../scripts/app'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { useToastStore } from '@/stores/toastStore'
import { app } from '../../scripts/app'
import { $el } from '../../scripts/ui'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { LiteGraph, LGraphCanvas } from '@comfyorg/litegraph'
import { app } from '../../scripts/app'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
// Allows for simple dynamic prompt replacement

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
// Allows you to edit the attention weight by holding ctrl (or cmd) and using the up/down arrow keys

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
import { api } from '../../scripts/api'
import { mergeIfValid } from './widgetInputs'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { $el, ComfyDialog } from '../../scripts/ui'
import { DraggableList } from '../../scripts/ui/draggableList'
import { GroupNodeConfig, GroupNodeHandler } from './groupNode'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { LGraphGroup } from '@comfyorg/litegraph'
import { app } from '../../scripts/app'
import { LGraphCanvas, LiteGraph } from '@comfyorg/litegraph'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { LiteGraph } from '@comfyorg/litegraph'
import { app } from '../../scripts/app'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
import { LiteGraph } from '@comfyorg/litegraph'
const id = 'Comfy.LinkRenderMode'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
import { ComfyDialog, $el } from '../../scripts/ui'
import { ComfyApp } from '../../scripts/app'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app, type ComfyApp } from '@/scripts/app'
import type { ComfyExtension } from '@/types/comfy'
import type { LGraphNode } from '@comfyorg/litegraph'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
import { api } from '../../scripts/api'
import { ComfyDialog, $el } from '../../scripts/ui'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { LiteGraph, LGraphCanvas } from '@comfyorg/litegraph'
import { app } from '../../scripts/app'
import { ComfyWidgets } from '../../scripts/widgets'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import type { IContextMenuValue } from '@comfyorg/litegraph'
import { app } from '../../scripts/app'
import { mergeIfValid, getWidgetConfig, setWidgetConfig } from './widgetInputs'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
import { applyTextReplacements } from '../../scripts/utils'
// Use widget values and dates in output filenames

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
import { LGraphCanvas, LiteGraph } from '@comfyorg/litegraph'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
import { ComfyWidgets } from '../../scripts/widgets'
import { LiteGraph } from '@comfyorg/litegraph'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import type { SettingParams } from '@/types/settingTypes'
import { app } from '../../scripts/app'
import {

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
import { api } from '../../scripts/api'
import type { IWidget } from '@comfyorg/litegraph'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
import { ComfyNodeDef } from '@/types/apiTypes'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../../scripts/app'
import { api } from '../../scripts/api'
import { useToastStore } from '@/stores/toastStore'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { ComfyWidgets, addValueControlWidgets } from '../../scripts/widgets'
import { app } from '../../scripts/app'
import { applyTextReplacements } from '../../scripts/utils'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import App from './App.vue'
import router from '@/router'
import { createApp } from 'vue'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { ComfyWorkflowJSON } from '@/types/comfyWorkflow'
import {
DownloadModelStatus,

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { ComfyLogging } from './logging'
import { ComfyWidgetConstructor, ComfyWidgets, initWidgets } from './widgets'
import { ComfyUI, $el } from './ui'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import type { ComfyApp } from './app'
import { api } from './api'
import { clone } from './utils'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app, ANIM_PREVIEW_WIDGET } from './app'
import { LGraphCanvas, LGraphNode, LiteGraph } from '@comfyorg/litegraph'
import type { Vector4 } from '@comfyorg/litegraph'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { $el, ComfyDialog } from './ui'
import { api } from './api'
import type { ComfyApp } from './app'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
export function getFromFlacBuffer(buffer: ArrayBuffer): Record<string, string> {
const dataView = new DataView(buffer)

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
export function getFromPngBuffer(buffer: ArrayBuffer) {
// Get the PNG data as a Uint8Array
const pngData = new Uint8Array(buffer)

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { LiteGraph } from '@comfyorg/litegraph'
import { api } from './api'
import { getFromPngFile } from './metadata/png'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { api } from './api'
import { ComfyDialog as _ComfyDialog } from './ui/dialog'
import { toggleSwitch } from './ui/toggleSwitch'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { ComfyDialog } from '../dialog'
import { $el } from '../../ui'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { $el } from '../../ui'
import { applyClasses, ClassList, toggleElement } from '../utils'
import { prop } from '../../utils'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { $el } from '../../ui'
import { ComfyButton } from './button'
import { prop } from '../../utils'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { prop } from '../../utils'
import { $el } from '../../ui'
import { applyClasses, ClassList } from '../utils'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { useDialogStore } from '@/stores/dialogStore'
import { $el } from '../ui'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
/*
Original implementation:
https://github.com/TahaSh/drag-to-reorder

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '../app'
import { $el } from '../ui'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { $el } from '../ui'
import { api } from '../api'
import { ComfyDialog } from './dialog'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { $el } from '../ui'
/**

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { api } from '../api'
import { $el } from '../ui'
import { createSpinner } from './spinner'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
export type ClassList = string | string[] | Record<string, boolean>
export function applyClasses(

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { api } from './api'
import type { ComfyApp } from './app'
import { $el } from './ui'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { api } from './api'
import './domWidget'
import type { ComfyApp } from './app'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import type { ComfyApp } from './app'
import { api } from './api'
import { ChangeTracker } from './changeTracker'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { ComfyNodeDefImpl } from '@/stores/nodeDefStore'
import Fuse, { IFuseOptions, FuseSearchOptions } from 'fuse.js'
import _ from 'lodash'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '@/scripts/app'
import { api } from '@/scripts/api'
import { defineStore } from 'pinia'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
// We should consider moving to https://primevue.org/dynamicdialog/ once everything is in Vue.
// Currently we need to bridge between legacy app code and Vue app with a Pinia store.

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import { api } from '../scripts/api'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { api } from '@/scripts/api'
import { defineStore } from 'pinia'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { defineStore } from 'pinia'
import { computed } from 'vue'
import { useSettingStore } from './settingStore'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import {
NodeSearchService,
type SearchAuxScore

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { api } from '@/scripts/api'
import type { ComfyApp } from '@/scripts/app'
import type {

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
/**
* TODO: Migrate scripts/ui/settings.ts here
*

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { defineStore } from 'pinia'
import { computed, ref } from 'vue'
import { ComfyWorkflow } from '@/scripts/workflows'

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import type {
ConnectingLink,
LGraphNode,

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { memoize } from 'lodash'
type RGB = { r: number; g: number; b: number }

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import type { TreeNode } from 'primevue/treenode'
export function buildTree<T>(