From ae892536ac5cd3c3ca7ce5f43c92a617a2aa2eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicole=20Miko=C5=82ajczyk?= Date: Fri, 28 Mar 2025 23:25:47 +0100 Subject: [PATCH] pl-api: lint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicole Mikołajczyk --- packages/pl-api/.eslintrc.json | 6 ++++-- packages/pl-api/lib/client.ts | 7 +++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/pl-api/.eslintrc.json b/packages/pl-api/.eslintrc.json index 5fc0039c8..5981be175 100644 --- a/packages/pl-api/.eslintrc.json +++ b/packages/pl-api/.eslintrc.json @@ -130,7 +130,9 @@ "vars": "all", "args": "none", "ignoreRestSiblings": true, - "caughtErrors": "none" + "caughtErrors": "none", + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_" } ], "no-useless-escape": "warn", @@ -213,4 +215,4 @@ "parser": "@typescript-eslint/parser" } ] -} \ No newline at end of file +} diff --git a/packages/pl-api/lib/client.ts b/packages/pl-api/lib/client.ts index 344b72a07..ca12aae14 100644 --- a/packages/pl-api/lib/client.ts +++ b/packages/pl-api/lib/client.ts @@ -79,6 +79,7 @@ import { } from './entities'; import { circleSchema } from './entities/circle'; import { type GroupedNotificationsResults, groupedNotificationsResultsSchema, type NotificationGroup } from './entities/grouped-notifications-results'; +import { ShoutMessage, shoutMessageSchema } from './entities/shout-message'; import { filteredArray } from './entities/utils'; import { AKKOMA, type Features, getFeatures, GOTOSOCIAL, MITRA, PIXELFED } from './features'; import request, { getNextLink, getPrevLink, type RequestBody, type RequestMeta } from './request'; @@ -251,7 +252,6 @@ import type { GetTrendingTags, } from './params/trends'; import type { PaginatedResponse } from './responses'; -import { ShoutMessage, shoutMessageSchema } from './entities/shout-message'; const GROUPED_TYPES = ['favourite', 'reblog', 'emoji_reaction', 'event_reminder', 'participation_accepted', 'participation_request']; @@ -289,7 +289,7 @@ class PlApiClient { #shoutSocket?: { message: (text: string) => void; close: () => void; - } + }; /** * @@ -2782,7 +2782,6 @@ class PlApiClient { const ws = new WebSocket(path); ws.onmessage = (event) => { - // @eslint-disable-next-line @typescript-eslint/no-unused-vars const [_, __, ___, type, payload] = JSON.parse(event.data as string); if (type === 'new_msg') { const message = v.parse(payload, shoutMessageSchema); @@ -2807,7 +2806,7 @@ class PlApiClient { }, }; }, - } + }; public readonly notifications = { /**