From 452f29bcb385c89052f70c225b3468f395969a82 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 4 Dec 2023 23:12:33 -0800 Subject: [PATCH] Revert "chore: :rotating_light: lint" This reverts commit f7ce60cd9f6a6f92aed1f5bc4d0893105c272708. --- packages/client/src/account.ts | 6 +++--- packages/client/src/i18n.ts | 2 +- packages/client/src/init.ts | 2 +- packages/client/src/navbar.ts | 2 +- packages/client/src/nirax.ts | 4 ++-- packages/client/src/os.ts | 14 +++++++------- packages/client/src/pizzax.ts | 2 +- packages/client/src/plugin.ts | 2 +- packages/client/src/reactiveAccount.ts | 2 +- packages/client/src/router.ts | 4 ++-- packages/client/src/stream.ts | 4 ++-- packages/client/src/theme-store.ts | 2 +- packages/firefish-js/src/api.types.ts | 10 +++++----- packages/firefish-js/src/index.ts | 4 ++-- packages/firefish-js/src/streaming.ts | 6 +++--- packages/megalodon/src/index.ts | 16 ++++++++-------- packages/megalodon/src/megalodon.ts | 10 +++++----- packages/megalodon/src/misskey.ts | 20 ++++++++++---------- 18 files changed, 56 insertions(+), 56 deletions(-) diff --git a/packages/client/src/account.ts b/packages/client/src/account.ts index d89dd2499..562a9e542 100644 --- a/packages/client/src/account.ts +++ b/packages/client/src/account.ts @@ -1,12 +1,12 @@ +import type * as firefish from "firefish-js"; +import { defineAsyncComponent } from "vue"; +import { i18n } from "./i18n"; import { apiUrl } from "@/config"; import { alert, api, popup, popupMenu, waiting } from "@/os"; import { $i } from "@/reactiveAccount"; import icon from "@/scripts/icon"; import { del, get, set } from "@/scripts/idb-proxy"; import { reloadChannel, unisonReload } from "@/scripts/unison-reload"; -import type * as firefish from "firefish-js"; -import { defineAsyncComponent } from "vue"; -import { i18n } from "./i18n"; // TODO: 他のタブと永続化されたstateを同期 diff --git a/packages/client/src/i18n.ts b/packages/client/src/i18n.ts index 31a6686f1..5b0a7f9ed 100644 --- a/packages/client/src/i18n.ts +++ b/packages/client/src/i18n.ts @@ -1,6 +1,6 @@ +import { markRaw } from "vue"; import { locale } from "@/config"; import { I18n } from "@/scripts/i18n"; -import { markRaw } from "vue"; export const i18n = markRaw(new I18n(locale)); diff --git a/packages/client/src/init.ts b/packages/client/src/init.ts index be93c75fb..b758b4c99 100644 --- a/packages/client/src/init.ts +++ b/packages/client/src/init.ts @@ -22,7 +22,6 @@ if (accounts) { } // #endregion -import { set } from "@/scripts/idb-proxy"; import { compareVersions } from "compare-versions"; import { computed, @@ -32,6 +31,7 @@ import { version as vueVersion, watch, } from "vue"; +import { set } from "@/scripts/idb-proxy"; import { login, refreshAccount, signout, updateAccount } from "@/account"; import components from "@/components"; diff --git a/packages/client/src/navbar.ts b/packages/client/src/navbar.ts index 7a120c520..55cfab5bb 100644 --- a/packages/client/src/navbar.ts +++ b/packages/client/src/navbar.ts @@ -1,3 +1,4 @@ +import { computed, reactive } from "vue"; import { ui } from "@/config"; import { i18n } from "@/i18n"; import * as os from "@/os"; @@ -5,7 +6,6 @@ import { $i } from "@/reactiveAccount"; import icon from "@/scripts/icon"; import { search } from "@/scripts/search"; import { unisonReload } from "@/scripts/unison-reload"; -import { computed, reactive } from "vue"; export const navbarItemDef = reactive({ notifications: { diff --git a/packages/client/src/nirax.ts b/packages/client/src/nirax.ts index ed1a57bbf..800d47042 100644 --- a/packages/client/src/nirax.ts +++ b/packages/client/src/nirax.ts @@ -1,10 +1,10 @@ // NIRAX --- A lightweight router -import { pleaseLogin } from "@/scripts/please-login"; -import { safeURIDecode } from "@/scripts/safe-uri-decode"; import { EventEmitter } from "eventemitter3"; import type { Component, ShallowRef } from "vue"; import { shallowRef } from "vue"; +import { safeURIDecode } from "@/scripts/safe-uri-decode"; +import { pleaseLogin } from "@/scripts/please-login"; interface RouteDef { path: string; diff --git a/packages/client/src/os.ts b/packages/client/src/os.ts index 022cd1bd8..d367dc2fc 100644 --- a/packages/client/src/os.ts +++ b/packages/client/src/os.ts @@ -1,18 +1,18 @@ // TODO: なんでもかんでもos.tsに突っ込むのやめたいのでよしなに分割する -import MkDialog from "@/components/MkDialog.vue"; -import MkPostFormDialog from "@/components/MkPostFormDialog.vue"; -import MkToast from "@/components/MkToast.vue"; -import MkWaitingDialog from "@/components/MkWaitingDialog.vue"; -import { url, apiUrl } from "@/config"; -import { $i } from "@/reactiveAccount"; -import type { MenuItem } from "@/types/menu"; import { EventEmitter } from "eventemitter3"; import * as firefish from "firefish-js"; import insertTextAtCursor from "insert-text-at-cursor"; import type { Component, Ref } from "vue"; import { defineAsyncComponent, markRaw, ref } from "vue"; import { i18n } from "./i18n"; +import MkDialog from "@/components/MkDialog.vue"; +import MkPostFormDialog from "@/components/MkPostFormDialog.vue"; +import MkToast from "@/components/MkToast.vue"; +import MkWaitingDialog from "@/components/MkWaitingDialog.vue"; +import { apiUrl, url } from "@/config"; +import { $i } from "@/reactiveAccount"; +import type { MenuItem } from "@/types/menu"; export const pendingApiRequestsCount = ref(0); diff --git a/packages/client/src/pizzax.ts b/packages/client/src/pizzax.ts index 489a740ef..a16c8067f 100644 --- a/packages/client/src/pizzax.ts +++ b/packages/client/src/pizzax.ts @@ -1,10 +1,10 @@ // PIZZAX --- A lightweight store -import { $i } from "@/reactiveAccount"; import type { Ref } from "vue"; import { onUnmounted, ref, watch } from "vue"; import { api } from "./os"; import { stream } from "./stream"; +import { $i } from "@/reactiveAccount"; type StateDef = Record< string, diff --git a/packages/client/src/plugin.ts b/packages/client/src/plugin.ts index 2789cc793..c38aaa365 100644 --- a/packages/client/src/plugin.ts +++ b/packages/client/src/plugin.ts @@ -1,3 +1,4 @@ +import { Interpreter, Parser, utils, values } from "@syuilo/aiscript"; import { inputText } from "@/os"; import { createAiScriptEnv } from "@/scripts/aiscript/api"; import { @@ -7,7 +8,6 @@ import { postFormActions, userActions, } from "@/store"; -import { Interpreter, Parser, utils, values } from "@syuilo/aiscript"; const parser = new Parser(); const pluginContexts = new Map(); diff --git a/packages/client/src/reactiveAccount.ts b/packages/client/src/reactiveAccount.ts index c192cdb7c..46ff24992 100644 --- a/packages/client/src/reactiveAccount.ts +++ b/packages/client/src/reactiveAccount.ts @@ -1,5 +1,5 @@ -import type { Account } from "@/account"; import { reactive } from "vue"; +import type { Account } from "@/account"; const accountData = localStorage.getItem("account"); diff --git a/packages/client/src/router.ts b/packages/client/src/router.ts index c1aaeb5b9..5dff5a4ba 100644 --- a/packages/client/src/router.ts +++ b/packages/client/src/router.ts @@ -1,10 +1,10 @@ +import type { AsyncComponentLoader } from "vue"; +import { defineAsyncComponent, inject } from "vue"; import { iAmModerator } from "@/account"; import { Router } from "@/nirax"; import MkError from "@/pages/_error_.vue"; import MkLoading from "@/pages/_loading_.vue"; import { $i } from "@/reactiveAccount"; -import type { AsyncComponentLoader } from "vue"; -import { defineAsyncComponent, inject } from "vue"; // import { api } from "@/os"; // function getGuestTimelineStatus() { diff --git a/packages/client/src/stream.ts b/packages/client/src/stream.ts index a1a9fbf78..f0dd1879a 100644 --- a/packages/client/src/stream.ts +++ b/packages/client/src/stream.ts @@ -1,7 +1,7 @@ -import { url } from "@/config"; -import { $i } from "@/reactiveAccount"; import * as firefish from "firefish-js"; import { markRaw } from "vue"; +import { url } from "@/config"; +import { $i } from "@/reactiveAccount"; export const stream = markRaw( new firefish.Stream( diff --git a/packages/client/src/theme-store.ts b/packages/client/src/theme-store.ts index a60d8e8c6..866ba064c 100644 --- a/packages/client/src/theme-store.ts +++ b/packages/client/src/theme-store.ts @@ -1,6 +1,6 @@ +import type { Theme } from "./scripts/theme"; import { api } from "@/os"; import { $i } from "@/reactiveAccount"; -import type { Theme } from "./scripts/theme"; const lsCacheKey = $i ? `themes:${$i.id}` : ""; diff --git a/packages/firefish-js/src/api.types.ts b/packages/firefish-js/src/api.types.ts index c2344991d..626bdaad0 100644 --- a/packages/firefish-js/src/api.types.ts +++ b/packages/firefish-js/src/api.types.ts @@ -11,30 +11,30 @@ import { DetailedInstanceMetadata, DriveFile, DriveFolder, - FollowRequest, Following, FollowingFolloweePopulated, FollowingFollowerPopulated, + FollowRequest, GalleryPost, Instance, InstanceMetadata, LiteInstanceMetadata, MeDetailed, - MessagingMessage, Note, NoteFavorite, - NoteReaction, - Notification, OriginType, Page, ServerInfo, - Signin, Stats, User, UserDetailed, UserGroup, UserList, UserSorting, + Notification, + NoteReaction, + Signin, + MessagingMessage, } from "./entities"; type TODO = Record | null; diff --git a/packages/firefish-js/src/index.ts b/packages/firefish-js/src/index.ts index c0212f850..128ed8c53 100644 --- a/packages/firefish-js/src/index.ts +++ b/packages/firefish-js/src/index.ts @@ -1,8 +1,8 @@ -import { Acct } from "./acct"; import { Endpoints } from "./api.types"; -import * as consts from "./consts"; import Stream, { Connection } from "./streaming"; import { Channels } from "./streaming.types"; +import { Acct } from "./acct"; +import * as consts from "./consts"; export { Endpoints, Stream, Connection as ChannelConnection, Channels, Acct }; diff --git a/packages/firefish-js/src/streaming.ts b/packages/firefish-js/src/streaming.ts index b3c2819d4..4697acabd 100644 --- a/packages/firefish-js/src/streaming.ts +++ b/packages/firefish-js/src/streaming.ts @@ -27,9 +27,9 @@ export function urlQuery( const params = Object.entries(obj) .filter(([, v]) => (Array.isArray(v) ? v.length : v !== undefined)) .reduce( - // biome-ignore lint/suspicious/noAssignInExpressions: - // biome-ignore lint/style/noNonNullAssertion: <> - // biome-ignore lint/style/noCommaOperator: <> + // rome-ignore lint/suspicious/noAssignInExpressions: + // rome-ignore lint/style/noNonNullAssertion: <> + // rome-ignore lint/style/noCommaOperator: <> (a, [k, v]) => ((a[k] = v!), a), {} as Record, ); diff --git a/packages/megalodon/src/index.ts b/packages/megalodon/src/index.ts index c20598872..758d3a46a 100644 --- a/packages/megalodon/src/index.ts +++ b/packages/megalodon/src/index.ts @@ -1,17 +1,17 @@ -import { RequestCanceledError, isCancel } from "./cancel"; -import Converter from "./converter"; -import Entity from "./entity"; -import FilterContext from "./filter_context"; +import Response from "./response"; +import OAuth from "./oauth"; +import { isCancel, RequestCanceledError } from "./cancel"; +import { ProxyConfig } from "./proxy_config"; import generator, { + detector, MegalodonInterface, WebSocketInterface, - detector, } from "./megalodon"; import Misskey from "./misskey"; +import Entity from "./entity"; import NotificationType from "./notification"; -import OAuth from "./oauth"; -import { ProxyConfig } from "./proxy_config"; -import Response from "./response"; +import FilterContext from "./filter_context"; +import Converter from "./converter"; export { Response, diff --git a/packages/megalodon/src/megalodon.ts b/packages/megalodon/src/megalodon.ts index 0b760fe87..33a5790f6 100644 --- a/packages/megalodon/src/megalodon.ts +++ b/packages/megalodon/src/megalodon.ts @@ -1,10 +1,10 @@ -import axios, { AxiosRequestConfig } from "axios"; -import { DEFAULT_UA } from "./default"; -import Entity from "./entity"; -import Misskey from "./misskey"; +import Response from "./response"; import OAuth from "./oauth"; import proxyAgent, { ProxyConfig } from "./proxy_config"; -import Response from "./response"; +import Entity from "./entity"; +import axios, { AxiosRequestConfig } from "axios"; +import Misskey from "./misskey"; +import { DEFAULT_UA } from "./default"; export interface WebSocketInterface { start(): void; diff --git a/packages/megalodon/src/misskey.ts b/packages/megalodon/src/misskey.ts index 1c2c2ad6d..25922a2ff 100644 --- a/packages/megalodon/src/misskey.ts +++ b/packages/megalodon/src/misskey.ts @@ -1,22 +1,22 @@ -import AsyncLock from "async-lock"; import FormData from "form-data"; +import AsyncLock from "async-lock"; -import fs from "node:fs"; -import MegalodonEntity from "@/entity"; +import MisskeyAPI from "./misskey/api_client"; import { DEFAULT_UA } from "./default"; +import { ProxyConfig } from "./proxy_config"; +import OAuth from "./oauth"; +import Response from "./response"; import Entity from "./entity"; import { - ArgumentError, MegalodonInterface, - NoImplementedError, - UnexpectedError, WebSocketInterface, + NoImplementedError, + ArgumentError, + UnexpectedError, } from "./megalodon"; -import MisskeyAPI from "./misskey/api_client"; +import MegalodonEntity from "@/entity"; +import fs from "node:fs"; import MisskeyNotificationType from "./misskey/notification"; -import OAuth from "./oauth"; -import { ProxyConfig } from "./proxy_config"; -import Response from "./response"; type AccountCache = { locks: AsyncLock;