mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 16:40:05 +00:00
[bugfix] Fix TypeScript errors in typecheck
- Add @ts-expect-error directive to unused postSurveyStatus function in auth.ts - Add @ts-expect-error for .mts import extension in vite.electron.config.mts - Add @ts-expect-error directives for global variable assignments in vitest.setup.ts - Remove vite.electron.config.mts from ESLint allowDefaultProject to fix duplicate inclusion error
This commit is contained in:
@@ -52,7 +52,6 @@ export default defineConfig([
|
||||
projectService: {
|
||||
allowDefaultProject: [
|
||||
'vite.config.mts',
|
||||
'vite.electron.config.mts',
|
||||
'vite.types.config.mts',
|
||||
'vitest.litegraph.config.ts'
|
||||
]
|
||||
|
||||
@@ -187,6 +187,7 @@ export async function getSurveyCompletedStatus(): Promise<boolean> {
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error - Unused function kept for future use
|
||||
async function postSurveyStatus(): Promise<void> {
|
||||
try {
|
||||
const response = await api.fetchApi(`/settings/${ONBOARDING_SURVEY_KEY}`, {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { defineConfig, mergeConfig } from 'vite'
|
||||
import type { Plugin } from 'vite'
|
||||
|
||||
// @ts-expect-error - TypeScript doesn't allow .mts extension in imports
|
||||
import baseConfig from './vite.config.mts'
|
||||
|
||||
const mockElectronAPI: Plugin = {
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import 'vue'
|
||||
|
||||
// Define global variables for tests
|
||||
// @ts-expect-error - Global variables are defined in global.d.ts
|
||||
globalThis.__COMFYUI_FRONTEND_VERSION__ = '1.24.0'
|
||||
// @ts-expect-error - Global variables are defined in global.d.ts
|
||||
globalThis.__SENTRY_ENABLED__ = false
|
||||
// @ts-expect-error - Global variables are defined in global.d.ts
|
||||
globalThis.__SENTRY_DSN__ = ''
|
||||
// @ts-expect-error - Global variables are defined in global.d.ts
|
||||
globalThis.__ALGOLIA_APP_ID__ = ''
|
||||
// @ts-expect-error - Global variables are defined in global.d.ts
|
||||
globalThis.__ALGOLIA_API_KEY__ = ''
|
||||
// @ts-expect-error - Global variables are defined in global.d.ts
|
||||
globalThis.__USE_PROD_CONFIG__ = false
|
||||
|
||||
Reference in New Issue
Block a user