From ea0f74a9f674fc915f5d58c995da0dee2b5cc171 Mon Sep 17 00:00:00 2001 From: ArtificialLab <2308123+dmx974@users.noreply.github.com> Date: Sun, 22 Sep 2024 10:12:54 +0400 Subject: [PATCH] Cleanup (#915) * (update) cleanup: - move reflect to main.ts - add config.ts with comfy frontend version - cleanup index.html and App.vue * (fix) lint doesn't like branch assignments * (fix) properly add __COMFYUI_FRONTEND_VERSION__ to ts globals --- eslint.config.js | 9 +++++- global.d.ts | 1 + index.html | 17 ++--------- src/App.vue | 74 +++++++++++++++++++++++++++-------------------- src/config.ts | 4 +++ src/main.ts | 3 +- src/vite-env.d.ts | 6 ++++ tsconfig.json | 3 +- 8 files changed, 67 insertions(+), 50 deletions(-) create mode 100644 global.d.ts create mode 100644 src/config.ts diff --git a/eslint.config.js b/eslint.config.js index 168fa88e0..e57ecf14b 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -14,7 +14,14 @@ export default [ 'src/types/vue-shim.d.ts' ] }, - { languageOptions: { globals: globals.browser } }, + { + languageOptions: { + globals: { + ...globals.browser, + __COMFYUI_FRONTEND_VERSION__: 'readonly' + } + } + }, pluginJs.configs.recommended, ...tseslint.configs.recommended, ...pluginVue.configs['flat/essential'], diff --git a/global.d.ts b/global.d.ts new file mode 100644 index 000000000..41aa0c1ef --- /dev/null +++ b/global.d.ts @@ -0,0 +1 @@ +declare const __COMFYUI_FRONTEND_VERSION__: string diff --git a/index.html b/index.html index 39dac8fe0..f60011061 100644 --- a/index.html +++ b/index.html @@ -4,21 +4,6 @@