From d6c4c00198fe1cfe79f5e59a7e3ec1a9a2e5e4ba Mon Sep 17 00:00:00 2001 From: Gorniaky Date: Sun, 20 Oct 2024 12:56:09 -0300 Subject: [PATCH] fix lint --- eslint.config.mjs | 2 ++ package.json | 7 ++++--- src/@types/api.ts | 2 +- src/@types/providers.ts | 2 +- src/@types/structures.ts | 10 +++++----- src/commands/apps/backup.ts | 6 +++--- src/commands/apps/commit.ts | 6 +++--- src/commands/apps/copy.id.ts | 6 +++--- src/commands/apps/delete.ts | 6 +++--- src/commands/apps/import.ts | 6 +++--- src/commands/apps/logs.ts | 6 +++--- src/commands/apps/mods/add.ts | 8 ++++---- src/commands/apps/mods/edit.ts | 8 ++++---- src/commands/apps/mods/rem.ts | 6 +++--- src/commands/apps/profile/avatar.ts | 6 +++--- src/commands/apps/profile/name.ts | 6 +++--- src/commands/apps/ram.ts | 6 +++--- src/commands/apps/restart.ts | 6 +++--- src/commands/apps/start.ts | 6 +++--- src/commands/apps/stop.ts | 6 +++--- src/commands/apps/terminal.ts | 6 +++--- src/commands/commit.ts | 9 +++++---- src/commands/logs.ts | 4 ++-- src/commands/team/backup.ts | 6 +++--- src/commands/team/commit.ts | 10 +++++----- src/commands/team/copy.id.ts | 6 +++--- src/commands/team/import.ts | 6 +++--- src/commands/team/logs.ts | 6 +++--- src/commands/team/ram.ts | 6 +++--- src/commands/team/restart.ts | 6 +++--- src/commands/team/start.ts | 6 +++--- src/commands/team/status.ts | 4 ++-- src/commands/team/stop.ts | 6 +++--- src/commands/upload.ts | 4 ++-- src/commands/user/set.locale.ts | 2 +- src/events/activate.ts | 2 +- src/extension.ts | 2 +- src/providers/AppTreeDataProvider.ts | 6 +++--- src/providers/BaseLanguageProvider.ts | 2 +- src/providers/BaseTreeDataProvider.ts | 4 ++-- src/providers/LanguageConfigurationProvider.ts | 4 ++-- src/providers/TeamAppTreeDataProvider.ts | 4 ++-- src/providers/UserTreeDataProvider.ts | 2 +- src/structures/AppChildTreeItem.ts | 4 ++-- src/structures/AppTreeItem.ts | 6 +++--- src/structures/BaseChildTreeItem.ts | 4 ++-- src/structures/BaseStatusBarItem.ts | 2 +- src/structures/BaseTreeItem.ts | 2 +- src/structures/Command.ts | 10 +++++----- src/structures/CustomDomainTreeItem.ts | 2 +- src/structures/Discloud.ts | 6 +++--- src/structures/DiscloudStatusBarItem.ts | 2 +- src/structures/SubDomainTreeItem.ts | 2 +- src/structures/TeamAppChildTreeItem.ts | 4 ++-- src/structures/TeamAppTreeItem.ts | 6 +++--- src/structures/UserChildTreeItem.ts | 2 +- src/structures/UserTreeItem.ts | 2 +- src/structures/VSUser.ts | 4 ++-- src/util/API.ts | 4 ++-- src/util/FileSystem.ts | 2 +- src/util/Zip.ts | 6 +++--- 61 files changed, 152 insertions(+), 148 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index ee5fa613..977ce745 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -14,6 +14,7 @@ export default [ { rules: { "@typescript-eslint/consistent-type-imports": ["warn", { fixStyle: "inline-type-imports" }], + "@typescript-eslint/no-empty-object-type": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-unsafe-declaration-merging": "off", "@typescript-eslint/no-unused-vars": ["warn", { @@ -26,6 +27,7 @@ export default [ "comma-dangle": ["warn", "always-multiline"], "func-style": ["warn", "declaration"], indent: ["warn", 2, { SwitchCase: 1 }], + "no-case-declarations": "off", "no-duplicate-imports": ["warn", { includeExports: true }], "no-empty": "off", "no-unused-private-class-members": "warn", diff --git a/package.json b/package.json index bcc43d83..7dbbce1b 100644 --- a/package.json +++ b/package.json @@ -1243,9 +1243,10 @@ "vscode:prepublish": "yarn run compile", "compile": "tsc -p ./", "watch": "tsc -watch -p ./", - "pretest": "yarn run compile && yarn run lint", - "lint": "eslint src", - "test": "vscode-test" + "lint": "eslint src --fix", + "pretest": "yarn run compile && yarn run test:lint", + "test": "vscode-test", + "test:lint": "eslint src" }, "dependencies": { "@vscode/l10n": "^0.0.18", diff --git a/src/@types/api.ts b/src/@types/api.ts index 89e5ff7b..58b73af6 100644 --- a/src/@types/api.ts +++ b/src/@types/api.ts @@ -1,5 +1,5 @@ import type { BaseApiApp, RESTApiBaseResult } from "discloud.app"; -import { AppType } from "../@enum"; +import { type AppType } from "../@enum"; export interface RESTGetApiVscode extends RESTApiBaseResult { user: ApiVscodeUser diff --git a/src/@types/providers.ts b/src/@types/providers.ts index 511b3dfc..2a10e592 100644 --- a/src/@types/providers.ts +++ b/src/@types/providers.ts @@ -1,4 +1,4 @@ -import { PathLike } from "fs"; +import { type PathLike } from "fs"; export interface ProviderOptions { path: PathLike diff --git a/src/@types/structures.ts b/src/@types/structures.ts index 4346c8a9..2630a3c8 100644 --- a/src/@types/structures.ts +++ b/src/@types/structures.ts @@ -1,8 +1,8 @@ -import { CancellationToken, ExtensionContext, LogOutputChannel, Progress, ProgressOptions, TreeItem } from "vscode"; -import AppTreeItem from "../structures/AppTreeItem"; -import TeamAppTreeItem from "../structures/TeamAppTreeItem"; -import VSUser from "../structures/VSUser"; -import { RateLimitData } from "./rest"; +import { type CancellationToken, type ExtensionContext, type LogOutputChannel, type Progress, type ProgressOptions, type TreeItem } from "vscode"; +import type AppTreeItem from "../structures/AppTreeItem"; +import type TeamAppTreeItem from "../structures/TeamAppTreeItem"; +import type VSUser from "../structures/VSUser"; +import { type RateLimitData } from "./rest"; export interface CommandData { allowTokenless?: boolean; diff --git a/src/commands/apps/backup.ts b/src/commands/apps/backup.ts index 2857297f..f7e1ab80 100644 --- a/src/commands/apps/backup.ts +++ b/src/commands/apps/backup.ts @@ -1,12 +1,12 @@ import { t } from "@vscode/l10n"; -import { RESTGetApiAppBackupResult, Routes } from "discloud.app"; +import { type RESTGetApiAppBackupResult, Routes } from "discloud.app"; import { existsSync, mkdirSync } from "fs"; import { writeFile } from "fs/promises"; import { join } from "path"; import { ProgressLocation, window } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; -import AppTreeItem from "../../structures/AppTreeItem"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; import { requester } from "../../util"; diff --git a/src/commands/apps/commit.ts b/src/commands/apps/commit.ts index dac4ca53..ae2f459d 100644 --- a/src/commands/apps/commit.ts +++ b/src/commands/apps/commit.ts @@ -1,10 +1,10 @@ import { t } from "@vscode/l10n"; -import { RESTPutApiAppCommitResult, Routes, resolveFile } from "discloud.app"; +import { type RESTPutApiAppCommitResult, Routes, resolveFile } from "discloud.app"; import { join } from "path"; import { ProgressLocation, workspace } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; -import AppTreeItem from "../../structures/AppTreeItem"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; import { FileSystem, requester, Zip } from "../../util"; diff --git a/src/commands/apps/copy.id.ts b/src/commands/apps/copy.id.ts index 8f425e5e..29423ffb 100644 --- a/src/commands/apps/copy.id.ts +++ b/src/commands/apps/copy.id.ts @@ -1,9 +1,9 @@ import { t } from "@vscode/l10n"; import { env, window } from "vscode"; -import { TaskData } from "../../@types"; -import AppTreeItem from "../../structures/AppTreeItem"; +import { type TaskData } from "../../@types"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; -import TeamAppTreeItem from "../../structures/TeamAppTreeItem"; +import type TeamAppTreeItem from "../../structures/TeamAppTreeItem"; export default class extends Command { constructor() { diff --git a/src/commands/apps/delete.ts b/src/commands/apps/delete.ts index 705f5f66..111215bc 100644 --- a/src/commands/apps/delete.ts +++ b/src/commands/apps/delete.ts @@ -1,9 +1,9 @@ import { t } from "@vscode/l10n"; -import { RESTDeleteApiAppDeleteResult, Routes } from "discloud.app"; +import { type RESTDeleteApiAppDeleteResult, Routes } from "discloud.app"; import { ProgressLocation } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; -import AppTreeItem from "../../structures/AppTreeItem"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; import { requester } from "../../util"; diff --git a/src/commands/apps/import.ts b/src/commands/apps/import.ts index 0c88c64f..cf50a9d9 100644 --- a/src/commands/apps/import.ts +++ b/src/commands/apps/import.ts @@ -1,13 +1,13 @@ import { t } from "@vscode/l10n"; import * as AdmZip from "adm-zip"; -import { RESTGetApiAppBackupResult, Routes } from "discloud.app"; +import { type RESTGetApiAppBackupResult, Routes } from "discloud.app"; import { existsSync, mkdirSync, unlinkSync } from "fs"; import { writeFile } from "fs/promises"; import { join } from "path"; import { ProgressLocation, Uri, commands, window } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; -import AppTreeItem from "../../structures/AppTreeItem"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; import { requester } from "../../util"; diff --git a/src/commands/apps/logs.ts b/src/commands/apps/logs.ts index 687f26f5..66ee4d00 100644 --- a/src/commands/apps/logs.ts +++ b/src/commands/apps/logs.ts @@ -1,8 +1,8 @@ import { t } from "@vscode/l10n"; -import { RESTGetApiAppLogResult, Routes } from "discloud.app"; +import { type RESTGetApiAppLogResult, Routes } from "discloud.app"; import { ProgressLocation } from "vscode"; -import { TaskData } from "../../@types"; -import AppTreeItem from "../../structures/AppTreeItem"; +import { type TaskData } from "../../@types"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; import { requester } from "../../util"; diff --git a/src/commands/apps/mods/add.ts b/src/commands/apps/mods/add.ts index 101a1ff7..b9ac42c1 100644 --- a/src/commands/apps/mods/add.ts +++ b/src/commands/apps/mods/add.ts @@ -1,8 +1,8 @@ import { t } from "@vscode/l10n"; -import { ModPermissionsFlags, RESTPostApiAppTeamResult, Routes } from "discloud.app"; -import { ProgressLocation, QuickPickItem, window } from "vscode"; -import { TaskData } from "../../../@types"; -import AppTreeItem from "../../../structures/AppTreeItem"; +import { ModPermissionsFlags, type RESTPostApiAppTeamResult, Routes } from "discloud.app"; +import { ProgressLocation, type QuickPickItem, window } from "vscode"; +import { type TaskData } from "../../../@types"; +import type AppTreeItem from "../../../structures/AppTreeItem"; import Command from "../../../structures/Command"; import { requester } from "../../../util"; diff --git a/src/commands/apps/mods/edit.ts b/src/commands/apps/mods/edit.ts index 915c66e2..87f94ac8 100644 --- a/src/commands/apps/mods/edit.ts +++ b/src/commands/apps/mods/edit.ts @@ -1,8 +1,8 @@ import { t } from "@vscode/l10n"; -import { ModPermissionsFlags, RESTPutApiAppTeamResult, Routes } from "discloud.app"; -import { ProgressLocation, QuickPickItem, window } from "vscode"; -import { TaskData } from "../../../@types"; -import AppTreeItem from "../../../structures/AppTreeItem"; +import { ModPermissionsFlags, type RESTPutApiAppTeamResult, Routes } from "discloud.app"; +import { ProgressLocation, type QuickPickItem, window } from "vscode"; +import { type TaskData } from "../../../@types"; +import type AppTreeItem from "../../../structures/AppTreeItem"; import Command from "../../../structures/Command"; import { requester } from "../../../util"; diff --git a/src/commands/apps/mods/rem.ts b/src/commands/apps/mods/rem.ts index b9b56f6b..4bf89acb 100644 --- a/src/commands/apps/mods/rem.ts +++ b/src/commands/apps/mods/rem.ts @@ -1,8 +1,8 @@ import { t } from "@vscode/l10n"; -import { RESTDeleteApiAppTeamResult, Routes } from "discloud.app"; +import { type RESTDeleteApiAppTeamResult, Routes } from "discloud.app"; import { ProgressLocation } from "vscode"; -import { TaskData } from "../../../@types"; -import AppTreeItem from "../../../structures/AppTreeItem"; +import { type TaskData } from "../../../@types"; +import type AppTreeItem from "../../../structures/AppTreeItem"; import Command from "../../../structures/Command"; import { requester } from "../../../util"; diff --git a/src/commands/apps/profile/avatar.ts b/src/commands/apps/profile/avatar.ts index b4494ee3..1bf95b39 100644 --- a/src/commands/apps/profile/avatar.ts +++ b/src/commands/apps/profile/avatar.ts @@ -1,9 +1,9 @@ import { t } from "@vscode/l10n"; -import { BaseApiApp, DiscloudConfig, RESTApiBaseResult, Routes } from "discloud.app"; +import { type BaseApiApp, DiscloudConfig, type RESTApiBaseResult, Routes } from "discloud.app"; import { window } from "vscode"; -import { TaskData } from "../../../@types"; +import { type TaskData } from "../../../@types"; import extension from "../../../extension"; -import AppTreeItem from "../../../structures/AppTreeItem"; +import type AppTreeItem from "../../../structures/AppTreeItem"; import Command from "../../../structures/Command"; import { requester } from "../../../util"; diff --git a/src/commands/apps/profile/name.ts b/src/commands/apps/profile/name.ts index 4046b55a..6be6912a 100644 --- a/src/commands/apps/profile/name.ts +++ b/src/commands/apps/profile/name.ts @@ -1,9 +1,9 @@ import { t } from "@vscode/l10n"; -import { BaseApiApp, DiscloudConfig, RESTApiBaseResult, Routes } from "discloud.app"; +import { type BaseApiApp, DiscloudConfig, type RESTApiBaseResult, Routes } from "discloud.app"; import { window } from "vscode"; -import { TaskData } from "../../../@types"; +import { type TaskData } from "../../../@types"; import extension from "../../../extension"; -import AppTreeItem from "../../../structures/AppTreeItem"; +import type AppTreeItem from "../../../structures/AppTreeItem"; import Command from "../../../structures/Command"; import { requester } from "../../../util"; diff --git a/src/commands/apps/ram.ts b/src/commands/apps/ram.ts index 27e8b55b..6ef703ce 100644 --- a/src/commands/apps/ram.ts +++ b/src/commands/apps/ram.ts @@ -1,10 +1,10 @@ import { t } from "@vscode/l10n"; -import { RESTPutApiAppRamResult, Routes } from "discloud.app"; +import { type RESTPutApiAppRamResult, Routes } from "discloud.app"; import { ProgressLocation, window } from "vscode"; import { AppType } from "../../@enum"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; -import AppTreeItem from "../../structures/AppTreeItem"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; import { requester } from "../../util"; diff --git a/src/commands/apps/restart.ts b/src/commands/apps/restart.ts index 00b6675f..17d7a9fc 100644 --- a/src/commands/apps/restart.ts +++ b/src/commands/apps/restart.ts @@ -1,9 +1,9 @@ import { t } from "@vscode/l10n"; -import { RESTPutApiAppRestartResult, Routes } from "discloud.app"; +import { type RESTPutApiAppRestartResult, Routes } from "discloud.app"; import { ProgressLocation } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; -import AppTreeItem from "../../structures/AppTreeItem"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; import { requester } from "../../util"; diff --git a/src/commands/apps/start.ts b/src/commands/apps/start.ts index cf9b0104..158f084b 100644 --- a/src/commands/apps/start.ts +++ b/src/commands/apps/start.ts @@ -1,9 +1,9 @@ import { t } from "@vscode/l10n"; -import { RESTPutApiAppStartResult, Routes } from "discloud.app"; +import { type RESTPutApiAppStartResult, Routes } from "discloud.app"; import { ProgressLocation } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; -import AppTreeItem from "../../structures/AppTreeItem"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; import { requester } from "../../util"; diff --git a/src/commands/apps/stop.ts b/src/commands/apps/stop.ts index 65df9890..9384853c 100644 --- a/src/commands/apps/stop.ts +++ b/src/commands/apps/stop.ts @@ -1,9 +1,9 @@ import { t } from "@vscode/l10n"; -import { RESTPutApiAppStartResult, Routes } from "discloud.app"; +import { type RESTPutApiAppStartResult, Routes } from "discloud.app"; import { ProgressLocation } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; -import AppTreeItem from "../../structures/AppTreeItem"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; import { requester } from "../../util"; diff --git a/src/commands/apps/terminal.ts b/src/commands/apps/terminal.ts index 48b80c15..f8f1a2a3 100644 --- a/src/commands/apps/terminal.ts +++ b/src/commands/apps/terminal.ts @@ -1,7 +1,7 @@ -import { Uri, window } from "vscode"; -import { TaskData } from "../../@types"; +import { type Uri, window } from "vscode"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; -import AppTreeItem from "../../structures/AppTreeItem"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; export default class extends Command { diff --git a/src/commands/commit.ts b/src/commands/commit.ts index 4d82be2b..164d8be4 100644 --- a/src/commands/commit.ts +++ b/src/commands/commit.ts @@ -1,8 +1,8 @@ import { t } from "@vscode/l10n"; -import { RESTPutApiAppCommitResult, Routes, resolveFile } from "discloud.app"; +import { type RESTPutApiAppCommitResult, Routes, resolveFile } from "discloud.app"; import { join } from "path"; import { ProgressLocation, workspace } from "vscode"; -import { TaskData } from "../@types"; +import { type TaskData } from "../@types"; import extension from "../extension"; import Command from "../structures/Command"; import { FileSystem, Zip, requester } from "../util"; @@ -82,8 +82,9 @@ export default class extends Command { if ("status" in res) { this.showApiMessage(res); - picked.isApp ? - await extension.appTree.fetch() : + if (picked.isApp) + await extension.appTree.fetch(); + else await extension.teamAppTree.fetch(); if (res.logs) this.logger(picked.id, res.logs); diff --git a/src/commands/logs.ts b/src/commands/logs.ts index 312eee10..14bd2183 100644 --- a/src/commands/logs.ts +++ b/src/commands/logs.ts @@ -1,7 +1,7 @@ import { t } from "@vscode/l10n"; -import { DiscloudConfig, RESTGetApiAppLogResult, Routes } from "discloud.app"; +import { DiscloudConfig, type RESTGetApiAppLogResult, Routes } from "discloud.app"; import { ProgressLocation, window } from "vscode"; -import { TaskData } from "../@types"; +import { type TaskData } from "../@types"; import extension from "../extension"; import Command from "../structures/Command"; import { requester } from "../util"; diff --git a/src/commands/team/backup.ts b/src/commands/team/backup.ts index dc6b6892..bd8bc648 100644 --- a/src/commands/team/backup.ts +++ b/src/commands/team/backup.ts @@ -1,13 +1,13 @@ import { t } from "@vscode/l10n"; -import { RESTGetApiAppBackupResult, Routes } from "discloud.app"; +import { type RESTGetApiAppBackupResult, Routes } from "discloud.app"; import { existsSync, mkdirSync } from "fs"; import { writeFile } from "fs/promises"; import { join } from "path"; import { ProgressLocation, window } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; import Command from "../../structures/Command"; -import TeamAppTreeItem from "../../structures/TeamAppTreeItem"; +import type TeamAppTreeItem from "../../structures/TeamAppTreeItem"; import { requester } from "../../util"; export default class extends Command { diff --git a/src/commands/team/commit.ts b/src/commands/team/commit.ts index be9fcccb..f91629fa 100644 --- a/src/commands/team/commit.ts +++ b/src/commands/team/commit.ts @@ -1,11 +1,11 @@ import { t } from "@vscode/l10n"; -import { RESTPutApiAppCommitResult, Routes, resolveFile } from "discloud.app"; +import { type RESTPutApiAppCommitResult, Routes, resolveFile } from "discloud.app"; import { join } from "path"; import { ProgressLocation, workspace } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; import Command from "../../structures/Command"; -import TeamAppTreeItem from "../../structures/TeamAppTreeItem"; +import type TeamAppTreeItem from "../../structures/TeamAppTreeItem"; import { FileSystem, Zip, requester } from "../../util"; export default class extends Command { @@ -52,7 +52,7 @@ export default class extends Command { zipper = new Zip(savePath); zipper.appendUriList(found); await zipper.finalize(); - } catch (error: any) { + } catch { zipper?.destroy(); return; } @@ -61,7 +61,7 @@ export default class extends Command { try { form.append("file", await resolveFile(savePath, zipName)); if (!extension.isDebug) zipper.destroy(); - } catch (error: any) { + } catch { zipper.destroy(); return; } diff --git a/src/commands/team/copy.id.ts b/src/commands/team/copy.id.ts index 3ecec077..f636f0fd 100644 --- a/src/commands/team/copy.id.ts +++ b/src/commands/team/copy.id.ts @@ -1,9 +1,9 @@ import { t } from "@vscode/l10n"; import { env, window } from "vscode"; -import { TaskData } from "../../@types"; -import AppTreeItem from "../../structures/AppTreeItem"; +import { type TaskData } from "../../@types"; +import type AppTreeItem from "../../structures/AppTreeItem"; import Command from "../../structures/Command"; -import TeamAppTreeItem from "../../structures/TeamAppTreeItem"; +import type TeamAppTreeItem from "../../structures/TeamAppTreeItem"; export default class extends Command { constructor() { diff --git a/src/commands/team/import.ts b/src/commands/team/import.ts index 353fb320..962cd84b 100644 --- a/src/commands/team/import.ts +++ b/src/commands/team/import.ts @@ -1,14 +1,14 @@ import { t } from "@vscode/l10n"; import * as AdmZip from "adm-zip"; -import { RESTGetApiAppBackupResult, Routes } from "discloud.app"; +import { type RESTGetApiAppBackupResult, Routes } from "discloud.app"; import { existsSync, mkdirSync, unlinkSync } from "fs"; import { writeFile } from "fs/promises"; import { join } from "path"; import { ProgressLocation, Uri, commands, window } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; import Command from "../../structures/Command"; -import TeamAppTreeItem from "../../structures/TeamAppTreeItem"; +import type TeamAppTreeItem from "../../structures/TeamAppTreeItem"; import { requester } from "../../util"; export default class extends Command { diff --git a/src/commands/team/logs.ts b/src/commands/team/logs.ts index bebba346..9cb2aafd 100644 --- a/src/commands/team/logs.ts +++ b/src/commands/team/logs.ts @@ -1,9 +1,9 @@ import { t } from "@vscode/l10n"; -import { RESTGetApiAppLogResult, Routes } from "discloud.app"; +import { type RESTGetApiAppLogResult, Routes } from "discloud.app"; import { ProgressLocation } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import Command from "../../structures/Command"; -import TeamAppTreeItem from "../../structures/TeamAppTreeItem"; +import type TeamAppTreeItem from "../../structures/TeamAppTreeItem"; import { requester } from "../../util"; export default class extends Command { diff --git a/src/commands/team/ram.ts b/src/commands/team/ram.ts index 6e280128..0d4bb235 100644 --- a/src/commands/team/ram.ts +++ b/src/commands/team/ram.ts @@ -1,11 +1,11 @@ import { t } from "@vscode/l10n"; -import { RESTPutApiAppRamResult, Routes } from "discloud.app"; +import { type RESTPutApiAppRamResult, Routes } from "discloud.app"; import { ProgressLocation, window } from "vscode"; import { AppType } from "../../@enum"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; import Command from "../../structures/Command"; -import TeamAppTreeItem from "../../structures/TeamAppTreeItem"; +import type TeamAppTreeItem from "../../structures/TeamAppTreeItem"; import { requester } from "../../util"; export default class extends Command { diff --git a/src/commands/team/restart.ts b/src/commands/team/restart.ts index baf82ad6..38b8c16c 100644 --- a/src/commands/team/restart.ts +++ b/src/commands/team/restart.ts @@ -1,10 +1,10 @@ import { t } from "@vscode/l10n"; -import { RESTPutApiAppRestartResult, Routes } from "discloud.app"; +import { type RESTPutApiAppRestartResult, Routes } from "discloud.app"; import { ProgressLocation } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; import Command from "../../structures/Command"; -import TeamAppTreeItem from "../../structures/TeamAppTreeItem"; +import type TeamAppTreeItem from "../../structures/TeamAppTreeItem"; import { requester } from "../../util"; export default class extends Command { diff --git a/src/commands/team/start.ts b/src/commands/team/start.ts index 2c87dcef..12251346 100644 --- a/src/commands/team/start.ts +++ b/src/commands/team/start.ts @@ -1,10 +1,10 @@ import { t } from "@vscode/l10n"; -import { RESTPutApiAppStartResult, Routes } from "discloud.app"; +import { type RESTPutApiAppStartResult, Routes } from "discloud.app"; import { ProgressLocation } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; import Command from "../../structures/Command"; -import TeamAppTreeItem from "../../structures/TeamAppTreeItem"; +import type TeamAppTreeItem from "../../structures/TeamAppTreeItem"; import { requester } from "../../util"; export default class extends Command { diff --git a/src/commands/team/status.ts b/src/commands/team/status.ts index 63f7f768..1413cdaa 100644 --- a/src/commands/team/status.ts +++ b/src/commands/team/status.ts @@ -1,9 +1,9 @@ import { t } from "@vscode/l10n"; import { ProgressLocation } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; import Command from "../../structures/Command"; -import TeamAppTreeItem from "../../structures/TeamAppTreeItem"; +import type TeamAppTreeItem from "../../structures/TeamAppTreeItem"; export default class extends Command { constructor() { diff --git a/src/commands/team/stop.ts b/src/commands/team/stop.ts index 64206988..f0e44a9a 100644 --- a/src/commands/team/stop.ts +++ b/src/commands/team/stop.ts @@ -1,10 +1,10 @@ import { t } from "@vscode/l10n"; -import { RESTPutApiAppStartResult, Routes } from "discloud.app"; +import { type RESTPutApiAppStartResult, Routes } from "discloud.app"; import { ProgressLocation } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; import Command from "../../structures/Command"; -import TeamAppTreeItem from "../../structures/TeamAppTreeItem"; +import type TeamAppTreeItem from "../../structures/TeamAppTreeItem"; import { requester } from "../../util"; export default class extends Command { diff --git a/src/commands/upload.ts b/src/commands/upload.ts index 7e5fa86c..26f8221f 100644 --- a/src/commands/upload.ts +++ b/src/commands/upload.ts @@ -1,8 +1,8 @@ import { t } from "@vscode/l10n"; -import { DiscloudConfig, RESTPostApiUploadResult, Routes, resolveFile } from "discloud.app"; +import { DiscloudConfig, type RESTPostApiUploadResult, Routes, resolveFile } from "discloud.app"; import { join } from "path"; import { ProgressLocation, Uri, window, workspace } from "vscode"; -import { TaskData } from "../@types"; +import { type TaskData } from "../@types"; import extension from "../extension"; import Command from "../structures/Command"; import { FileSystem, requester, Zip } from "../util"; diff --git a/src/commands/user/set.locale.ts b/src/commands/user/set.locale.ts index 36602545..3caa82c7 100644 --- a/src/commands/user/set.locale.ts +++ b/src/commands/user/set.locale.ts @@ -1,6 +1,6 @@ import { t } from "@vscode/l10n"; import { commands, window } from "vscode"; -import { TaskData } from "../../@types"; +import { type TaskData } from "../../@types"; import extension from "../../extension"; import Command from "../../structures/Command"; diff --git a/src/events/activate.ts b/src/events/activate.ts index 31e8d0b8..b06ae362 100644 --- a/src/events/activate.ts +++ b/src/events/activate.ts @@ -1,4 +1,4 @@ -import { BaseApiApp } from "discloud.app"; +import { type BaseApiApp } from "discloud.app"; import { workspace } from "vscode"; import extension from "../extension"; import CompletionItemProvider from "../providers/CompletionItemProvider"; diff --git a/src/extension.ts b/src/extension.ts index da53c2cc..12ec5f20 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,4 +1,4 @@ -import { ExtensionContext, window } from "vscode"; +import { type ExtensionContext, window } from "vscode"; import "./localize"; import Discloud from "./structures/Discloud"; diff --git a/src/providers/AppTreeDataProvider.ts b/src/providers/AppTreeDataProvider.ts index 3b615bad..8a5232e7 100644 --- a/src/providers/AppTreeDataProvider.ts +++ b/src/providers/AppTreeDataProvider.ts @@ -1,7 +1,7 @@ import { t } from "@vscode/l10n"; -import { ApiStatusApp, BaseApiApp, RESTGetApiAppAllStatusResult, RESTGetApiAppStatusResult, Routes } from "discloud.app"; -import { ProviderResult, TreeItem, TreeItemCollapsibleState, commands, window } from "vscode"; -import { ApiVscodeApp } from "../@types"; +import { type ApiStatusApp, type BaseApiApp, type RESTGetApiAppAllStatusResult, type RESTGetApiAppStatusResult, Routes } from "discloud.app"; +import { type ProviderResult, TreeItem, TreeItemCollapsibleState, commands, window } from "vscode"; +import { type ApiVscodeApp } from "../@types"; import extension from "../extension"; import AppTreeItem from "../structures/AppTreeItem"; import { compareBooleans, compareNumbers, getIconPath, requester } from "../util"; diff --git a/src/providers/BaseLanguageProvider.ts b/src/providers/BaseLanguageProvider.ts index 7b5db1dd..6e79edc8 100644 --- a/src/providers/BaseLanguageProvider.ts +++ b/src/providers/BaseLanguageProvider.ts @@ -55,7 +55,7 @@ export default class BaseLanguageProvider { continue; case "AUTORESTART": if (["true", "false"].includes(value)) { - // eslint-disable-next-line eqeqeq + obj[key] = value == "true"; } continue; diff --git a/src/providers/BaseTreeDataProvider.ts b/src/providers/BaseTreeDataProvider.ts index 5c643c07..bb030063 100644 --- a/src/providers/BaseTreeDataProvider.ts +++ b/src/providers/BaseTreeDataProvider.ts @@ -1,6 +1,6 @@ -import { CancellationToken, EventEmitter, ProviderResult, TreeDataProvider, TreeItem, window } from "vscode"; +import { type CancellationToken, EventEmitter, type ProviderResult, type TreeDataProvider, type TreeItem, window } from "vscode"; import extension from "../extension"; -import BaseTreeItem from "../structures/BaseTreeItem"; +import type BaseTreeItem from "../structures/BaseTreeItem"; import DisposableMap from "../structures/DisposableMap"; export default abstract class BaseTreeDataProvider> implements TreeDataProvider { diff --git a/src/providers/LanguageConfigurationProvider.ts b/src/providers/LanguageConfigurationProvider.ts index 3a5b9cd4..e0acfa08 100644 --- a/src/providers/LanguageConfigurationProvider.ts +++ b/src/providers/LanguageConfigurationProvider.ts @@ -1,8 +1,8 @@ import { t } from "@vscode/l10n"; import { existsSync } from "fs"; import { dirname, join } from "path"; -import { Diagnostic, DiagnosticCollection, DiagnosticSeverity, Position, Range, TextDocument, languages, window, workspace } from "vscode"; -import { ProviderOptions } from "../@types"; +import { type Diagnostic, type DiagnosticCollection, DiagnosticSeverity, Position, Range, type TextDocument, languages, window, workspace } from "vscode"; +import { type ProviderOptions } from "../@types"; import extension from "../extension"; import BaseLanguageProvider from "./BaseLanguageProvider"; diff --git a/src/providers/TeamAppTreeDataProvider.ts b/src/providers/TeamAppTreeDataProvider.ts index b3b82eb0..0927a49a 100644 --- a/src/providers/TeamAppTreeDataProvider.ts +++ b/src/providers/TeamAppTreeDataProvider.ts @@ -1,6 +1,6 @@ import { t } from "@vscode/l10n"; -import { ApiStatusApp, ApiTeamApps, BaseApiApp, RESTGetApiAppAllStatusResult, RESTGetApiAppStatusResult, RESTGetApiTeamResult, Routes } from "discloud.app"; -import { ProviderResult, TreeItem, TreeItemCollapsibleState, commands, window } from "vscode"; +import { type ApiStatusApp, type ApiTeamApps, type BaseApiApp, type RESTGetApiAppAllStatusResult, type RESTGetApiAppStatusResult, type RESTGetApiTeamResult, Routes } from "discloud.app"; +import { type ProviderResult, TreeItem, TreeItemCollapsibleState, commands, window } from "vscode"; import extension from "../extension"; import TeamAppTreeItem from "../structures/TeamAppTreeItem"; import { compareBooleans, compareNumbers, getIconPath, requester } from "../util"; diff --git a/src/providers/UserTreeDataProvider.ts b/src/providers/UserTreeDataProvider.ts index 474e670d..6cd13a6a 100644 --- a/src/providers/UserTreeDataProvider.ts +++ b/src/providers/UserTreeDataProvider.ts @@ -1,5 +1,5 @@ import UserTreeItem from "../structures/UserTreeItem"; -import VSUser from "../structures/VSUser"; +import type VSUser from "../structures/VSUser"; import BaseTreeDataProvider from "./BaseTreeDataProvider"; export default class UserTreeDataProvider extends BaseTreeDataProvider { diff --git a/src/structures/AppChildTreeItem.ts b/src/structures/AppChildTreeItem.ts index 3c4c45cb..17f3b8fe 100644 --- a/src/structures/AppChildTreeItem.ts +++ b/src/structures/AppChildTreeItem.ts @@ -1,5 +1,5 @@ -import { AppType } from "../@enum"; -import { AppChildTreeItemData } from "../@types"; +import { type AppType } from "../@enum"; +import { type AppChildTreeItemData } from "../@types"; import { getIconPath } from "../util"; import BaseChildTreeItem from "./BaseChildTreeItem"; diff --git a/src/structures/AppTreeItem.ts b/src/structures/AppTreeItem.ts index fd88eb29..12d32b60 100644 --- a/src/structures/AppTreeItem.ts +++ b/src/structures/AppTreeItem.ts @@ -1,8 +1,8 @@ import { t } from "@vscode/l10n"; -import { ApiStatusApp } from "discloud.app"; -import { LogOutputChannel, TreeItemCollapsibleState, Uri, window } from "vscode"; +import { type ApiStatusApp } from "discloud.app"; +import { type LogOutputChannel, TreeItemCollapsibleState, Uri, window } from "vscode"; import { AppType } from "../@enum"; -import { ApiVscodeApp, AppChildTreeItemData, AppTreeItemData } from "../@types"; +import { type ApiVscodeApp, type AppChildTreeItemData, type AppTreeItemData } from "../@types"; import extension from "../extension"; import { calculatePercentage, getIconName, getIconPath } from "../util"; import AppChildTreeItem from "./AppChildTreeItem"; diff --git a/src/structures/BaseChildTreeItem.ts b/src/structures/BaseChildTreeItem.ts index f811ffb7..72724442 100644 --- a/src/structures/BaseChildTreeItem.ts +++ b/src/structures/BaseChildTreeItem.ts @@ -1,5 +1,5 @@ -import { TreeItem, TreeItemCollapsibleState, TreeItemLabel } from "vscode"; -import { BaseChildTreeItemData } from "../@types"; +import { TreeItem, type TreeItemCollapsibleState, type TreeItemLabel } from "vscode"; +import { type BaseChildTreeItemData } from "../@types"; export default class BaseChildTreeItem extends TreeItem { declare children: Map; diff --git a/src/structures/BaseStatusBarItem.ts b/src/structures/BaseStatusBarItem.ts index ce0014c4..010be8c1 100644 --- a/src/structures/BaseStatusBarItem.ts +++ b/src/structures/BaseStatusBarItem.ts @@ -1,4 +1,4 @@ -import { StatusBarItem, window } from "vscode"; +import { type StatusBarItem, window } from "vscode"; import extension from "../extension"; import { bindFunctions } from "../util"; diff --git a/src/structures/BaseTreeItem.ts b/src/structures/BaseTreeItem.ts index 86b3092b..a16861fa 100644 --- a/src/structures/BaseTreeItem.ts +++ b/src/structures/BaseTreeItem.ts @@ -1,4 +1,4 @@ -import { Disposable, TreeItem, TreeItemCollapsibleState, TreeItemLabel } from "vscode"; +import { type Disposable, TreeItem, type TreeItemCollapsibleState, type TreeItemLabel } from "vscode"; import DisposableMap from "./DisposableMap"; export default abstract class BaseTreeItem extends TreeItem { diff --git a/src/structures/Command.ts b/src/structures/Command.ts index a69ffe77..834c8dae 100644 --- a/src/structures/Command.ts +++ b/src/structures/Command.ts @@ -1,12 +1,12 @@ import { t } from "@vscode/l10n"; -import { DiscloudConfig, ModPermissionsBF, ModPermissionsFlags, ModPermissionsResolvable, RESTGetApiAppTeamResult, RESTGetApiTeamResult, Routes } from "discloud.app"; -import { LogOutputChannel, QuickPickItem, Uri, window } from "vscode"; -import { CommandData, TaskData } from "../@types"; +import { DiscloudConfig, ModPermissionsBF, ModPermissionsFlags, type ModPermissionsResolvable, type RESTGetApiAppTeamResult, type RESTGetApiTeamResult, Routes } from "discloud.app"; +import { type LogOutputChannel, type QuickPickItem, type Uri, window } from "vscode"; +import { type CommandData, type TaskData } from "../@types"; import extension from "../extension"; import { requester } from "../util"; import AppTreeItem from "./AppTreeItem"; -import TeamAppTreeItem from "./TeamAppTreeItem"; -import VSUser from "./VSUser"; +import type TeamAppTreeItem from "./TeamAppTreeItem"; +import type VSUser from "./VSUser"; export default abstract class Command { constructor(public data: CommandData = {}) { } diff --git a/src/structures/CustomDomainTreeItem.ts b/src/structures/CustomDomainTreeItem.ts index d647c033..2116fe9c 100644 --- a/src/structures/CustomDomainTreeItem.ts +++ b/src/structures/CustomDomainTreeItem.ts @@ -1,6 +1,6 @@ import { t } from "@vscode/l10n"; import { TreeItemCollapsibleState } from "vscode"; -import { CustomDomainTreeItemData } from "../@types"; +import { type CustomDomainTreeItemData } from "../@types"; import { getIconName, getIconPath } from "../util"; import BaseTreeItem from "./BaseTreeItem"; diff --git a/src/structures/Discloud.ts b/src/structures/Discloud.ts index 6a4ea2e9..df6c5e59 100644 --- a/src/structures/Discloud.ts +++ b/src/structures/Discloud.ts @@ -2,15 +2,15 @@ import { t } from "@vscode/l10n"; import { EventEmitter } from "events"; import { existsSync, readdirSync } from "fs"; import { extname, join } from "path"; -import { ExtensionContext, LogOutputChannel, OutputChannel, StatusBarAlignment, commands, window, workspace } from "vscode"; -import { Events, TaskData } from "../@types"; +import { type ExtensionContext, type LogOutputChannel, type OutputChannel, StatusBarAlignment, commands, window, workspace } from "vscode"; +import { type Events, type TaskData } from "../@types"; import { logger } from "../extension"; import AppTreeDataProvider from "../providers/AppTreeDataProvider"; import CustomDomainTreeDataProvider from "../providers/CustomDomainTreeDataProvider"; import SubDomainTreeDataProvider from "../providers/SubDomainTreeDataProvider"; import TeamAppTreeDataProvider from "../providers/TeamAppTreeDataProvider"; import UserTreeDataProvider from "../providers/UserTreeDataProvider"; -import Command from "./Command"; +import type Command from "./Command"; import DiscloudStatusBarItem from "./DiscloudStatusBarItem"; import VSUser from "./VSUser"; diff --git a/src/structures/DiscloudStatusBarItem.ts b/src/structures/DiscloudStatusBarItem.ts index 0e9e0b7a..cda1737e 100644 --- a/src/structures/DiscloudStatusBarItem.ts +++ b/src/structures/DiscloudStatusBarItem.ts @@ -1,6 +1,6 @@ import { t } from "@vscode/l10n"; import { DiscloudConfig } from "discloud.app"; -import { StatusBarItem, ThemeColor, workspace } from "vscode"; +import { type StatusBarItem, ThemeColor, workspace } from "vscode"; import extension from "../extension"; import { tokenIsValid } from "../util"; import BaseStatusBarItem from "./BaseStatusBarItem"; diff --git a/src/structures/SubDomainTreeItem.ts b/src/structures/SubDomainTreeItem.ts index d4178faf..c82df410 100644 --- a/src/structures/SubDomainTreeItem.ts +++ b/src/structures/SubDomainTreeItem.ts @@ -1,6 +1,6 @@ import { t } from "@vscode/l10n"; import { TreeItemCollapsibleState } from "vscode"; -import { SubDomainTreeItemData } from "../@types"; +import { type SubDomainTreeItemData } from "../@types"; import extension from "../extension"; import { getIconName, getIconPath } from "../util"; import BaseTreeItem from "./BaseTreeItem"; diff --git a/src/structures/TeamAppChildTreeItem.ts b/src/structures/TeamAppChildTreeItem.ts index 211849c0..4f7bae49 100644 --- a/src/structures/TeamAppChildTreeItem.ts +++ b/src/structures/TeamAppChildTreeItem.ts @@ -1,5 +1,5 @@ -import { AppType } from "../@enum"; -import { TeamAppChildTreeItemData } from "../@types"; +import { type AppType } from "../@enum"; +import { type TeamAppChildTreeItemData } from "../@types"; import BaseChildTreeItem from "./BaseChildTreeItem"; export default class TeamAppChildTreeItem extends BaseChildTreeItem { diff --git a/src/structures/TeamAppTreeItem.ts b/src/structures/TeamAppTreeItem.ts index c45f4005..badf9960 100644 --- a/src/structures/TeamAppTreeItem.ts +++ b/src/structures/TeamAppTreeItem.ts @@ -1,8 +1,8 @@ import { t } from "@vscode/l10n"; -import { /* ApiStatusApp, */ ApiStatusApp, ApiTeamApps, BaseApiApp, ModPermissionsBF, ModPermissionsResolvable } from "discloud.app"; -import { LogOutputChannel, TreeItemCollapsibleState, window } from "vscode"; +import { /* ApiStatusApp, */ type ApiStatusApp, type ApiTeamApps, type BaseApiApp, ModPermissionsBF, type ModPermissionsResolvable } from "discloud.app"; +import { type LogOutputChannel, TreeItemCollapsibleState, window } from "vscode"; import { AppType } from "../@enum"; -import { TeamAppChildTreeItemData, TeamAppTreeItemData } from "../@types"; +import { type TeamAppChildTreeItemData, type TeamAppTreeItemData } from "../@types"; import { calculatePercentage, getIconName, getIconPath } from "../util"; import BaseTreeItem from "./BaseTreeItem"; import TeamAppChildTreeItem from "./TeamAppChildTreeItem"; diff --git a/src/structures/UserChildTreeItem.ts b/src/structures/UserChildTreeItem.ts index b0ea5498..a2d640cf 100644 --- a/src/structures/UserChildTreeItem.ts +++ b/src/structures/UserChildTreeItem.ts @@ -1,4 +1,4 @@ -import { UserTreeItemData } from "../@types"; +import { type UserTreeItemData } from "../@types"; import BaseChildTreeItem from "./BaseChildTreeItem"; export default class UserChildTreeItem extends BaseChildTreeItem { diff --git a/src/structures/UserTreeItem.ts b/src/structures/UserTreeItem.ts index 6d6add27..534cc780 100644 --- a/src/structures/UserTreeItem.ts +++ b/src/structures/UserTreeItem.ts @@ -1,6 +1,6 @@ import { t } from "@vscode/l10n"; import { TreeItemCollapsibleState } from "vscode"; -import { ApiVscodeUser, UserTreeItemData } from "../@types"; +import { type ApiVscodeUser, type UserTreeItemData } from "../@types"; import BaseTreeItem from "./BaseTreeItem"; import UserChildTreeItem from "./UserChildTreeItem"; diff --git a/src/structures/VSUser.ts b/src/structures/VSUser.ts index 194c6835..cd17ae4e 100644 --- a/src/structures/VSUser.ts +++ b/src/structures/VSUser.ts @@ -1,5 +1,5 @@ -import { RESTPutApiLocaleResult, Routes } from "discloud.app"; -import { ApiVscodeApp, ApiVscodeUser, RESTGetApiVscode } from "../@types"; +import { type RESTPutApiLocaleResult, Routes } from "discloud.app"; +import { type ApiVscodeApp, type ApiVscodeUser, type RESTGetApiVscode } from "../@types"; import extension from "../extension"; import { requester } from "../util"; diff --git a/src/util/API.ts b/src/util/API.ts index 15afaabb..2a65accd 100644 --- a/src/util/API.ts +++ b/src/util/API.ts @@ -1,10 +1,10 @@ import { t } from "@vscode/l10n"; -import { RouteLike, discloud } from "discloud.app"; +import { type RouteLike, discloud } from "discloud.app"; import { EventEmitter } from "events"; import { decode } from "jsonwebtoken"; import { setTimeout as sleep } from "timers/promises"; import { window } from "vscode"; -import { RequestOptions } from "../@types"; +import { type RequestOptions } from "../@types"; import extension, { logger } from "../extension"; import { DEFAULT_USER_AGENT } from "./constants"; diff --git a/src/util/FileSystem.ts b/src/util/FileSystem.ts index 6736ac45..8797d429 100644 --- a/src/util/FileSystem.ts +++ b/src/util/FileSystem.ts @@ -1,6 +1,6 @@ import { existsSync, statSync } from "fs"; import { join } from "path"; -import { FileType, Uri, commands, env, workspace } from "vscode"; +import { FileType, type Uri, commands, env, workspace } from "vscode"; import { logger } from "../extension"; import { ALL_BLOCKED_FILES } from "./constants"; diff --git a/src/util/Zip.ts b/src/util/Zip.ts index a8eff4cf..95490b77 100644 --- a/src/util/Zip.ts +++ b/src/util/Zip.ts @@ -1,7 +1,7 @@ -import { Archiver, ArchiverOptions, create } from "archiver"; -import { Stats, WriteStream, createWriteStream, existsSync, rmSync, statSync, unlinkSync, writeFileSync } from "fs"; +import { type Archiver, type ArchiverOptions, create } from "archiver"; +import { type Stats, type WriteStream, createWriteStream, existsSync, rmSync, statSync, unlinkSync, writeFileSync } from "fs"; import { isAbsolute, join, relative } from "path"; -import { Uri, workspace } from "vscode"; +import { type Uri, workspace } from "vscode"; import { logger } from "../extension"; export interface AppendOptions {