diff options
author | Ven <vendicated@riseup.net> | 2022-10-30 20:45:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-30 20:45:18 +0100 |
commit | 8adf7ca155a7f2b9d59ecfcc98ca47d123a26f59 (patch) | |
tree | 8397630ff18f8fa8952396334b3e4c003786cd07 /src/plugins | |
parent | b905743077f5ffdd09c8ff3464ac19f770ae875f (diff) | |
download | Vencord-8adf7ca155a7f2b9d59ecfcc98ca47d123a26f59.tar.gz Vencord-8adf7ca155a7f2b9d59ecfcc98ca47d123a26f59.tar.bz2 Vencord-8adf7ca155a7f2b9d59ecfcc98ca47d123a26f59.zip |
Webpack Warnings & Errors (#178)
* dev: Useful strict Warnings & Errors
* Always log error
* Ignore pending patches with all or whose predicate = false
* Error -> Warn
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/experiments.tsx | 2 | ||||
-rw-r--r-- | src/plugins/ignoreActivities.ts | 2 | ||||
-rw-r--r-- | src/plugins/index.ts | 1 | ||||
-rw-r--r-- | src/plugins/interactionKeybinds.ts | 2 | ||||
-rw-r--r-- | src/plugins/petpet.ts | 6 | ||||
-rw-r--r-- | src/plugins/pronoundb/components/PronounsChatComponent.tsx | 2 | ||||
-rw-r--r-- | src/plugins/reverseImageSearch.tsx | 2 | ||||
-rw-r--r-- | src/plugins/sendify.ts | 6 |
8 files changed, 12 insertions, 11 deletions
diff --git a/src/plugins/experiments.tsx b/src/plugins/experiments.tsx index c6303f3..eac5b48 100644 --- a/src/plugins/experiments.tsx +++ b/src/plugins/experiments.tsx @@ -23,7 +23,7 @@ import { Settings } from "../Vencord"; import { filters } from "../webpack"; import { Forms, React } from "../webpack/common"; -const KbdStyles = lazyWebpack(filters.byProps(["key", "removeBuildOverride"])); +const KbdStyles = lazyWebpack(filters.byProps("key", "removeBuildOverride")); export default definePlugin({ name: "Experiments", diff --git a/src/plugins/ignoreActivities.ts b/src/plugins/ignoreActivities.ts index a429136..5c1ddcc 100644 --- a/src/plugins/ignoreActivities.ts +++ b/src/plugins/ignoreActivities.ts @@ -28,7 +28,7 @@ interface MatchAndReplace { } /** Used to re-render the Registered Games tab to update how our button looks like */ -const RunningGameStoreModule = lazyWebpack(filters.byProps(["IgnoreActivities_reRenderGames"])); +const RunningGameStoreModule = lazyWebpack(filters.byProps("IgnoreActivities_reRenderGames")); let ignoredActivitiesCache: string[] = []; diff --git a/src/plugins/index.ts b/src/plugins/index.ts index be6fae3..86d44b4 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -25,6 +25,7 @@ import { Patch, Plugin } from "../utils/types"; const logger = new Logger("PluginManager", "#a6d189"); +export const PMLogger = logger; export const plugins = Plugins; export const patches = [] as Patch[]; diff --git a/src/plugins/interactionKeybinds.ts b/src/plugins/interactionKeybinds.ts index 1d28847..76a25bb 100644 --- a/src/plugins/interactionKeybinds.ts +++ b/src/plugins/interactionKeybinds.ts @@ -24,7 +24,7 @@ import definePlugin from "../utils/types"; import { filters } from "../webpack"; import { ChannelStore, FluxDispatcher as Dispatcher, SelectedChannelStore, UserStore } from "../webpack/common"; -const MessageStore = lazyWebpack(filters.byProps(["getRawMessages"])); +const MessageStore = lazyWebpack(filters.byProps("getRawMessages")); const isMac = navigator.platform.includes("Mac"); // bruh let replyIdx = -1; diff --git a/src/plugins/petpet.ts b/src/plugins/petpet.ts index 8f2462d..093acba 100644 --- a/src/plugins/petpet.ts +++ b/src/plugins/petpet.ts @@ -16,9 +16,9 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { ApplicationCommandInputType, ApplicationCommandOptionType, Argument, CommandContext,findOption } from "../api/Commands"; +import { ApplicationCommandInputType, ApplicationCommandOptionType, Argument, CommandContext, findOption } from "../api/Commands"; import { Devs } from "../utils/constants"; -import { lazyWebpack,makeLazy } from "../utils/misc"; +import { lazyWebpack, makeLazy } from "../utils/misc"; import definePlugin from "../utils/types"; import { filters } from "../webpack"; @@ -41,7 +41,7 @@ const getFrames = makeLazy(() => Promise.all( const fetchUser = lazyWebpack(filters.byCode(".USER(")); const promptToUpload = lazyWebpack(filters.byCode("UPLOAD_FILE_LIMIT_ERROR")); -const UploadStore = lazyWebpack(filters.byProps(["getUploads"])); +const UploadStore = lazyWebpack(filters.byProps("getUploads")); function loadImage(source: File | string) { const isFile = source instanceof File; diff --git a/src/plugins/pronoundb/components/PronounsChatComponent.tsx b/src/plugins/pronoundb/components/PronounsChatComponent.tsx index ec4de98..2d20461 100644 --- a/src/plugins/pronoundb/components/PronounsChatComponent.tsx +++ b/src/plugins/pronoundb/components/PronounsChatComponent.tsx @@ -25,7 +25,7 @@ import { UserStore } from "../../../webpack/common"; import { PronounMapping } from "../types"; import { fetchPronouns, formatPronouns } from "../utils"; -const styles: Record<string, string> = lazyWebpack(filters.byProps(["timestampInline"])); +const styles: Record<string, string> = lazyWebpack(filters.byProps("timestampInline")); export default function PronounsChatComponent({ message }: { message: Message; }) { // Don't bother fetching bot or system users diff --git a/src/plugins/reverseImageSearch.tsx b/src/plugins/reverseImageSearch.tsx index 9f618de..da7d844 100644 --- a/src/plugins/reverseImageSearch.tsx +++ b/src/plugins/reverseImageSearch.tsx @@ -29,7 +29,7 @@ const Engines = { TinEye: "https://www.tineye.com/search?url=" }; -const Menu = lazyWebpack(filters.byProps(["MenuItem"])); +const Menu = lazyWebpack(filters.byProps("MenuItem")); export default definePlugin({ diff --git a/src/plugins/sendify.ts b/src/plugins/sendify.ts index 436a928..40836ad 100644 --- a/src/plugins/sendify.ts +++ b/src/plugins/sendify.ts @@ -53,9 +53,9 @@ interface Track { name: string; } -const Spotify = lazyWebpack(filters.byProps(["getPlayerState"])); -const MessageCreator = lazyWebpack(filters.byProps(["getSendMessageOptionsForReply", "sendMessage"])); -const PendingReplyStore = lazyWebpack(filters.byProps(["getPendingReply"])); +const Spotify = lazyWebpack(filters.byProps("getPlayerState")); +const MessageCreator = lazyWebpack(filters.byProps("getSendMessageOptionsForReply", "sendMessage")); +const PendingReplyStore = lazyWebpack(filters.byProps("getPendingReply")); function sendMessage(channelId, message) { message = { |