mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 02:17:03 -04:00
Webpack Warnings & Errors (#178)
* dev: Useful strict Warnings & Errors * Always log error * Ignore pending patches with all or whose predicate = false * Error -> Warn
This commit is contained in:
parent
b905743077
commit
8adf7ca155
16 changed files with 90 additions and 55 deletions
|
@ -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",
|
||||
|
|
|
@ -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[] = [];
|
||||
|
||||
|
|
|
@ -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[];
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue