aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorVen <vendicated@riseup.net>2022-10-06 00:42:58 +0200
committerGitHub <noreply@github.com>2022-10-06 00:42:58 +0200
commit74c3930e0a5ed264f330bc32c27116ead1063c5d (patch)
treea29ba43787c8cf8bbee648b5b478a8152086f965 /src/plugins
parente563521416052808bcec57057b921f0c0b6ca594 (diff)
downloadVencord-74c3930e0a5ed264f330bc32c27116ead1063c5d.tar.gz
Vencord-74c3930e0a5ed264f330bc32c27116ead1063c5d.tar.bz2
Vencord-74c3930e0a5ed264f330bc32c27116ead1063c5d.zip
add eslint config (#53)
* eslint * workflow * lint main
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/STFU.ts2
-rw-r--r--src/plugins/apiCommands.ts2
-rw-r--r--src/plugins/apiNotices.ts2
-rw-r--r--src/plugins/clearURLs/index.ts6
-rw-r--r--src/plugins/clickableRoleDot.ts2
-rw-r--r--src/plugins/experiments.ts2
-rw-r--r--src/plugins/lenny.ts2
-rw-r--r--src/plugins/messageActions.ts2
-rw-r--r--src/plugins/muteNewGuild.ts4
-rw-r--r--src/plugins/nitroBypass.ts14
-rw-r--r--src/plugins/noReplyMention.ts2
-rw-r--r--src/plugins/noTrack.ts2
-rw-r--r--src/plugins/randomiseFileNames.ts2
-rw-r--r--src/plugins/settings.ts6
-rw-r--r--src/plugins/silentTyping.ts4
-rw-r--r--src/plugins/unindent.ts4
-rw-r--r--src/plugins/viewIcons.tsx2
17 files changed, 30 insertions, 30 deletions
diff --git a/src/plugins/STFU.ts b/src/plugins/STFU.ts
index ff7094c..abe9bd6 100644
--- a/src/plugins/STFU.ts
+++ b/src/plugins/STFU.ts
@@ -1,5 +1,5 @@
import definePlugin from "../utils/types";
-import { Devs } from '../utils/constants';
+import { Devs } from "../utils/constants";
export default definePlugin({
name: "STFU",
diff --git a/src/plugins/apiCommands.ts b/src/plugins/apiCommands.ts
index 7c02dd9..449f804 100644
--- a/src/plugins/apiCommands.ts
+++ b/src/plugins/apiCommands.ts
@@ -7,7 +7,7 @@ export default definePlugin({
description: "Api required by anything that uses commands",
patches: [
{
- find: `"giphy","tenor"`,
+ find: '"giphy","tenor"',
replacement: [
{
// Matches BUILT_IN_COMMANDS. This is not exported so this is
diff --git a/src/plugins/apiNotices.ts b/src/plugins/apiNotices.ts
index 1b4f115..e9b4678 100644
--- a/src/plugins/apiNotices.ts
+++ b/src/plugins/apiNotices.ts
@@ -13,7 +13,7 @@ export default definePlugin({
{
match: /;(.{1,2}=null;)(?=.{0,50}updateNotice)/g,
replace:
- ';if(Vencord.Api.Notices.currentNotice)return !1;$1'
+ ";if(Vencord.Api.Notices.currentNotice)return !1;$1"
},
{
match: /(?<=NOTICE_DISMISS:function.+?){(?=if\(null==(.+?)\))/,
diff --git a/src/plugins/clearURLs/index.ts b/src/plugins/clearURLs/index.ts
index abdeefd..c9bf2ed 100644
--- a/src/plugins/clearURLs/index.ts
+++ b/src/plugins/clearURLs/index.ts
@@ -90,7 +90,7 @@ export default definePlugin({
}
// Check all universal rules
- this.universalRules.forEach((rule) => {
+ this.universalRules.forEach(rule => {
url.searchParams.forEach((_value, param, parent) => {
this.removeParam(rule, param, parent);
});
@@ -99,7 +99,7 @@ export default definePlugin({
// Check rules for each hosts that match
this.hostRules.forEach((regex, hostRuleName) => {
if (!regex.test(url.hostname)) return;
- this.rulesByHost.get(hostRuleName).forEach((rule) => {
+ this.rulesByHost.get(hostRuleName).forEach(rule => {
url.searchParams.forEach((_value, param, parent) => {
this.removeParam(rule, param, parent);
});
@@ -114,7 +114,7 @@ export default definePlugin({
if (msg.content.match(/http(s)?:\/\//)) {
msg.content = msg.content.replace(
/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g,
- (match) => this.replacer(match)
+ match => this.replacer(match)
);
}
},
diff --git a/src/plugins/clickableRoleDot.ts b/src/plugins/clickableRoleDot.ts
index 3fc4bef..61e6b28 100644
--- a/src/plugins/clickableRoleDot.ts
+++ b/src/plugins/clickableRoleDot.ts
@@ -1,6 +1,6 @@
import { Devs } from "../utils/constants";
import definePlugin from "../utils/types";
-import { Toasts } from '../webpack/common';
+import { Toasts } from "../webpack/common";
export default definePlugin({
name: "ClickableRoleDot",
diff --git a/src/plugins/experiments.ts b/src/plugins/experiments.ts
index 37a59c7..b441a76 100644
--- a/src/plugins/experiments.ts
+++ b/src/plugins/experiments.ts
@@ -1,5 +1,5 @@
import { Devs } from "../utils/constants";
-import definePlugin from '../utils/types';
+import definePlugin from "../utils/types";
export default definePlugin({
name: "Experiments",
diff --git a/src/plugins/lenny.ts b/src/plugins/lenny.ts
index 901febc..1877752 100644
--- a/src/plugins/lenny.ts
+++ b/src/plugins/lenny.ts
@@ -12,7 +12,7 @@ export default definePlugin({
name: "lenny",
description: "Sends a lenny face",
options: [OptionalMessageOption],
- execute: (opts) => ({
+ execute: opts => ({
content: findOption(opts, "message", "") + " ( ͡° ͜ʖ ͡°)"
}),
},
diff --git a/src/plugins/messageActions.ts b/src/plugins/messageActions.ts
index 4df3853..a017f54 100644
--- a/src/plugins/messageActions.ts
+++ b/src/plugins/messageActions.ts
@@ -1,4 +1,4 @@
-import { addClickListener, removeClickListener } from '../api/MessageEvents';
+import { addClickListener, removeClickListener } from "../api/MessageEvents";
import { Devs } from "../utils/constants";
import definePlugin from "../utils/types";
import { find, findByProps } from "../webpack";
diff --git a/src/plugins/muteNewGuild.ts b/src/plugins/muteNewGuild.ts
index 8b9a33d..428060f 100644
--- a/src/plugins/muteNewGuild.ts
+++ b/src/plugins/muteNewGuild.ts
@@ -1,5 +1,5 @@
import definePlugin from "../utils/types";
-import {Devs} from "../utils/constants";
+import { Devs } from "../utils/constants";
export default definePlugin({
name: "MuteNewGuild",
@@ -14,4 +14,4 @@ export default definePlugin({
}
}
],
-})
+});
diff --git a/src/plugins/nitroBypass.ts b/src/plugins/nitroBypass.ts
index d96ff0d..c5d69a4 100644
--- a/src/plugins/nitroBypass.ts
+++ b/src/plugins/nitroBypass.ts
@@ -1,8 +1,8 @@
-import { addPreSendListener, addPreEditListener, SendListener, removePreSendListener, removePreEditListener } from '../api/MessageEvents';
+import { addPreSendListener, addPreEditListener, removePreSendListener, removePreEditListener } from "../api/MessageEvents";
import { findByProps } from "../webpack";
import definePlugin from "../utils/types";
-import { Devs } from '../utils/constants';
-import { UserStore } from '../webpack/common';
+import { Devs } from "../utils/constants";
+import { UserStore } from "../webpack/common";
export default definePlugin({
name: "NitroBypass",
@@ -11,7 +11,7 @@ export default definePlugin({
dependencies: ["MessageEventsAPI"],
patches: [
{
- find: `canUseAnimatedEmojis:function`,
+ find: "canUseAnimatedEmojis:function",
replacement: [
"canUseAnimatedEmojis",
"canUseEmojisEverywhere",
@@ -58,8 +58,8 @@ export default definePlugin({
if (!emoji.require_colons) continue;
if (emoji.guildId === guildId && !emoji.animated) continue;
- const emojiString = `<${emoji.animated ? 'a' : ''}:${emoji.originalName || emoji.name}:${emoji.id}>`;
- const url = emoji.url.replace(/\?size=[0-9]+/, `?size=48`);
+ const emojiString = `<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`;
+ const url = emoji.url.replace(/\?size=[0-9]+/, "?size=48");
messageObj.content = messageObj.content.replace(emojiString, (match, offset, origStr) => {
return `${getWordBoundary(origStr, offset - 1)}${url}${getWordBoundary(origStr, offset + match.length)}`;
});
@@ -74,7 +74,7 @@ export default definePlugin({
if (emoji == null || (emoji.guildId === guildId && !emoji.animated)) continue;
if (!emoji.require_colons) continue;
- const url = emoji.url.replace(/\?size=[0-9]+/, `?size=48`);
+ const url = emoji.url.replace(/\?size=[0-9]+/, "?size=48");
messageObj.content = messageObj.content.replace(emojiStr, (match, offset, origStr) => {
return `${getWordBoundary(origStr, offset - 1)}${url}${getWordBoundary(origStr, offset + match.length)}`;
});
diff --git a/src/plugins/noReplyMention.ts b/src/plugins/noReplyMention.ts
index 4d4ceb3..b736c26 100644
--- a/src/plugins/noReplyMention.ts
+++ b/src/plugins/noReplyMention.ts
@@ -16,4 +16,4 @@ export default definePlugin({
}
}
]
-})
+});
diff --git a/src/plugins/noTrack.ts b/src/plugins/noTrack.ts
index 13b52f8..b82c83f 100644
--- a/src/plugins/noTrack.ts
+++ b/src/plugins/noTrack.ts
@@ -1,5 +1,5 @@
import definePlugin from "../utils/types";
-import { Devs } from '../utils/constants';
+import { Devs } from "../utils/constants";
export default definePlugin({
name: "NoTrack",
diff --git a/src/plugins/randomiseFileNames.ts b/src/plugins/randomiseFileNames.ts
index 3826711..02166bf 100644
--- a/src/plugins/randomiseFileNames.ts
+++ b/src/plugins/randomiseFileNames.ts
@@ -23,6 +23,6 @@ export default definePlugin({
{ length: 7 },
() => chars[Math.floor(Math.random() * chars.length)]
).join("");
- return rand + (file.lastIndexOf(".") > -1 ? file.slice(file.lastIndexOf(".")) : "")
+ return rand + (file.lastIndexOf(".") > -1 ? file.slice(file.lastIndexOf(".")) : "");
},
});
diff --git a/src/plugins/settings.ts b/src/plugins/settings.ts
index 7125823..afd3fd3 100644
--- a/src/plugins/settings.ts
+++ b/src/plugins/settings.ts
@@ -1,6 +1,6 @@
import definePlugin from "../utils/types";
import gitHash from "git-hash";
-import { Devs } from '../utils/constants';
+import { Devs } from "../utils/constants";
export default definePlugin({
name: "Settings",
@@ -30,8 +30,8 @@ export default definePlugin({
match: /\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/,
replace: (m, mod) =>
`{section:${mod}.ID.HEADER,label:"Vencord"},` +
- `{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},` +
- `{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater,predicate:()=>!IS_WEB},` +
+ '{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},' +
+ '{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater,predicate:()=>!IS_WEB},' +
`{section:${mod}.ID.DIVIDER},${m}`
}
diff --git a/src/plugins/silentTyping.ts b/src/plugins/silentTyping.ts
index 56ef30d..9bba0ca 100644
--- a/src/plugins/silentTyping.ts
+++ b/src/plugins/silentTyping.ts
@@ -1,5 +1,5 @@
-import definePlugin from '../utils/types';
-import { Devs } from '../utils/constants';
+import definePlugin from "../utils/types";
+import { Devs } from "../utils/constants";
export default definePlugin({
name: "SilentTyping",
diff --git a/src/plugins/unindent.ts b/src/plugins/unindent.ts
index 608020f..f6eca1d 100644
--- a/src/plugins/unindent.ts
+++ b/src/plugins/unindent.ts
@@ -1,6 +1,6 @@
import definePlugin from "../utils/types";
-import { addPreSendListener, addPreEditListener, MessageObject, removePreSendListener, removePreEditListener } from '../api/MessageEvents';
-import { Devs } from '../utils/constants';
+import { addPreSendListener, addPreEditListener, MessageObject, removePreSendListener, removePreEditListener } from "../api/MessageEvents";
+import { Devs } from "../utils/constants";
export default definePlugin({
name: "Unindent",
diff --git a/src/plugins/viewIcons.tsx b/src/plugins/viewIcons.tsx
index 2ac0ab1..2b404f2 100644
--- a/src/plugins/viewIcons.tsx
+++ b/src/plugins/viewIcons.tsx
@@ -1,6 +1,6 @@
import { Devs } from "../utils/constants";
import IpcEvents from "../utils/IpcEvents";
-import definePlugin from '../utils/types';
+import definePlugin from "../utils/types";
const OPEN_URL = "Vencord.Plugins.plugins.ViewIcons.openImage(";
export default definePlugin({