From 33519b2be710dfcf3b3ab00042d4ecf5dd14cb33 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 12 Jul 2023 08:37:34 -0400 Subject: [PATCH] Upgrade prettier. --- package.json | 2 +- src/http.ts | 154 +++++++++++++++++++++++++-------------------------- src/index.ts | 2 +- yarn.lock | 8 +-- 4 files changed, 83 insertions(+), 83 deletions(-) diff --git a/package.json b/package.json index f070d670..94106b40 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "eslint-plugin-prettier": "^4.2.1", "husky": "^8.0.3", "lint-staged": "^13.2.2", - "prettier": "^2.8.8", + "prettier": "^3.0.0", "prettier-plugin-import-sort": "^0.0.7", "prettier-plugin-organize-imports": "^3.2.2", "prettier-plugin-packagejson": "^2.4.3", diff --git a/src/http.ts b/src/http.ts index 1992d639..50aa84ee 100644 --- a/src/http.ts +++ b/src/http.ts @@ -160,7 +160,7 @@ export class LemmyHttp { options?: { fetchFunction?: typeof fetch; headers?: { [key: string]: string }; - } + }, ) { this.#apiUrl = `${baseUrl.replace(/\/+$/, "")}/api/${VERSION}`; this.#pictrsUrl = `${baseUrl}/pictrs/image`; @@ -191,7 +191,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/site", - form + form, ); } @@ -213,7 +213,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/user/leave_admin", - form + form, ); } @@ -226,7 +226,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/modlog", - form + form, ); } @@ -248,7 +248,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/resolve_object", - form + form, ); } @@ -261,7 +261,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/community", - form + form, ); } @@ -274,7 +274,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/community", - form + form, ); } @@ -287,7 +287,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Put, "/community", - form + form, ); } @@ -300,7 +300,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/community/list", - form + form, ); } @@ -313,7 +313,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/community/follow", - form + form, ); } @@ -326,7 +326,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/community/block", - form + form, ); } @@ -339,7 +339,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/community/delete", - form + form, ); } @@ -352,7 +352,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/community/remove", - form + form, ); } @@ -365,7 +365,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/community/transfer", - form + form, ); } @@ -378,7 +378,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/community/ban_user", - form + form, ); } @@ -391,7 +391,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/community/mod", - form + form, ); } @@ -404,7 +404,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/post", - form + form, ); } @@ -435,7 +435,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/post/delete", - form + form, ); } @@ -448,7 +448,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/post/remove", - form + form, ); } @@ -461,7 +461,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/post/mark_as_read", - form + form, ); } @@ -474,7 +474,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/post/lock", - form + form, ); } @@ -487,7 +487,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/post/feature", - form + form, ); } @@ -500,7 +500,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/post/list", - form + form, ); } @@ -513,7 +513,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/post/like", - form + form, ); } @@ -526,7 +526,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Put, "/post/save", - form + form, ); } @@ -539,7 +539,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/post/report", - form + form, ); } @@ -552,7 +552,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Put, "/post/report/resolve", - form + form, ); } @@ -565,7 +565,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/post/report/list", - form + form, ); } @@ -578,7 +578,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/post/site_metadata", - form + form, ); } @@ -591,7 +591,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/comment", - form + form, ); } @@ -604,7 +604,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Put, "/comment", - form + form, ); } @@ -617,7 +617,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/comment/delete", - form + form, ); } @@ -630,7 +630,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/comment/remove", - form + form, ); } @@ -643,7 +643,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/comment/mark_as_read", - form + form, ); } @@ -656,7 +656,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/comment/like", - form + form, ); } @@ -669,7 +669,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Put, "/comment/save", - form + form, ); } @@ -682,7 +682,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/comment/distinguish", - form + form, ); } @@ -695,7 +695,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/comment/list", - form + form, ); } @@ -708,7 +708,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/comment", - form + form, ); } @@ -721,7 +721,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/comment/report", - form + form, ); } @@ -734,7 +734,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Put, "/comment/report/resolve", - form + form, ); } @@ -747,7 +747,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/comment/report/list", - form + form, ); } @@ -760,7 +760,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/private_message/list", - form + form, ); } @@ -773,7 +773,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/private_message", - form + form, ); } @@ -786,7 +786,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Put, "/private_message", - form + form, ); } @@ -799,7 +799,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/private_message/delete", - form + form, ); } @@ -812,7 +812,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/private_message/mark_as_read", - form + form, ); } @@ -861,7 +861,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/user/register", - form + form, ); } @@ -874,7 +874,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/user/login", - form + form, ); } @@ -887,7 +887,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/user", - form + form, ); } @@ -900,7 +900,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/user/mention", - form + form, ); } @@ -913,7 +913,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/user/mention/mark_as_read", - form + form, ); } @@ -926,7 +926,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/user/replies", - form + form, ); } @@ -939,7 +939,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/user/ban", - form + form, ); } @@ -952,7 +952,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/user/banned", - form + form, ); } @@ -965,7 +965,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/user/block", - form + form, ); } @@ -978,7 +978,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/user/get_captcha", - form + form, ); } @@ -991,7 +991,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/user/delete_account", - form + form, ); } @@ -1004,7 +1004,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/user/password_reset", - form + form, ); } @@ -1017,7 +1017,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/user/password_change", - form + form, ); } @@ -1030,7 +1030,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/user/mark_all_as_read", - form + form, ); } @@ -1043,7 +1043,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Put, "/user/save_user_settings", - form + form, ); } @@ -1056,7 +1056,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Put, "/user/change_password", - form + form, ); } @@ -1069,7 +1069,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/user/report_count", - form + form, ); } @@ -1082,7 +1082,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/user/unread_count", - form + form, ); } @@ -1095,7 +1095,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/user/verify_email", - form + form, ); } @@ -1108,7 +1108,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/admin/add", - form + form, ); } @@ -1118,7 +1118,7 @@ export class LemmyHttp { * `HTTP.GET /admin/registration_application/count` */ getUnreadRegistrationApplicationCount( - form: GetUnreadRegistrationApplicationCount + form: GetUnreadRegistrationApplicationCount, ) { return this.#wrapper< GetUnreadRegistrationApplicationCount, @@ -1159,7 +1159,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/admin/purge/person", - form + form, ); } @@ -1172,7 +1172,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/admin/purge/community", - form + form, ); } @@ -1185,7 +1185,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/admin/purge/post", - form + form, ); } @@ -1198,7 +1198,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/admin/purge/comment", - form + form, ); } @@ -1211,7 +1211,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/custom_emoji", - form + form, ); } @@ -1224,7 +1224,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Put, "/custom_emoji", - form + form, ); } @@ -1237,7 +1237,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Post, "/custom_emoji/delete", - form + form, ); } @@ -1250,7 +1250,7 @@ export class LemmyHttp { return this.#wrapper( HttpType.Get, "/federated_instances", - form + form, ); } @@ -1310,7 +1310,7 @@ export class LemmyHttp { async #wrapper( type_: HttpType, endpoint: string, - form: BodyType + form: BodyType, ): Promise { let response: Response; if (type_ === HttpType.Get) { diff --git a/src/index.ts b/src/index.ts index 9113afcd..0f6a5ec8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -246,4 +246,4 @@ export { UserJoin } from "./types/UserJoin"; export { UserJoinResponse } from "./types/UserJoinResponse"; export { VerifyEmail } from "./types/VerifyEmail"; export { VerifyEmailResponse } from "./types/VerifyEmailResponse"; -export { ImageFile, UploadImage, UploadImageResponse } from "./types/others"; +export { UploadImage, UploadImageResponse, ImageFile } from "./types/others"; diff --git a/yarn.lock b/yarn.lock index 0d1f058f..3225d72f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1808,10 +1808,10 @@ prettier-plugin-packagejson@^2.4.3: sort-package-json "2.4.1" synckit "0.8.5" -prettier@^2.8.8: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.0.tgz#e7b19f691245a21d618c68bc54dc06122f6105ae" + integrity sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g== punycode@^2.1.0: version "2.1.1"