From 2ad3421b44a5849005af91718b66a4fc76cced4d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 21 Dec 2021 03:51:22 +0000 Subject: Automatically format code --- .eslintrc.json | 25 ++++++------------------- .prettierrc.json | 12 +++--------- src/listeners/message/blacklistedFile.ts | 8 ++------ 3 files changed, 11 insertions(+), 34 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 3e79826..de3fb7c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -3,24 +3,15 @@ "es2021": true, "node": true }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "prettier" - ], + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 12, "sourceType": "module", "project": "./tsconfig.json" }, - "plugins": [ - "@typescript-eslint", - "deprecation" - ], - "ignorePatterns": [ - "dist" - ], + "plugins": ["@typescript-eslint", "deprecation"], + "ignorePatterns": ["dist"], "rules": { "no-return-await": "off", "@typescript-eslint/no-empty-interface": "warn", @@ -56,9 +47,7 @@ "error", { "allowDestructuring": true, - "allowedNames": [ - "that" - ] + "allowedNames": ["that"] } ], "@typescript-eslint/no-unused-vars": [ @@ -68,9 +57,7 @@ } ], "no-implied-eval": "off", - "@typescript-eslint/no-implied-eval": [ - "error" - ], + "@typescript-eslint/no-implied-eval": ["error"], "deprecation/deprecation": "warn" } -} \ No newline at end of file +} diff --git a/.prettierrc.json b/.prettierrc.json index 85b85a1..6797105 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -7,23 +7,17 @@ "endOfLine": "lf", "overrides": [ { - "files": [ - "*BushClientEvents.d.ts" - ], + "files": ["*BushClientEvents.d.ts"], "options": { "printWidth": 80 } }, { - "files": [ - "badwords.ts", - "badlinks.ts", - "badlinks-secret.ts" - ], + "files": ["badwords.ts", "badlinks.ts", "badlinks-secret.ts"], "options": { "singleQuote": false, "trailingComma": "es5" } } ] -} \ No newline at end of file +} diff --git a/src/listeners/message/blacklistedFile.ts b/src/listeners/message/blacklistedFile.ts index ac1fd02..26e1719 100644 --- a/src/listeners/message/blacklistedFile.ts +++ b/src/listeners/message/blacklistedFile.ts @@ -105,9 +105,7 @@ export default class BlacklistedFileListener extends BushListener { for (const attachment of foundEmojis) { try { const req = await got.get( - `https://cdn.discordapp.com/emojis/${attachment.groups?.id}.${ - attachment.groups?.animated === 'a' ? 'gif' : 'png' - }` + `https://cdn.discordapp.com/emojis/${attachment.groups?.id}.${attachment.groups?.animated === 'a' ? 'gif' : 'png'}` ); const rawHash = crypto.createHash('md5'); rawHash.update(req.rawBody.toString('binary')); @@ -145,9 +143,7 @@ export default class BlacklistedFileListener extends BushListener { ); void client.console.warn( 'blacklistedFile', - `Failed to delete <<${foundFiles.map((f) => f.description).join(' and ')}>> sent by <<${ - message.author.tag - }>> in <<${ + `Failed to delete <<${foundFiles.map((f) => f.description).join(' and ')}>> sent by <<${message.author.tag}>> in <<${ message.channel.type === 'DM' ? `${message.channel.recipient.tag}'s DMs` : message.channel.name }>>.` ); -- cgit