diff --git a/eslint.config.mjs b/eslint.config.mjs index 544de86aa..eb26d3c5d 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -5,13 +5,14 @@ */ import stylistic from "@stylistic/eslint-plugin"; +import { defineConfig } from "eslint/config"; import react from "eslint-plugin-react"; import header from "eslint-plugin-simple-header"; import simpleImportSort from "eslint-plugin-simple-import-sort"; import unusedImports from "eslint-plugin-unused-imports"; import tseslint from "typescript-eslint"; -export default tseslint.config( +export default defineConfig( { ignores: ["dist", "browser", "packages/vencord-types"] }, { files: ["src/**/*.{tsx,ts,mts,mjs,js,jsx}", "eslint.config.mjs"], @@ -86,6 +87,7 @@ export default tseslint.config( "@stylistic/object-curly-spacing": ["error", "always"], "@stylistic/spaced-comment": ["error", "always", { "markers": ["!"] }], "@stylistic/no-extra-semi": "error", + "no-multiple-empty-lines": ["error", { "max": 1, "maxBOF": 0, "maxEOF": 0 }], // TS Rules "@stylistic/function-call-spacing": ["error", "never"], diff --git a/src/api/Commands/index.ts b/src/api/Commands/index.ts index b52df9424..b609fe5bf 100644 --- a/src/api/Commands/index.ts +++ b/src/api/Commands/index.ts @@ -88,7 +88,6 @@ export const _handleCommand = function (cmd: VencordCommand, args: CommandArgume } } as never; - /** * Prepare a Command Option for Discord by filling missing fields * @param opt diff --git a/src/api/MessageEvents.ts b/src/api/MessageEvents.ts index bf4efd2d5..dc5d3b8df 100644 --- a/src/api/MessageEvents.ts +++ b/src/api/MessageEvents.ts @@ -106,7 +106,6 @@ export function removeMessagePreEditListener(listener: MessageEditListener) { return editListeners.delete(listener); } - // Message clicks export type MessageClickListener = (message: Message, channel: Channel, event: MouseEvent) => void; diff --git a/src/api/Styles.ts b/src/api/Styles.ts index ea3324879..5b91c1958 100644 --- a/src/api/Styles.ts +++ b/src/api/Styles.ts @@ -193,5 +193,3 @@ export const compileStyle = (style: Style) => { return className ? classNameToSelector(className) : match; }); }; - - diff --git a/src/components/BaseText.tsx b/src/components/BaseText.tsx index 0f79adb1b..78b961ea9 100644 --- a/src/components/BaseText.tsx +++ b/src/components/BaseText.tsx @@ -98,7 +98,6 @@ export function BaseText(props: BaseTextProps): Re ); } - // #region Old compatibility export const TextCompat: DiscordText = function TextCompat({ color, variant, ...restProps }) { diff --git a/src/components/Heart.tsx b/src/components/Heart.tsx index 8f9f9a31b..600a4c723 100644 --- a/src/components/Heart.tsx +++ b/src/components/Heart.tsx @@ -37,4 +37,3 @@ export function Heart(props: SVGProps) { ); } - diff --git a/src/components/Icons.tsx b/src/components/Icons.tsx index 34e2d2e2d..7faf34756 100644 --- a/src/components/Icons.tsx +++ b/src/components/Icons.tsx @@ -285,7 +285,6 @@ export function PluginIcon(props: IconProps) { ); } - export function PlusIcon(props: IconProps) { return ( ); } - diff --git a/src/components/settings/tabs/plugins/components/SliderSetting.tsx b/src/components/settings/tabs/plugins/components/SliderSetting.tsx index 85a52da29..847cb7b53 100644 --- a/src/components/settings/tabs/plugins/components/SliderSetting.tsx +++ b/src/components/settings/tabs/plugins/components/SliderSetting.tsx @@ -52,4 +52,3 @@ export function SliderSetting({ option, pluginSettings, definedSettings, id, onC ); } - diff --git a/src/components/settings/tabs/plugins/index.tsx b/src/components/settings/tabs/plugins/index.tsx index 939276c02..bd2d5dfba 100644 --- a/src/components/settings/tabs/plugins/index.tsx +++ b/src/components/settings/tabs/plugins/index.tsx @@ -352,7 +352,6 @@ export default function PluginSettings() { } } - // Code directly taken from supportHelper.tsx const { totalStockPlugins, totalUserPlugins, enabledStockPlugins, enabledUserPlugins, enabledPlugins } = useMemo(() => { const isApiPlugin = (plugin: string) => plugin.endsWith("API") || Plugins[plugin].required; @@ -451,7 +450,6 @@ export default function PluginSettings() { : } - diff --git a/src/equicordplugins/absRPC/index.tsx b/src/equicordplugins/absRPC/index.tsx index fcf29d36f..8f389f20c 100644 --- a/src/equicordplugins/absRPC/index.tsx +++ b/src/equicordplugins/absRPC/index.tsx @@ -13,7 +13,6 @@ import { Logger } from "@utils/Logger"; import definePlugin, { OptionType } from "@utils/types"; import { ApplicationAssetUtils, FluxDispatcher, showToast } from "@webpack/common"; - interface ActivityAssets { large_image?: string; large_text?: string; @@ -50,8 +49,6 @@ interface MediaData { isFinished?: boolean; } - - const settings = definePluginSettings({ serverUrl: { description: "AudioBookShelf server URL (e.g., https://abs.example.com)", diff --git a/src/equicordplugins/allCallTimers/index.tsx b/src/equicordplugins/allCallTimers/index.tsx index 9d60c2aef..01d95f0a0 100644 --- a/src/equicordplugins/allCallTimers/index.tsx +++ b/src/equicordplugins/allCallTimers/index.tsx @@ -61,7 +61,6 @@ export const settings = definePluginSettings({ } }); - // Save the join time of all users in a Map type userJoinData = { channelId: string, time: number; guildId: string; }; const userJoinTimes = new Map(); diff --git a/src/equicordplugins/bannersEverywhere/index.tsx b/src/equicordplugins/bannersEverywhere/index.tsx index 1ddb255d8..2c7188d34 100644 --- a/src/equicordplugins/bannersEverywhere/index.tsx +++ b/src/equicordplugins/bannersEverywhere/index.tsx @@ -43,7 +43,6 @@ const DATASTORE_KEY = "bannersEverywhere"; const UserProfileStore = findStoreLazy("UserProfileStore"); - export default definePlugin({ name: "BannersEverywhere", description: "Displays banners in the member list ", diff --git a/src/equicordplugins/baseDecoder/index.tsx b/src/equicordplugins/baseDecoder/index.tsx index d645c2b2a..35ba3d701 100644 --- a/src/equicordplugins/baseDecoder/index.tsx +++ b/src/equicordplugins/baseDecoder/index.tsx @@ -36,7 +36,6 @@ function DecodeIcon() { ); } - function isValidUtf8String(str) { try { new TextDecoder("utf-8", { fatal: true }).decode(new Uint8Array(str.split("").map(char => char.charCodeAt(0)))); @@ -64,7 +63,6 @@ function decodeBase64Strings(base64Strings) { }).filter(decoded => decoded !== null); } - function openDecodedBase64Modal(decodedContent) { const key = openModal(props => ( diff --git a/src/equicordplugins/commandPalette/registry.tsx b/src/equicordplugins/commandPalette/registry.tsx index 4e028b13d..bd4dcc8e8 100644 --- a/src/equicordplugins/commandPalette/registry.tsx +++ b/src/equicordplugins/commandPalette/registry.tsx @@ -61,10 +61,6 @@ interface ChatBarCommandState { getters: Set<() => HTMLElement | null>; } - - - - export const chatBarCommandStates = new Map(); export const chatBarCommandStatesById = new Map(); const CHATBAR_DATASET_KEY = "vcCommandPaletteId"; @@ -150,12 +146,6 @@ export function wrapChatBarChildren(children: ReactNode): ReactNode { return wrappedChildren; } - - - - - - interface ChatBarCommandBridgeProps { element: ReactElement; buttonKey: string; diff --git a/src/equicordplugins/components.dev/components/ComponentsTab.tsx b/src/equicordplugins/components.dev/components/ComponentsTab.tsx index f3d0f141b..13f1b160b 100644 --- a/src/equicordplugins/components.dev/components/ComponentsTab.tsx +++ b/src/equicordplugins/components.dev/components/ComponentsTab.tsx @@ -55,7 +55,6 @@ import TooltipTab from "./tabs/TooltipTab"; import TypographyTab from "./tabs/TypographyTab"; import UserSummaryItemTab from "./tabs/UserSummaryItemTab"; - const TABS = [ { id: "accordion", label: "Accordion" }, { id: "anchor", label: "Anchor" }, diff --git a/src/equicordplugins/copyProfileColors/index.tsx b/src/equicordplugins/copyProfileColors/index.tsx index 725c788e4..256e86994 100644 --- a/src/equicordplugins/copyProfileColors/index.tsx +++ b/src/equicordplugins/copyProfileColors/index.tsx @@ -28,7 +28,6 @@ function getProfileColors(userId) { } } - function copyProfileColors(userId) { const colors = getProfileColors(userId); diff --git a/src/equicordplugins/customUserColors/SetColorModal.tsx b/src/equicordplugins/customUserColors/SetColorModal.tsx index eae219390..ba51afa70 100644 --- a/src/equicordplugins/customUserColors/SetColorModal.tsx +++ b/src/equicordplugins/customUserColors/SetColorModal.tsx @@ -22,7 +22,6 @@ export function SetColorModal({ id, modalProps }: { id: string, modalProps: Moda const [colorPickerColor, setColorPickerColor] = useState(initialColor); // hex color code as an int (NOT rgb 0-255) - function setUserColor(color: number) { setColorPickerColor(color); } diff --git a/src/equicordplugins/customUserColors/index.tsx b/src/equicordplugins/customUserColors/index.tsx index b09bd0b9a..0c8eacf15 100644 --- a/src/equicordplugins/customUserColors/index.tsx +++ b/src/equicordplugins/customUserColors/index.tsx @@ -21,7 +21,6 @@ import { SetColorModal } from "./SetColorModal"; export const DATASTORE_KEY = "equicord-customcolors"; export let colors: Record = {}; - (async () => { colors = await get>(DATASTORE_KEY) || {}; })(); diff --git a/src/equicordplugins/discordDevBanner/components/FormatSetting.tsx b/src/equicordplugins/discordDevBanner/components/FormatSetting.tsx index 0b411e8ea..48613b21e 100644 --- a/src/equicordplugins/discordDevBanner/components/FormatSetting.tsx +++ b/src/equicordplugins/discordDevBanner/components/FormatSetting.tsx @@ -9,7 +9,6 @@ import { useState } from "@webpack/common"; import { makeDevBanner, settings, settingVariables } from "."; - export function FormatSetting(setValue) { const { format } = settings.store; const [state, setState] = useState(format ?? "{buildChannel} {buildNumber} ({buildHash}) | {equicordName} {equicordVersion} ({equicordHash})"); diff --git a/src/equicordplugins/discordDevBanner/components/icons.tsx b/src/equicordplugins/discordDevBanner/components/icons.tsx index d19cbb665..e373a99fc 100644 --- a/src/equicordplugins/discordDevBanner/components/icons.tsx +++ b/src/equicordplugins/discordDevBanner/components/icons.tsx @@ -33,7 +33,6 @@ export const ClientIcon = (props: React.PropsWithChildren ); - export const DevBannerIcon = (props: React.PropsWithChildren>) => ( { }); } - export async function toggleEnabled(name: string) { let restartNeeded = false; function onRestartNeeded() { diff --git a/src/equicordplugins/findReply/index.tsx b/src/equicordplugins/findReply/index.tsx index 088b33af8..e76cf8f69 100644 --- a/src/equicordplugins/findReply/index.tsx +++ b/src/equicordplugins/findReply/index.tsx @@ -28,7 +28,6 @@ import { Root } from "react-dom/client"; import ReplyNavigator from "./ReplyNavigator"; import styles from "./styles.css?managed"; - export const jumper: any = findByPropsLazy("jumpToMessage"); const FindReplyIcon = () => { return ); } - diff --git a/src/equicordplugins/gifCollections/index.tsx b/src/equicordplugins/gifCollections/index.tsx index 5c428558a..7c74116bf 100644 --- a/src/equicordplugins/gifCollections/index.tsx +++ b/src/equicordplugins/gifCollections/index.tsx @@ -91,7 +91,6 @@ const addCollectionContextMenuPatch: NavContextMenuPatchCallback = (children, pr } }; - export const settings = definePluginSettings({ itemPrefix: { description: "The prefix for gif items", diff --git a/src/equicordplugins/gifCollections/utils/getGif.ts b/src/equicordplugins/gifCollections/utils/getGif.ts index f271822f5..4b2b645fc 100644 --- a/src/equicordplugins/gifCollections/utils/getGif.ts +++ b/src/equicordplugins/gifCollections/utils/getGif.ts @@ -27,7 +27,6 @@ export function getGifByTarget(url: string, target?: HTMLDivElement | null): Gif return getGifByMessageAndUrl(url, message); } - export function getGifByMessageAndTarget(target: HTMLDivElement, message: Message) { const url = target.closest('[class*="imageWrapper"]')?.querySelector("video")?.src ?? target.closest('[class*="imageWrapper"]')?.querySelector("img")?.src; @@ -86,7 +85,6 @@ export function getGifByMessageAndUrl(url: string, message: Message): Gif | null }; } - const attachment = message.attachments.find(a => cleanUrl(a.url) === cleanedUrl || a.proxy_url === cleanedUrl); if (attachment) return { id: uuidv4(settings.store.itemPrefix), diff --git a/src/equicordplugins/gifCollections/utils/settingsUtils.ts b/src/equicordplugins/gifCollections/utils/settingsUtils.ts index e3f8c46f6..77708581e 100644 --- a/src/equicordplugins/gifCollections/utils/settingsUtils.ts +++ b/src/equicordplugins/gifCollections/utils/settingsUtils.ts @@ -39,7 +39,6 @@ export async function exportCollections() { return JSON.stringify({ collections }, null, 4); } - export async function importCollections(data: string) { try { var parsed = JSON.parse(data); @@ -55,7 +54,6 @@ export async function importCollections(data: string) { throw new Error("Invalid Collections"); } - export async function uploadGifCollections(showToast = true): Promise { if (IS_WEB || IS_EQUIBOP || IS_VESKTOP) { const input = document.createElement("input"); @@ -104,8 +102,6 @@ export async function uploadGifCollections(showToast = true): Promise { } } - - const toastSuccess = () => Toasts.show({ type: Toasts.Type.SUCCESS, message: "Settings successfully imported.", diff --git a/src/equicordplugins/gifRoulette/index.tsx b/src/equicordplugins/gifRoulette/index.tsx index 7a6ac1e34..fdb527f04 100644 --- a/src/equicordplugins/gifRoulette/index.tsx +++ b/src/equicordplugins/gifRoulette/index.tsx @@ -27,7 +27,6 @@ function getMessage(opts, other) { return `${chosenGifUrl} ${ownerPing}`; } - const settings = definePluginSettings({ pingOwnerChance: { type: OptionType.BOOLEAN, diff --git a/src/equicordplugins/githubRepos/index.tsx b/src/equicordplugins/githubRepos/index.tsx index 408bfe975..2faccdd4d 100644 --- a/src/equicordplugins/githubRepos/index.tsx +++ b/src/equicordplugins/githubRepos/index.tsx @@ -38,7 +38,6 @@ export const settings = definePluginSettings({ }, }); - const getProfileThemeProps = findByCodeLazy(".getPreviewThemeColors", "primaryColor:"); const ProfilePopoutComponent = ErrorBoundary.wrap( diff --git a/src/equicordplugins/hideServers/HiddenServersStore.ts b/src/equicordplugins/hideServers/HiddenServersStore.ts index ea697fed7..386ac25ad 100644 --- a/src/equicordplugins/hideServers/HiddenServersStore.ts +++ b/src/equicordplugins/hideServers/HiddenServersStore.ts @@ -9,7 +9,6 @@ import { Guild } from "@vencord/discord-types"; import { findStoreLazy, proxyLazyWebpack } from "@webpack"; import { Flux, FluxDispatcher, GuildStore } from "@webpack/common"; - export const HiddenServersStore = proxyLazyWebpack(() => { const { Store } = Flux; diff --git a/src/equicordplugins/hideServers/components/HiddenServersMenu.tsx b/src/equicordplugins/hideServers/components/HiddenServersMenu.tsx index 6f94bbe3f..069729813 100644 --- a/src/equicordplugins/hideServers/components/HiddenServersMenu.tsx +++ b/src/equicordplugins/hideServers/components/HiddenServersMenu.tsx @@ -68,7 +68,6 @@ function restoreGuild(guild: Guild, SortedGuildStore: any) { HiddenServersStore.removeHiddenGuild("folder-" + folder.folderId); } - function GuildRow({ guild }) { return (
diff --git a/src/equicordplugins/holyNotes/NoteHandler.ts b/src/equicordplugins/holyNotes/NoteHandler.ts index 395596070..43bdeb81f 100644 --- a/src/equicordplugins/holyNotes/NoteHandler.ts +++ b/src/equicordplugins/holyNotes/NoteHandler.ts @@ -39,7 +39,6 @@ export const noteHandler = proxyLazyWebpack(() => { }; } - public getNotes(notebook?: string): Record { return noteHandlerCache.get(notebook); } @@ -93,7 +92,6 @@ export const noteHandler = proxyLazyWebpack(() => { saveCacheToDataStore(from, lodash.omit(origNotebook, note.id) as unknown as HolyNotes.Note[]); saveCacheToDataStore(to, newNoteBook as unknown as HolyNotes.Note[]); - Toasts.show({ id: Toasts.genId(), message: `Successfully moved note from ${from} to ${to}.`, diff --git a/src/equicordplugins/holyNotes/components/modals/Error.tsx b/src/equicordplugins/holyNotes/components/modals/Error.tsx index da51b4882..e4340098a 100644 --- a/src/equicordplugins/holyNotes/components/modals/Error.tsx +++ b/src/equicordplugins/holyNotes/components/modals/Error.tsx @@ -6,7 +6,6 @@ import { findByProps } from "@webpack"; - export default ({ error }: { error?: Error; } = {}) => { const classes = findByProps("emptyResultsWrap"); diff --git a/src/equicordplugins/holyNotes/components/modals/NoteBookTab.tsx b/src/equicordplugins/holyNotes/components/modals/NoteBookTab.tsx index 8f19497e8..5ef581d02 100644 --- a/src/equicordplugins/holyNotes/components/modals/NoteBookTab.tsx +++ b/src/equicordplugins/holyNotes/components/modals/NoteBookTab.tsx @@ -49,7 +49,6 @@ export function NoteBookTabs({ tabs, selectedTabId, onSelectTab }: { tabs: strin } }, [tabs, selectedTabId]); - React.useEffect(() => { handleResize(); diff --git a/src/equicordplugins/holyNotes/components/modals/Notebook.tsx b/src/equicordplugins/holyNotes/components/modals/Notebook.tsx index 49a95a47e..552227b94 100644 --- a/src/equicordplugins/holyNotes/components/modals/Notebook.tsx +++ b/src/equicordplugins/holyNotes/components/modals/Notebook.tsx @@ -63,8 +63,6 @@ const renderNotebook = ({ )); }; - - export const NoteModal = (props: ModalProps & { onClose: () => void; }) => { const [sortType, setSortType] = React.useState(true); const [searchInput, setSearch] = React.useState(""); diff --git a/src/equicordplugins/holyNotes/index.tsx b/src/equicordplugins/holyNotes/index.tsx index 69cf9dd7f..07b19ac88 100644 --- a/src/equicordplugins/holyNotes/index.tsx +++ b/src/equicordplugins/holyNotes/index.tsx @@ -65,7 +65,6 @@ function ToolBarHeader() { ); } - export default definePlugin({ name: "HolyNotes", description: "Holy Notes allows you to save messages", diff --git a/src/equicordplugins/husk/index.tsx b/src/equicordplugins/husk/index.tsx index a42593f32..25aad8e37 100644 --- a/src/equicordplugins/husk/index.tsx +++ b/src/equicordplugins/husk/index.tsx @@ -27,7 +27,6 @@ import type { SVGProps } from "react"; // eslint-disable-next-line no-duplicate-imports import { PropsWithChildren } from "react"; - interface BaseIconProps extends IconProps { viewBox: string; } @@ -53,7 +52,6 @@ function Icon({ height = 24, width = 24, className, children, viewBox, ...svgPro ); } - export function Husk(props: IconProps) { return ( diff --git a/src/equicordplugins/jellyfinRichPresence/index.tsx b/src/equicordplugins/jellyfinRichPresence/index.tsx index 0508337c3..2b4ac9ec6 100644 --- a/src/equicordplugins/jellyfinRichPresence/index.tsx +++ b/src/equicordplugins/jellyfinRichPresence/index.tsx @@ -13,7 +13,6 @@ import { Logger } from "@utils/Logger"; import definePlugin, { OptionType } from "@utils/types"; import { ApplicationAssetUtils, FluxDispatcher, showToast } from "@webpack/common"; - interface ActivityAssets { large_image?: string; large_text?: string; diff --git a/src/equicordplugins/keyboardNavigation/components/MultipleChoice.tsx b/src/equicordplugins/keyboardNavigation/components/MultipleChoice.tsx index e2ecc64c2..2929f1a94 100644 --- a/src/equicordplugins/keyboardNavigation/components/MultipleChoice.tsx +++ b/src/equicordplugins/keyboardNavigation/components/MultipleChoice.tsx @@ -33,7 +33,6 @@ export function MultipleChoice({ modalProps, onSelect, choices }: MultipleChoice action => action.label.toLowerCase().includes(queryEh.toLowerCase()) ); - const visibleActions = filteredActions.slice(startIndex, startIndex + 20); const totalActions = filteredActions.length; diff --git a/src/equicordplugins/keyboardNavigation/components/TextInput.tsx b/src/equicordplugins/keyboardNavigation/components/TextInput.tsx index 718191d7d..a070137ac 100644 --- a/src/equicordplugins/keyboardNavigation/components/TextInput.tsx +++ b/src/equicordplugins/keyboardNavigation/components/TextInput.tsx @@ -48,7 +48,6 @@ export function SimpleTextInput({ modalProps, onSelect, placeholder, info }: Sim ); } - export function openSimpleTextInput(placeholder?: string, info?: string): Promise { return new Promise(resolve => { openModal(modalProps => ( diff --git a/src/equicordplugins/keyboardNavigation/index.tsx b/src/equicordplugins/keyboardNavigation/index.tsx index 904d19ce8..5eaaf5bad 100644 --- a/src/equicordplugins/keyboardNavigation/index.tsx +++ b/src/equicordplugins/keyboardNavigation/index.tsx @@ -84,7 +84,6 @@ export const settings = definePluginSettings({ } }); - export default definePlugin({ name: "KeyboardNavigation", description: "Allows you to navigate the UI with a keyboard.", @@ -108,7 +107,6 @@ export default definePlugin({ document.removeEventListener("keydown", this.event); }, - event(e: KeyboardEvent) { enum Modifiers { diff --git a/src/equicordplugins/limitMiddleClickPaste/index.ts b/src/equicordplugins/limitMiddleClickPaste/index.ts index 0cce627c4..e019c7339 100644 --- a/src/equicordplugins/limitMiddleClickPaste/index.ts +++ b/src/equicordplugins/limitMiddleClickPaste/index.ts @@ -20,7 +20,6 @@ import { definePluginSettings } from "@api/Settings"; import { EquicordDevs } from "@utils/constants"; import definePlugin, { makeRange, OptionType } from "@utils/types"; - const settings = definePluginSettings({ limitTo: { type: OptionType.SELECT, diff --git a/src/equicordplugins/messageFetchTimer/index.tsx b/src/equicordplugins/messageFetchTimer/index.tsx index 93640440b..139a35209 100644 --- a/src/equicordplugins/messageFetchTimer/index.tsx +++ b/src/equicordplugins/messageFetchTimer/index.tsx @@ -144,7 +144,6 @@ function handleMessageLoad(data: any) { currentFetch = null; } - export default definePlugin({ name: "MessageFetchTimer", description: "Shows how long it took to fetch messages for the current channel", diff --git a/src/equicordplugins/messageLoggerEnhanced/components/LogsModal.tsx b/src/equicordplugins/messageLoggerEnhanced/components/LogsModal.tsx index 174901695..5102ee9ce 100644 --- a/src/equicordplugins/messageLoggerEnhanced/components/LogsModal.tsx +++ b/src/equicordplugins/messageLoggerEnhanced/components/LogsModal.tsx @@ -232,7 +232,6 @@ function LogsContent({ visibleMessages, canLoadMore, sortNewest, tab, reset, han const LogsContentMemo = LazyComponent(() => React.memo(LogsContent)); - function NoResults({ tab }: { tab: LogTabs; }) { const generateSuggestedTabs = (tab: LogTabs) => { switch (tab) { diff --git a/src/equicordplugins/messageLoggerEnhanced/components/hooks.ts b/src/equicordplugins/messageLoggerEnhanced/components/hooks.ts index 56caf2b9b..23315ca83 100644 --- a/src/equicordplugins/messageLoggerEnhanced/components/hooks.ts +++ b/src/equicordplugins/messageLoggerEnhanced/components/hooks.ts @@ -52,7 +52,6 @@ export function useMessages(query: string, currentTab: LogTabs, sortNewest: bool countMessagesByStatusIDB(status), ]); - if (isMounted) { setMessages(messages); setStatusTotal(statusTotal); @@ -92,11 +91,9 @@ export function useMessages(query: string, currentTab: LogTabs, sortNewest: bool }, [debouncedQuery, sortNewest, numDisplayedMessages, currentTab, pending]); - return { messages, statusTotal, total, pending, reset: () => setPending(true) }; } - function getStatus(currentTab: LogTabs) { switch (currentTab) { case LogTabs.DELETED: diff --git a/src/equicordplugins/messageLoggerEnhanced/db.ts b/src/equicordplugins/messageLoggerEnhanced/db.ts index 6288f1d51..db22a62e5 100644 --- a/src/equicordplugins/messageLoggerEnhanced/db.ts +++ b/src/equicordplugins/messageLoggerEnhanced/db.ts @@ -179,7 +179,6 @@ export async function addMessagesBulkIDB(messages: LoggedMessageJSON[], status?: messages.forEach(message => cachedMessages.set(message.id, message)); } - export async function deleteMessageIDB(message_id: string) { await db.delete("messages", message_id); diff --git a/src/equicordplugins/messageLoggerEnhanced/index.tsx b/src/equicordplugins/messageLoggerEnhanced/index.tsx index fb6f707b6..5b4f8a536 100644 --- a/src/equicordplugins/messageLoggerEnhanced/index.tsx +++ b/src/equicordplugins/messageLoggerEnhanced/index.tsx @@ -84,7 +84,6 @@ async function messageDeleteHandler(payload: MessageDeletePayload & { isBulk: bo }); } - if (message == null || message.channel_id == null || !message.deleted) return; // Flogger.log("ADDING MESSAGE (DELETED)", message); if (payload.isBulk) diff --git a/src/equicordplugins/messageLoggerEnhanced/native/index.ts b/src/equicordplugins/messageLoggerEnhanced/native/index.ts index 861f5fada..cfde35f03 100644 --- a/src/equicordplugins/messageLoggerEnhanced/native/index.ts +++ b/src/equicordplugins/messageLoggerEnhanced/native/index.ts @@ -30,8 +30,6 @@ let imageCacheDir: string; const getImageCacheDir = async () => imageCacheDir ?? await getDefaultNativeImageDir(); const getLogsDir = async () => logsDir ?? await getDefaultNativeDataDir(); - - export async function initDirs() { const { logsDir: ld, imageCacheDir: icd } = await getSettings(); @@ -88,14 +86,12 @@ export async function deleteFileNative(_event: IpcMainInvokeEvent, attachmentId: await unlink(imagePath); } - export async function writeLogs(_event: IpcMainInvokeEvent, contents: string) { const logsDir = await getLogsDir(); writeFile(path.join(logsDir, LOGS_DATA_FILENAME), contents); } - export async function getDefaultNativeImageDir(): Promise { return path.join(await getDefaultNativeDataDir(), "savedImages"); } diff --git a/src/equicordplugins/messageLoggerEnhanced/types.ts b/src/equicordplugins/messageLoggerEnhanced/types.ts index 7df6bf714..443689efc 100644 --- a/src/equicordplugins/messageLoggerEnhanced/types.ts +++ b/src/equicordplugins/messageLoggerEnhanced/types.ts @@ -80,7 +80,6 @@ export interface MessageDeleteBulkPayload { channelId: string; } - export interface MessageUpdatePayload { type: string; guildId: string; diff --git a/src/equicordplugins/messageLoggerEnhanced/utils/index.ts b/src/equicordplugins/messageLoggerEnhanced/utils/index.ts index f9813b02f..0c55a1723 100644 --- a/src/equicordplugins/messageLoggerEnhanced/utils/index.ts +++ b/src/equicordplugins/messageLoggerEnhanced/utils/index.ts @@ -27,7 +27,6 @@ import { findLastIndex, getGuildIdByChannel } from "./misc"; export * from "./cleanUp"; export * from "./misc"; - // stolen from mlv2 // https://github.com/1Lighty/BetterDiscordPlugins/blob/master/Plugins/MessageLoggerV2/MessageLoggerV2.plugin.js#L2367 interface Id { id: string, time: number; message?: LoggedMessageJSON; } @@ -126,7 +125,6 @@ export function shouldIgnore({ channelId, authorId, guildId, flags, bot, ghostPi const isAuthorBlacklisted = blacklistedIds.includes(authorId); const isChannelBlacklisted = blacklistedIds.includes(channelId); - const shouldIgnoreMutedGuilds = settings.store.ignoreMutedGuilds; const shouldIgnoreMutedCategories = settings.store.ignoreMutedCategories; const shouldIgnoreMutedChannels = settings.store.ignoreMutedChannels; diff --git a/src/equicordplugins/messageLoggerEnhanced/utils/misc.ts b/src/equicordplugins/messageLoggerEnhanced/utils/misc.ts index 9a48bedec..0883049ee 100644 --- a/src/equicordplugins/messageLoggerEnhanced/utils/misc.ts +++ b/src/equicordplugins/messageLoggerEnhanced/utils/misc.ts @@ -72,8 +72,6 @@ export const sortMessagesByDate = (timestampA: string, timestampB: string) => { } }; - - // stolen from mlv2 export function findLastIndex(array: T[], predicate: (e: T, t: number, n: T[]) => boolean) { let l = array.length; @@ -95,7 +93,6 @@ export const mapTimestamp = (m: any) => { return m; }; - export const messageJsonToMessageClass = memoize((log: { message: LoggedMessageJSON; }) => { // console.time("message populate"); if (!log?.message) return null; @@ -128,7 +125,6 @@ export const messageJsonToMessageClass = memoize((log: { message: LoggedMessageJ return message; }); - export function parseJSON(json?: string | null) { try { return JSON.parse(json!); diff --git a/src/equicordplugins/messageLoggerEnhanced/utils/parseQuery.ts b/src/equicordplugins/messageLoggerEnhanced/utils/parseQuery.ts index fc2408a0a..62a5c4afc 100644 --- a/src/equicordplugins/messageLoggerEnhanced/utils/parseQuery.ts +++ b/src/equicordplugins/messageLoggerEnhanced/utils/parseQuery.ts @@ -22,7 +22,6 @@ import { ChannelStore, GuildStore } from "@webpack/common"; import { getGuildIdByChannel } from "./index"; import { memoize } from "./memoize"; - const validIdSearchTypes = ["server", "guild", "channel", "in", "user", "from", "message", "has", "before", "after", "around", "near", "during"] as const; type ValidIdSearchTypesUnion = typeof validIdSearchTypes[number]; diff --git a/src/equicordplugins/messageLoggerEnhanced/utils/saveImage/ImageManager.ts b/src/equicordplugins/messageLoggerEnhanced/utils/saveImage/ImageManager.ts index 61a02069b..229ef361e 100644 --- a/src/equicordplugins/messageLoggerEnhanced/utils/saveImage/ImageManager.ts +++ b/src/equicordplugins/messageLoggerEnhanced/utils/saveImage/ImageManager.ts @@ -79,13 +79,11 @@ export async function deleteImage(attachmentId: string): Promise { if (idbPath) return await del(idbPath, ImageStore); - if (IS_WEB) return; await Native.deleteFileNative(attachmentId); } - async function downloadAttachmentWeb(attachemnt: LoggedAttachment, attempts = 0) { if (!attachemnt?.url || !attachemnt?.id || !attachemnt?.fileExtension) { Flogger.error("Invalid attachment", attachemnt); diff --git a/src/equicordplugins/messageLoggerEnhanced/utils/settingsUtils.ts b/src/equicordplugins/messageLoggerEnhanced/utils/settingsUtils.ts index 7c9a57594..7a2825846 100644 --- a/src/equicordplugins/messageLoggerEnhanced/utils/settingsUtils.ts +++ b/src/equicordplugins/messageLoggerEnhanced/utils/settingsUtils.ts @@ -105,4 +105,3 @@ export async function exportLogs() { DiscordNative.fileManager.saveWithDialog(data, filename); } } - diff --git a/src/equicordplugins/moreCommands/utils.ts b/src/equicordplugins/moreCommands/utils.ts index e5d0b3068..38a53a517 100644 --- a/src/equicordplugins/moreCommands/utils.ts +++ b/src/equicordplugins/moreCommands/utils.ts @@ -27,7 +27,6 @@ export const settings = definePluginSettings({ } }); - export function rand(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } diff --git a/src/equicordplugins/moreStickers/components/icons.tsx b/src/equicordplugins/moreStickers/components/icons.tsx index c0df54827..cd1f5384c 100644 --- a/src/equicordplugins/moreStickers/components/icons.tsx +++ b/src/equicordplugins/moreStickers/components/icons.tsx @@ -20,7 +20,6 @@ export function IconContainer(props: { children: JSX.Element | JSX.Element[]; }) ); } - export function SearchIcon({ width, height, color }: { width: number, height: number, color: string; }) { return ( diff --git a/src/equicordplugins/moreStickers/components/misc.tsx b/src/equicordplugins/moreStickers/components/misc.tsx index 94e7c1b40..783ded6d4 100644 --- a/src/equicordplugins/moreStickers/components/misc.tsx +++ b/src/equicordplugins/moreStickers/components/misc.tsx @@ -445,7 +445,6 @@ export const Packs = () => { ); }; - export function Header(props: { children: JSX.Element | JSX.Element[]; }) { return (
diff --git a/src/equicordplugins/moreStickers/components/picker.tsx b/src/equicordplugins/moreStickers/components/picker.tsx index e4fbb7edb..6c652a3c8 100644 --- a/src/equicordplugins/moreStickers/components/picker.tsx +++ b/src/equicordplugins/moreStickers/components/picker.tsx @@ -168,7 +168,6 @@ function PickerContentRow({ rowIndex, grid1, grid2, grid3, channelId }: PickerCo ); } - function HeaderCollapseIcon({ isExpanded }: { isExpanded: boolean; }) { return ( { const [query, setQuery] = React.useState(); diff --git a/src/equicordplugins/moreStickers/upload.ts b/src/equicordplugins/moreStickers/upload.ts index 83c516fdd..64d3e48b2 100644 --- a/src/equicordplugins/moreStickers/upload.ts +++ b/src/equicordplugins/moreStickers/upload.ts @@ -16,7 +16,6 @@ const PendingReplyStore = findByPropsLazy("getPendingReply"); const MessageUtils = findByPropsLazy("sendMessage"); const DraftStore = findByPropsLazy("getDraft", "getState"); - export const ffmpeg = new FFmpeg(); async function resizeImage(url: string) { diff --git a/src/equicordplugins/musicControls/index.tsx b/src/equicordplugins/musicControls/index.tsx index c01287dc7..baee27b33 100644 --- a/src/equicordplugins/musicControls/index.tsx +++ b/src/equicordplugins/musicControls/index.tsx @@ -93,7 +93,6 @@ export default definePlugin({ }, ], - PanelWrapper({ VencordOriginal, ...props }) { const { showTidalControls, showTidalLyrics, showSpotifyLyrics, showSpotifyControls, LyricsPosition, showYoutubeMusicControls } = settings.store; return ( diff --git a/src/equicordplugins/musicControls/spotify/PlayerComponent.tsx b/src/equicordplugins/musicControls/spotify/PlayerComponent.tsx index 0114c61d1..cfde0c29e 100644 --- a/src/equicordplugins/musicControls/spotify/PlayerComponent.tsx +++ b/src/equicordplugins/musicControls/spotify/PlayerComponent.tsx @@ -215,7 +215,6 @@ function SpotifySeekBar() { ); } - function AlbumContextMenu({ track }: { track: Track; }) { const volume = useStateFromStores([SpotifyStore], () => SpotifyStore.volume); diff --git a/src/equicordplugins/musicControls/spotify/lyrics/components/util.tsx b/src/equicordplugins/musicControls/spotify/lyrics/components/util.tsx index dd1da812f..742c7148a 100644 --- a/src/equicordplugins/musicControls/spotify/lyrics/components/util.tsx +++ b/src/equicordplugins/musicControls/spotify/lyrics/components/util.tsx @@ -24,7 +24,6 @@ export function NoteSvg() { ); } - const getIndexes = (lyrics: SyncedLyric[], position: number, delay: number) => { const posInSec = (position + delay) / 1000; @@ -82,7 +81,6 @@ export function useLyrics({ scroll = true }: { scroll?: boolean; } = {}) { } }, [currentLyrics]); - useEffect(() => { if (currentLyrics && position != null) { const [currentIndex, nextLyricIndex] = getIndexes(currentLyrics, position, LyricDelay); diff --git a/src/equicordplugins/musicControls/spotify/lyrics/providers/SpotifyAPI/index.ts b/src/equicordplugins/musicControls/spotify/lyrics/providers/SpotifyAPI/index.ts index 5ef6391b0..e3fe48d58 100644 --- a/src/equicordplugins/musicControls/spotify/lyrics/providers/SpotifyAPI/index.ts +++ b/src/equicordplugins/musicControls/spotify/lyrics/providers/SpotifyAPI/index.ts @@ -19,7 +19,6 @@ interface Line { endTimeMs: string; } - export async function getLyricsSpotify(trackId: string): Promise { const resp = await fetch("https://spotify-lyrics-api-pi.vercel.app/?trackid=" + trackId); if (!resp.ok) return null; diff --git a/src/equicordplugins/musicControls/tidal/TidalPlayer.tsx b/src/equicordplugins/musicControls/tidal/TidalPlayer.tsx index c23976314..256a742e0 100644 --- a/src/equicordplugins/musicControls/tidal/TidalPlayer.tsx +++ b/src/equicordplugins/musicControls/tidal/TidalPlayer.tsx @@ -328,7 +328,6 @@ export function TidalPlayer() { const isPlaying = useStateFromStores([TidalStore], () => TidalStore.isPlaying); const [shouldHide, setShouldHide] = useState(false); - React.useEffect(() => { setShouldHide(false); if (!isPlaying) { @@ -351,4 +350,3 @@ export function TidalPlayer() {
); } - diff --git a/src/equicordplugins/musicControls/youtubeMusic/PlayerComponent.tsx b/src/equicordplugins/musicControls/youtubeMusic/PlayerComponent.tsx index fe5f29009..e0a71e61f 100644 --- a/src/equicordplugins/musicControls/youtubeMusic/PlayerComponent.tsx +++ b/src/equicordplugins/musicControls/youtubeMusic/PlayerComponent.tsx @@ -347,7 +347,6 @@ export function YtmPlayer() { const isPlaying = useStateFromStores([YoutubeMusicStore], () => YoutubeMusicStore.isPlaying); const [shouldHide, setShouldHide] = useState(false); - React.useEffect(() => { setShouldHide(false); if (!isPlaying) { @@ -370,4 +369,3 @@ export function YtmPlayer() {
); } - diff --git a/src/equicordplugins/musicControls/youtubeMusic/YtmStore.ts b/src/equicordplugins/musicControls/youtubeMusic/YtmStore.ts index 75a8e2c48..8e538db91 100644 --- a/src/equicordplugins/musicControls/youtubeMusic/YtmStore.ts +++ b/src/equicordplugins/musicControls/youtubeMusic/YtmStore.ts @@ -31,7 +31,6 @@ enum MediaType { export type RepeatMode = "NONE" | "ONE" | "ALL"; - export interface Song { title: string; artist: string; @@ -166,7 +165,6 @@ class YoutubeMusicSocket { this.onChange({ position: 0, isPlaying: false, song: undefined }); }); - this.socket.addEventListener("message", e => { let message: Message; try { @@ -225,7 +223,6 @@ export const YoutubeMusicStore = proxyLazyWebpack(() => { VencordNative.native.openExternal(url); } - set position(p: number) { this.mPosition = p * 1000; this.start = Date.now(); diff --git a/src/equicordplugins/notificationTitle.discordDesktop/index.tsx b/src/equicordplugins/notificationTitle.discordDesktop/index.tsx index 3786357b6..7d6e19bce 100644 --- a/src/equicordplugins/notificationTitle.discordDesktop/index.tsx +++ b/src/equicordplugins/notificationTitle.discordDesktop/index.tsx @@ -17,7 +17,6 @@ const ChannelTypes = findByPropsLazy("DM", "GUILD_TEXT", "PUBLIC_THREAD", "UNKNO const ChannelTypesSets = findByPropsLazy("THREADS", "GUILD_TEXTUAL", "ALL_DMS"); const MessageTypes = findByPropsLazy("REPLY", "STAGE_RAISE_HAND", "CHANNEL_NAME_CHANGE"); - export default definePlugin({ name: "NotificationTitle", description: "Makes desktop notifications more informative", diff --git a/src/equicordplugins/questionMarkReplacement/index.tsx b/src/equicordplugins/questionMarkReplacement/index.tsx index 928dd5495..1c9acf14f 100644 --- a/src/equicordplugins/questionMarkReplacement/index.tsx +++ b/src/equicordplugins/questionMarkReplacement/index.tsx @@ -17,7 +17,6 @@ const settings = definePluginSettings({ }, }); - function replaceQuestionMarks(content: string): string { const allQuestionMarks = content.split("").every(char => char === "?"); diff --git a/src/equicordplugins/randomVoice/index.tsx b/src/equicordplugins/randomVoice/index.tsx index 9320fed87..285538341 100644 --- a/src/equicordplugins/randomVoice/index.tsx +++ b/src/equicordplugins/randomVoice/index.tsx @@ -245,7 +245,6 @@ function ContextMenu() { aria-label="Voice state modifier" > - { return (await ApplicationAssetUtils.fetchAssetIds("0", [key]))[0]; } - enum StatsDisplay { messagesSentToday, messagesSentAllTime, diff --git a/src/equicordplugins/scheduledMessages/index.tsx b/src/equicordplugins/scheduledMessages/index.tsx index 5d60fb6c7..5f800dda7 100644 --- a/src/equicordplugins/scheduledMessages/index.tsx +++ b/src/equicordplugins/scheduledMessages/index.tsx @@ -63,7 +63,6 @@ export const settings = definePluginSettings({ function handleReactionEvent(event: FluxReactionEvent): void { const { messageId, channelId, emoji } = event; - if (!messageId || !channelId || !emoji) return; const isPhantom = isPhantomMessage(messageId); diff --git a/src/equicordplugins/scheduledMessages/utils.ts b/src/equicordplugins/scheduledMessages/utils.ts index c3b1dca97..d15b35392 100644 --- a/src/equicordplugins/scheduledMessages/utils.ts +++ b/src/equicordplugins/scheduledMessages/utils.ts @@ -68,7 +68,6 @@ export function getChannelDisplayInfo(channelId: string): { name: string; avatar }; } - function getImageDimensions(dataUrl: string): Promise<{ width: number; height: number; }> { return new Promise(resolve => { const img = new Image(); @@ -292,7 +291,6 @@ function doRecreatePhantomMessage(messageId: string, channelId: string, reaction }, 50); } - async function uploadAttachment(channelId: string, att: ScheduledAttachment): Promise<{ id: string; filename: string; uploaded_filename: string; } | null> { return new Promise(resolve => { const bytes = Uint8Array.from(atob(att.data), c => c.charCodeAt(0)); diff --git a/src/equicordplugins/sekaiStickers/kanade.svg.tsx b/src/equicordplugins/sekaiStickers/kanade.svg.tsx index 906452fa4..58364188f 100644 --- a/src/equicordplugins/sekaiStickers/kanade.svg.tsx +++ b/src/equicordplugins/sekaiStickers/kanade.svg.tsx @@ -17,5 +17,4 @@ const kanadeSvg = () => { ); }; - export { kanadeSvg }; diff --git a/src/equicordplugins/signature/index.tsx b/src/equicordplugins/signature/index.tsx index 7c5630650..ea1cce069 100644 --- a/src/equicordplugins/signature/index.tsx +++ b/src/equicordplugins/signature/index.tsx @@ -147,10 +147,7 @@ export default definePlugin({ }], }); - // text processing injection processor function textProcessing(input: string) { return `${input}\n${settings.store.textHeader ? settings.store.textHeader + " " : ""}${settings.store.name}`; } - - diff --git a/src/equicordplugins/snowfall/index.tsx b/src/equicordplugins/snowfall/index.tsx index 8d6c79275..7f103e9f4 100644 --- a/src/equicordplugins/snowfall/index.tsx +++ b/src/equicordplugins/snowfall/index.tsx @@ -466,7 +466,6 @@ export default definePlugin({ ), - settings, start() { diff --git a/src/equicordplugins/soundBoardLogger/settings.tsx b/src/equicordplugins/soundBoardLogger/settings.tsx index 7fbcff37a..47b6b037e 100644 --- a/src/equicordplugins/soundBoardLogger/settings.tsx +++ b/src/equicordplugins/soundBoardLogger/settings.tsx @@ -36,7 +36,6 @@ const settings = definePluginSettings({ setErrorMessage(null); } - if (changed < value) { setShouldShowWarning(true); } else { @@ -46,7 +45,6 @@ const settings = definePluginSettings({ setValue(changed); } - return (
The amount of soundboard ids you want to save at a time (0 lets you save infinite) diff --git a/src/equicordplugins/soundBoardLogger/utils.ts b/src/equicordplugins/soundBoardLogger/utils.ts index 51e7eaf1c..f1fee3ae9 100644 --- a/src/equicordplugins/soundBoardLogger/utils.ts +++ b/src/equicordplugins/soundBoardLogger/utils.ts @@ -31,7 +31,6 @@ export interface SoundLogEntry extends SoundEvent { users: { id: string, plays: number[]; }[]; } - export const cl = classNameFactory("vc-soundlog-"); export function getEmojiUrl(emoji) { diff --git a/src/equicordplugins/statsfmPresence/index.tsx b/src/equicordplugins/statsfmPresence/index.tsx index 2d6ec4b4b..cdd2ea859 100644 --- a/src/equicordplugins/statsfmPresence/index.tsx +++ b/src/equicordplugins/statsfmPresence/index.tsx @@ -22,7 +22,6 @@ interface ActivityAssets { small_text?: string; } - interface ActivityButton { label: string; url: string; @@ -256,7 +255,6 @@ export default definePlugin({ const res = await fetch(`https://api.stats.fm/api/v1/users/${settings.store.username}/streams/current`); if (!res.ok) throw `${res.status} ${res.statusText}`; - const json = await res.json() as SFMR; if (!json.item) { logger.error("Error from Stats.fm API", json); diff --git a/src/equicordplugins/statusPresets/index.tsx b/src/equicordplugins/statusPresets/index.tsx index 75e5416f2..2a604f6c7 100644 --- a/src/equicordplugins/statusPresets/index.tsx +++ b/src/equicordplugins/statusPresets/index.tsx @@ -124,7 +124,6 @@ const RenderStatusMenuItem = ({ status, update, disabled }: { status: DiscordSta ; }; - const StatusSubMenuComponent = () => { const premiumType = OverridePremiumTypeStore.getState().premiumTypeActual ?? 0; const update = useForceUpdater(); @@ -143,7 +142,6 @@ const StatusSubMenuComponent = () => { ; }; - export default definePlugin({ name: "StatusPresets", description: "Allows you to remember your statuses and set them later", diff --git a/src/equicordplugins/stickerBlocker/index.tsx b/src/equicordplugins/stickerBlocker/index.tsx index f1325c333..caf733a7c 100644 --- a/src/equicordplugins/stickerBlocker/index.tsx +++ b/src/equicordplugins/stickerBlocker/index.tsx @@ -64,7 +64,6 @@ function blockedComponentRender(sticker) { return <>{elements}; } - const messageContextMenuPatch: NavContextMenuPatchCallback = (children, props) => { const { favoriteableId, favoriteableType } = props ?? {}; @@ -116,7 +115,6 @@ function toggleBlock(name) { } } - function isStickerBlocked(name) { if (settings.store.blockedStickers === undefined || settings.store.blockedStickers == null) { return; diff --git a/src/equicordplugins/themeLibrary/components/ThemeTab.tsx b/src/equicordplugins/themeLibrary/components/ThemeTab.tsx index 468e49f23..8a42917cf 100644 --- a/src/equicordplugins/themeLibrary/components/ThemeTab.tsx +++ b/src/equicordplugins/themeLibrary/components/ThemeTab.tsx @@ -292,7 +292,6 @@ function SubmitThemes() { ); } - function ThemeLibrary() { const [currentTab, setCurrentTab] = useState(TabItem.THEMES); diff --git a/src/equicordplugins/tidalEmbeds/index.tsx b/src/equicordplugins/tidalEmbeds/index.tsx index 7de2a1da7..7ca7d629a 100644 --- a/src/equicordplugins/tidalEmbeds/index.tsx +++ b/src/equicordplugins/tidalEmbeds/index.tsx @@ -7,7 +7,6 @@ import { EquicordDevs } from "@utils/constants"; import definePlugin from "@utils/types"; - export default definePlugin({ name: "TidalEmbeds", description: "Embeds TIDAL songs to make them playable in Discord.", diff --git a/src/equicordplugins/toastNotifications/index.tsx b/src/equicordplugins/toastNotifications/index.tsx index 4b704b8b9..7cf4e4ab8 100644 --- a/src/equicordplugins/toastNotifications/index.tsx +++ b/src/equicordplugins/toastNotifications/index.tsx @@ -437,8 +437,6 @@ async function handleGuildMessage(message: Message) { const all = notifyFor.includes(message.channel_id); const friend = settings.store.friendServerNotifications && RelationshipStore.isFriend(message.author.id); - - if (!all && !friend) { t = true; const isMention: boolean = message.content.includes(`<@${UserStore.getCurrentUser().id}>`); @@ -554,7 +552,6 @@ async function relationshipAdd(user: User, type: Number) { Notification.body = "You can now message them directly."; Notification.onClick = () => switchChannels(null, user.id); - await showNotification(Notification); } else if (type === RelationshipType.INCOMING_REQUEST) { diff --git a/src/equicordplugins/tosuRPC/index.ts b/src/equicordplugins/tosuRPC/index.ts index 32f282372..c0b990db5 100644 --- a/src/equicordplugins/tosuRPC/index.ts +++ b/src/equicordplugins/tosuRPC/index.ts @@ -50,7 +50,6 @@ export default definePlugin({ } }); - async function onMessage(data: string) { const json: TosuApi = JSON.parse(data); // @ts-ignore diff --git a/src/equicordplugins/voiceChannelLog.dev/index.tsx b/src/equicordplugins/voiceChannelLog.dev/index.tsx index e5ed8fd12..94941f6e1 100644 --- a/src/equicordplugins/voiceChannelLog.dev/index.tsx +++ b/src/equicordplugins/voiceChannelLog.dev/index.tsx @@ -138,7 +138,6 @@ export default definePlugin({ timestamp: new Date() }; - if (settings.store.mode !== 2) { addLogEntry(logEntry, oldChannelId); addLogEntry(logEntry, channelId); diff --git a/src/equicordplugins/wallpaperFree/components/ctxmenu.tsx b/src/equicordplugins/wallpaperFree/components/ctxmenu.tsx index db77c87b4..b476a3a8e 100644 --- a/src/equicordplugins/wallpaperFree/components/ctxmenu.tsx +++ b/src/equicordplugins/wallpaperFree/components/ctxmenu.tsx @@ -11,7 +11,6 @@ import { ChannelStore, FluxDispatcher, Menu } from "@webpack/common"; import { SetWallpaperModal } from "./modal"; - const addWallpaperMenu = (channelId?: string, guildId?: string) => { const setWallpaper = (url?: string) => { FluxDispatcher.dispatch({ diff --git a/src/equicordplugins/wallpaperFree/index.tsx b/src/equicordplugins/wallpaperFree/index.tsx index de2ce5b75..9545ef8e7 100644 --- a/src/equicordplugins/wallpaperFree/index.tsx +++ b/src/equicordplugins/wallpaperFree/index.tsx @@ -16,7 +16,6 @@ import { ChannelContextPatch, GuildContextPatch, UserContextPatch } from "./comp import { GlobalDefaultComponent, TipsComponent } from "./components/util"; import { WallpaperFreeStore } from "./store"; - export const settings = definePluginSettings({ globalDefault: { description: "Set a global default wallpaper for all channels.", diff --git a/src/equicordplugins/whitelistedEmojis/index.tsx b/src/equicordplugins/whitelistedEmojis/index.tsx index 31889fd68..70d21eb37 100644 --- a/src/equicordplugins/whitelistedEmojis/index.tsx +++ b/src/equicordplugins/whitelistedEmojis/index.tsx @@ -49,7 +49,6 @@ function isItemAllowed(item: (CustomEmoji | UnicodeEmoji)) { return cache_allowedList.some(emoji => emoji.name === item.name); } - function itemAlreadyInList(item: ContextMenuEmoji) { return cache_allowedList.some(emoji => emoji.name === item.name); } diff --git a/src/main/csp/index.ts b/src/main/csp/index.ts index 489356284..92e96041c 100644 --- a/src/main/csp/index.ts +++ b/src/main/csp/index.ts @@ -88,7 +88,6 @@ const stringifyPolicy = (policy: PolicyMap): string => .map(directive => directive.flat().join(" ")) .join("; "); - const patchCsp = (headers: PolicyMap) => { const reportOnlyHeader = findHeader(headers, "content-security-policy-report-only"); if (reportOnlyHeader) diff --git a/src/main/updater/http.ts b/src/main/updater/http.ts index d8a6fe28c..52caecd5c 100644 --- a/src/main/updater/http.ts +++ b/src/main/updater/http.ts @@ -61,7 +61,6 @@ async function fetchUpdates() { if (hash === gitHash) return false; - const asset = data.assets.find(a => a.name === ASAR_FILE); PendingUpdate = asset.browser_download_url; diff --git a/src/plugins/_api/badges/index.tsx b/src/plugins/_api/badges/index.tsx index 0573a4967..59f78f671 100644 --- a/src/plugins/_api/badges/index.tsx +++ b/src/plugins/_api/badges/index.tsx @@ -203,7 +203,6 @@ export default definePlugin({ return ; }, { noop: true }), - getBadgeMouseEventHandlers(badge: ProfileBadge & BadgeUserArgs) { const handlers = {} as Record void>; diff --git a/src/plugins/_api/dynamicImageModalApi.ts b/src/plugins/_api/dynamicImageModalApi.ts index 114b48363..92f839fc5 100644 --- a/src/plugins/_api/dynamicImageModalApi.ts +++ b/src/plugins/_api/dynamicImageModalApi.ts @@ -7,7 +7,6 @@ import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; - export default definePlugin({ name: "DynamicImageModalAPI", authors: [Devs.sadan, Devs.Nuckyz], diff --git a/src/plugins/_core/supportHelper.tsx b/src/plugins/_core/supportHelper.tsx index 4be9d552d..2efc1b45e 100644 --- a/src/plugins/_core/supportHelper.tsx +++ b/src/plugins/_core/supportHelper.tsx @@ -194,7 +194,6 @@ function generatePluginList() { const enabledStockPlugins = enabledPlugins.filter(p => !PluginMeta[p].userPlugin); const enabledUserPlugins = enabledPlugins.filter(p => PluginMeta[p].userPlugin); - let content = `**Enabled Plugins (${enabledStockPlugins.length}):**\n${makeCodeblock(enabledStockPlugins.join(", "))}`; if (enabledUserPlugins.length) { diff --git a/src/plugins/betterFolders/index.tsx b/src/plugins/betterFolders/index.tsx index 6f26206e8..f94331bbd 100644 --- a/src/plugins/betterFolders/index.tsx +++ b/src/plugins/betterFolders/index.tsx @@ -325,7 +325,6 @@ export default definePlugin({ FolderSideBar, closeFolders, - wrapGuildNodeComponent(node: any, originalComponent: () => ReactNode, isBetterFolders: boolean, expandedFolderIds?: Set) { if ( !isBetterFolders || diff --git a/src/plugins/consoleShortcuts/index.ts b/src/plugins/consoleShortcuts/index.ts index d11d8b68d..a4e80b23b 100644 --- a/src/plugins/consoleShortcuts/index.ts +++ b/src/plugins/consoleShortcuts/index.ts @@ -256,7 +256,6 @@ export default definePlugin({ } ], - start() { const shortcuts = makeShortcuts(); window.shortcutList = {}; diff --git a/src/plugins/dearrow/index.tsx b/src/plugins/dearrow/index.tsx index e44fd0f27..1247472d4 100644 --- a/src/plugins/dearrow/index.tsx +++ b/src/plugins/dearrow/index.tsx @@ -63,7 +63,6 @@ async function embedDidMount(this: Component) { if (!hasTitle && !hasThumb) return; - embed.dearrow = { enabled: dearrowByDefault }; diff --git a/src/plugins/decor/lib/constants.ts b/src/plugins/decor/lib/constants.ts index 302ed64d1..212b070a0 100644 --- a/src/plugins/decor/lib/constants.ts +++ b/src/plugins/decor/lib/constants.ts @@ -15,7 +15,6 @@ export const GUILD_ID = "1096357702931841148"; export const INVITE_KEY = "dXp2SdxDcP"; export const DECORATION_FETCH_COOLDOWN = 1000 * 60 * 60 * 4; // 4 hours - export async function setBaseUrl(baseUrl: string) { try { const config = await fetch(`${baseUrl}/api/config`).then(res => res.json()); diff --git a/src/plugins/fakeProfileThemes/index.tsx b/src/plugins/fakeProfileThemes/index.tsx index 1eb885698..589862c4d 100644 --- a/src/plugins/fakeProfileThemes/index.tsx +++ b/src/plugins/fakeProfileThemes/index.tsx @@ -248,4 +248,3 @@ export default definePlugin({ ; }, { noop: true }), }); - diff --git a/src/plugins/favGifSearch/index.tsx b/src/plugins/favGifSearch/index.tsx index b0062b8c1..1b45ffa0b 100644 --- a/src/plugins/favGifSearch/index.tsx +++ b/src/plugins/favGifSearch/index.tsx @@ -129,7 +129,6 @@ export default definePlugin({ } }); - function SearchBar({ instance, SearchBarComponent }: { instance: Instance; SearchBarComponent: TSearchBarComponent; }) { const [query, setQuery] = useState(""); const ref = useRef(null); @@ -145,14 +144,12 @@ function SearchBar({ instance, SearchBarComponent }: { instance: Instance; Searc return; } - // scroll back to top ref.current ?.closest("#gif-picker-tab-panel") ?.querySelector('[class*="scrollerBase"]') ?.scrollTo(0, 0); - const result = props.favCopy .map(gif => ({ @@ -193,8 +190,6 @@ function SearchBar({ instance, SearchBarComponent }: { instance: Instance; Searc ); } - - export function getTargetString(urlStr: string) { let url: URL; try { diff --git a/src/plugins/greetStickerPicker/index.tsx b/src/plugins/greetStickerPicker/index.tsx index 0cc3e170d..87ae9b717 100644 --- a/src/plugins/greetStickerPicker/index.tsx +++ b/src/plugins/greetStickerPicker/index.tsx @@ -67,7 +67,6 @@ function greet(channel: Channel, message: Message, stickers: string[]) { } } - function GreetMenu({ channel, message }: { message: Message, channel: Channel; }) { const s = settings.use(["greetMode", "multiGreetChoices"]); const { greetMode, multiGreetChoices = [] } = s; diff --git a/src/plugins/imageZoom/index.tsx b/src/plugins/imageZoom/index.tsx index 0f10db3e9..09589d4a2 100644 --- a/src/plugins/imageZoom/index.tsx +++ b/src/plugins/imageZoom/index.tsx @@ -79,7 +79,6 @@ export const settings = definePluginSettings({ }, }); - const imageContextMenuPatch: NavContextMenuPatchCallback = (children, props) => { // Discord re-uses the image context menu for links to for the copy and open buttons if ("href" in props) return; diff --git a/src/plugins/loadingQuotes/index.ts b/src/plugins/loadingQuotes/index.ts index 9bfc88a73..93b87beff 100644 --- a/src/plugins/loadingQuotes/index.ts +++ b/src/plugins/loadingQuotes/index.ts @@ -84,7 +84,6 @@ export default definePlugin({ if (!enableDiscordPresetQuotes) quotes.length = 0; - if (enablePluginPresetQuotes) quotes.push(...presetQuotes); diff --git a/src/plugins/messageLinkEmbeds/index.tsx b/src/plugins/messageLinkEmbeds/index.tsx index 238eb9986..ec314a184 100644 --- a/src/plugins/messageLinkEmbeds/index.tsx +++ b/src/plugins/messageLinkEmbeds/index.tsx @@ -127,7 +127,6 @@ const settings = definePluginSettings({ } }); - async function fetchMessage(channelID: string, messageID: string) { const cached = messageCache.get(messageID); if (cached) return cached.message; @@ -157,7 +156,6 @@ async function fetchMessage(channelID: string, messageID: string) { return message; } - function getImages(message: Message): Attachment[] { const attachments: Attachment[] = []; @@ -223,7 +221,6 @@ function withEmbeddedBy(message: Message, embeddedBy: string[]) { }); } - function MessageEmbedAccessory({ message }: { message: Message; }) { // @ts-expect-error const embeddedBy: string[] = message.vencordEmbeddedBy ?? []; diff --git a/src/plugins/oneko/index.ts b/src/plugins/oneko/index.ts index a8e844f8d..750c4a67a 100644 --- a/src/plugins/oneko/index.ts +++ b/src/plugins/oneko/index.ts @@ -20,7 +20,6 @@ import { definePluginSettings, migratePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; - const settings = definePluginSettings({ speed: { description: "Speed of Da Cat :3", diff --git a/src/plugins/openInApp/index.ts b/src/plugins/openInApp/index.ts index 78b8a84cf..c0a396f3c 100644 --- a/src/plugins/openInApp/index.ts +++ b/src/plugins/openInApp/index.ts @@ -79,7 +79,6 @@ const pluginSettings = definePluginSettings( }, {} as SettingsDefinition) ); - const Native = VencordNative.pluginHelpers.OpenInApp as PluginNative; export default definePlugin({ diff --git a/src/plugins/permissionsViewer/index.tsx b/src/plugins/permissionsViewer/index.tsx index 5a0ca71f1..6150b21d2 100644 --- a/src/plugins/permissionsViewer/index.tsx +++ b/src/plugins/permissionsViewer/index.tsx @@ -143,7 +143,6 @@ function makeContextMenuPatch(childId: string | string[], type?: MenuItemParentT .with(MenuItemParentType.Guild, () => MenuItem(props.guild.id)) .otherwise(() => null); - if (item == null) return; if (group) { diff --git a/src/plugins/pinDms/data.ts b/src/plugins/pinDms/data.ts index 7671b54f3..4c21f68c7 100644 --- a/src/plugins/pinDms/data.ts +++ b/src/plugins/pinDms/data.ts @@ -127,7 +127,6 @@ export const canMoveChannelInDirection = (channelId: string, direction: -1 | 1) return canMoveArrayInDirection(category.channels, channelIndex, direction); }; - function swapElementsInArray(array: any[], index1: number, index2: number) { if (!array[index1] || !array[index2]) return; [array[index1], array[index2]] = [array[index2], array[index1]]; diff --git a/src/plugins/pinDms/index.tsx b/src/plugins/pinDms/index.tsx index a0832518c..adaf2b8b3 100644 --- a/src/plugins/pinDms/index.tsx +++ b/src/plugins/pinDms/index.tsx @@ -124,7 +124,6 @@ export default definePlugin({ ] }, - // forceUpdate moment // https://regex101.com/r/kDN9fO/1 { @@ -306,7 +305,6 @@ export default definePlugin({ action={() => removeCategory(category.id)} /> - )); }} diff --git a/src/plugins/previewMessage/index.tsx b/src/plugins/previewMessage/index.tsx index d2a6a12fc..491a0d509 100644 --- a/src/plugins/previewMessage/index.tsx +++ b/src/plugins/previewMessage/index.tsx @@ -25,7 +25,6 @@ import { DraftStore, DraftType, UploadAttachmentStore, UserStore, useStateFromSt const getDraft = (channelId: string) => DraftStore.getDraft(channelId, DraftType.ChannelMessage); - const getImageBox = (url: string): Promise<{ width: number, height: number; } | null> => new Promise(res => { const img = new Image(); @@ -38,7 +37,6 @@ const getImageBox = (url: string): Promise<{ width: number, height: number; } | img.src = url; }); - const getAttachments = async (channelId: string) => await Promise.all( UploadAttachmentStore.getUploads(channelId, DraftType.ChannelMessage) @@ -69,7 +67,6 @@ const getAttachments = async (channelId: string) => }) ); - const PreviewIcon: IconComponent = ({ height = 20, width = 20, className }) => { return ( -