summaryrefslogtreecommitdiff
path: root/packages/frontend/src
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-02-15 10:24:22 +0900
committerGitHub <noreply@github.com>2025-02-15 10:24:22 +0900
commitffd8cf07e683eae95858d89fa9e5d85bf271c4d6 (patch)
tree8bfb9ce0377ff711d60460ed8676f830c3a570ee /packages/frontend/src
parentfix(frontend): Play の再読込時に UI が以前の状態を引き継い... (diff)
downloadmisskey-ffd8cf07e683eae95858d89fa9e5d85bf271c4d6.tar.gz
misskey-ffd8cf07e683eae95858d89fa9e5d85bf271c4d6.tar.bz2
misskey-ffd8cf07e683eae95858d89fa9e5d85bf271c4d6.zip
update deps (#15311)
* wip * bump misskey-dev/eslint-plugin * lint fixes (backend) * lint fixes (frontend) * lint fixes (frontend-embed) * rollback nsfwjs to 4.2.0 ref: infinitered/nsfwjs#904 * rollback openapi-typescript to v6 v7でOpenAPIのバリデーションが入るようになった関係でスコープ外での変更が避けられないため一時的に戻した * lint fixes (misskey-js) * temporarily disable errored lint rule (frontend-shared) * fix lint * temporarily ignore errored file for lint (frontend-shared) * rollback simplewebauthn/server to 12.0.0 v13 contains breaking changes that require some decision making * lint fixes (frontend-shared) * build misskey-js with types * fix(backend): migrate simplewebauthn/server to v12 * fix(misskey-js/autogen): ignore indent rules to generate consistent output * attempt to fix test changes due to capricorn86/happy-dom#1617 (XMLSerializer now produces valid XML) * attempt to fix test changes due to capricorn86/happy-dom#1617 (XMLSerializer now produces valid XML) * fix test * fix test * fix test * Apply suggestions from code review Co-authored-by: anatawa12 <anatawa12@icloud.com> * bump summaly to v5.2.0 * update tabler-icons to v3.30.0-based --------- Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Co-authored-by: anatawa12 <anatawa12@icloud.com>
Diffstat (limited to 'packages/frontend/src')
-rw-r--r--packages/frontend/src/components/MkCaptcha.vue2
-rw-r--r--packages/frontend/src/components/MkDialog.vue1
-rw-r--r--packages/frontend/src/components/MkNotificationSelectWindow.vue2
-rw-r--r--packages/frontend/src/components/MkSortOrderEditor.define.ts4
-rw-r--r--packages/frontend/src/components/MkSystemWebhookEditor.vue2
-rw-r--r--packages/frontend/src/components/MkTimeline.vue18
-rw-r--r--packages/frontend/src/components/MkUserAnnouncementEditDialog.vue2
-rw-r--r--packages/frontend/src/components/grid/MkGrid.vue2
-rw-r--r--packages/frontend/src/components/grid/cell-validators.ts8
-rw-r--r--packages/frontend/src/components/grid/cell.ts6
-rw-r--r--packages/frontend/src/components/grid/column.ts2
-rw-r--r--packages/frontend/src/components/grid/grid.ts8
-rw-r--r--packages/frontend/src/components/grid/row.ts6
-rw-r--r--packages/frontend/src/local-storage.ts3
-rw-r--r--packages/frontend/src/nirax.ts2
-rw-r--r--packages/frontend/src/pages/admin/custom-emojis-manager.local.list.vue2
-rw-r--r--packages/frontend/src/pages/admin/custom-emojis-manager.local.register.vue2
-rw-r--r--packages/frontend/src/pages/admin/custom-emojis-manager.remote.vue2
-rw-r--r--packages/frontend/src/pages/search.note.vue2
-rw-r--r--packages/frontend/src/scripts/aiscript/api.ts2
-rw-r--r--packages/frontend/src/scripts/file-drop.ts2
-rw-r--r--packages/frontend/src/scripts/format-time-string.ts2
-rw-r--r--packages/frontend/src/scripts/key-event.ts14
-rw-r--r--packages/frontend/src/scripts/stream-mock.ts6
-rw-r--r--packages/frontend/src/store.ts2
-rw-r--r--packages/frontend/src/types/menu.ts2
26 files changed, 55 insertions, 51 deletions
diff --git a/packages/frontend/src/components/MkCaptcha.vue b/packages/frontend/src/components/MkCaptcha.vue
index b1167bbac6..134f8226d4 100644
--- a/packages/frontend/src/components/MkCaptcha.vue
+++ b/packages/frontend/src/components/MkCaptcha.vue
@@ -50,6 +50,8 @@ type CaptchaContainer = {
};
declare global {
+ // Window を拡張してるため、空ではない
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface Window extends CaptchaContainer { }
}
diff --git a/packages/frontend/src/components/MkDialog.vue b/packages/frontend/src/components/MkDialog.vue
index b095a1cd4a..6c9fa3167a 100644
--- a/packages/frontend/src/components/MkDialog.vue
+++ b/packages/frontend/src/components/MkDialog.vue
@@ -142,6 +142,7 @@ const okButtonDisabledReason = computed<null | 'charactersExceeded' | 'character
// overload function を使いたいので lint エラーを無視する
function done(canceled: true): void;
function done(canceled: false, result: Result): void; // eslint-disable-line no-redeclare
+
function done(canceled: boolean, result?: Result): void { // eslint-disable-line no-redeclare
emit('done', { canceled, result } as { canceled: true } | { canceled: false, result: Result });
modal.value?.close();
diff --git a/packages/frontend/src/components/MkNotificationSelectWindow.vue b/packages/frontend/src/components/MkNotificationSelectWindow.vue
index 90a3e48187..a0fb7fea83 100644
--- a/packages/frontend/src/components/MkNotificationSelectWindow.vue
+++ b/packages/frontend/src/components/MkNotificationSelectWindow.vue
@@ -39,7 +39,7 @@ import MkModalWindow from '@/components/MkModalWindow.vue';
import { notificationTypes } from '@@/js/const.js';
import { i18n } from '@/i18n.js';
-type TypesMap = Record<typeof notificationTypes[number], Ref<boolean>>
+type TypesMap = Record<typeof notificationTypes[number], Ref<boolean>>;
const emit = defineEmits<{
(ev: 'done', v: { excludeTypes: string[] }): void,
diff --git a/packages/frontend/src/components/MkSortOrderEditor.define.ts b/packages/frontend/src/components/MkSortOrderEditor.define.ts
index f023b5d72b..e56b93f98a 100644
--- a/packages/frontend/src/components/MkSortOrderEditor.define.ts
+++ b/packages/frontend/src/components/MkSortOrderEditor.define.ts
@@ -3,9 +3,9 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-export type SortOrderDirection = '+' | '-'
+export type SortOrderDirection = '+' | '-';
export type SortOrder<T extends string> = {
key: T;
direction: SortOrderDirection;
-}
+};
diff --git a/packages/frontend/src/components/MkSystemWebhookEditor.vue b/packages/frontend/src/components/MkSystemWebhookEditor.vue
index 6a03c8acaa..7e92726dcb 100644
--- a/packages/frontend/src/components/MkSystemWebhookEditor.vue
+++ b/packages/frontend/src/components/MkSystemWebhookEditor.vue
@@ -114,7 +114,7 @@ type EventType = {
userCreated: boolean;
inactiveModeratorsWarning: boolean;
inactiveModeratorsInvitationOnlyChanged: boolean;
-}
+};
const emit = defineEmits<{
(ev: 'submitted', result: MkSystemWebhookResult): void;
diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue
index d88ff60a51..7bae240ddd 100644
--- a/packages/frontend/src/components/MkTimeline.vue
+++ b/packages/frontend/src/components/MkTimeline.vue
@@ -57,15 +57,15 @@ provide('tl_withSensitive', computed(() => props.withSensitive));
provide('inChannel', computed(() => props.src === 'channel'));
type TimelineQueryType = {
- antennaId?: string,
- withRenotes?: boolean,
- withReplies?: boolean,
- withFiles?: boolean,
- visibility?: string,
- listId?: string,
- channelId?: string,
- roleId?: string
-}
+ antennaId?: string,
+ withRenotes?: boolean,
+ withReplies?: boolean,
+ withFiles?: boolean,
+ visibility?: string,
+ listId?: string,
+ channelId?: string,
+ roleId?: string
+};
const prComponent = shallowRef<InstanceType<typeof MkPullToRefresh>>();
const tlComponent = shallowRef<InstanceType<typeof MkNotes>>();
diff --git a/packages/frontend/src/components/MkUserAnnouncementEditDialog.vue b/packages/frontend/src/components/MkUserAnnouncementEditDialog.vue
index fe499fabbf..34991fa0dd 100644
--- a/packages/frontend/src/components/MkUserAnnouncementEditDialog.vue
+++ b/packages/frontend/src/components/MkUserAnnouncementEditDialog.vue
@@ -62,7 +62,7 @@ import MkTextarea from '@/components/MkTextarea.vue';
import MkSwitch from '@/components/MkSwitch.vue';
import MkRadios from '@/components/MkRadios.vue';
-type AdminAnnouncementType = Misskey.entities.AdminAnnouncementsCreateRequest & { id: string; }
+type AdminAnnouncementType = Misskey.entities.AdminAnnouncementsCreateRequest & { id: string; };
const props = defineProps<{
user: Misskey.entities.User,
diff --git a/packages/frontend/src/components/grid/MkGrid.vue b/packages/frontend/src/components/grid/MkGrid.vue
index 84f1f754b2..c89e23c135 100644
--- a/packages/frontend/src/components/grid/MkGrid.vue
+++ b/packages/frontend/src/components/grid/MkGrid.vue
@@ -79,7 +79,7 @@ type RowHolder = {
row: GridRow,
cells: GridCell[],
origin: DataSource,
-}
+};
const emit = defineEmits<{
(ev: 'event', event: GridEvent, context: GridContext): void;
diff --git a/packages/frontend/src/components/grid/cell-validators.ts b/packages/frontend/src/components/grid/cell-validators.ts
index 56d7f0f13d..7310a82c9e 100644
--- a/packages/frontend/src/components/grid/cell-validators.ts
+++ b/packages/frontend/src/components/grid/cell-validators.ts
@@ -18,25 +18,25 @@ export type ValidatorParams = {
export type ValidatorResult = {
valid: boolean;
message?: string;
-}
+};
export type GridCellValidator = {
name?: string;
ignoreViolation?: boolean;
validate: (params: ValidatorParams) => ValidatorResult;
-}
+};
export type ValidateViolation = {
valid: boolean;
params: ValidatorParams;
violations: ValidateViolationItem[];
-}
+};
export type ValidateViolationItem = {
valid: boolean;
validator: GridCellValidator;
result: ValidatorResult;
-}
+};
export function cellValidation(allCells: GridCell[], cell: GridCell, newValue: CellValue): ValidateViolation {
const { column, row } = cell;
diff --git a/packages/frontend/src/components/grid/cell.ts b/packages/frontend/src/components/grid/cell.ts
index 2569c6d50d..d347d05bdb 100644
--- a/packages/frontend/src/components/grid/cell.ts
+++ b/packages/frontend/src/components/grid/cell.ts
@@ -15,7 +15,7 @@ export type CellValue = string | boolean | number | undefined | null | Array<unk
export type CellAddress = {
row: number;
col: number;
-}
+};
export const CELL_ADDRESS_NONE: CellAddress = {
row: -1,
@@ -32,13 +32,13 @@ export type GridCell = {
contentSize: Size;
setting: GridCellSetting;
violation: ValidateViolation;
-}
+};
export type GridCellContextMenuFactory = (col: GridColumn, row: GridRow, value: CellValue, context: GridContext) => MenuItem[];
export type GridCellSetting = {
contextMenuFactory?: GridCellContextMenuFactory;
-}
+};
export function createCell(
column: GridColumn,
diff --git a/packages/frontend/src/components/grid/column.ts b/packages/frontend/src/components/grid/column.ts
index 6780c8a3a7..6a694b39ec 100644
--- a/packages/frontend/src/components/grid/column.ts
+++ b/packages/frontend/src/components/grid/column.ts
@@ -40,7 +40,7 @@ export type GridColumn = {
setting: GridColumnSetting;
width: string;
contentSize: Size;
-}
+};
export function createColumn(setting: GridColumnSetting, index: number): GridColumn {
return {
diff --git a/packages/frontend/src/components/grid/grid.ts b/packages/frontend/src/components/grid/grid.ts
index 03947b7ee3..0428e6493c 100644
--- a/packages/frontend/src/components/grid/grid.ts
+++ b/packages/frontend/src/components/grid/grid.ts
@@ -21,7 +21,7 @@ export type GridSetting = {
export type DataSource = Record<string, CellValue>;
-export type GridState =
+export type GridState = (
'normal' |
'cellSelecting' |
'cellEditing' |
@@ -29,19 +29,19 @@ export type GridState =
'colSelecting' |
'rowSelecting' |
'hidden'
- ;
+);
export type Size = {
width: number;
height: number;
-}
+};
export type SizeStyle = number | 'auto' | undefined;
export type AdditionalStyle = {
className?: string;
style?: Record<string, string | number>;
-}
+};
export class GridEventEmitter extends EventEmitter<{
'forceRefreshContentSize': void;
diff --git a/packages/frontend/src/components/grid/row.ts b/packages/frontend/src/components/grid/row.ts
index f34770312a..42da22193f 100644
--- a/packages/frontend/src/components/grid/row.ts
+++ b/packages/frontend/src/components/grid/row.ts
@@ -27,7 +27,7 @@ export type GridRowStyleRuleConditionParams = {
export type GridRowStyleRule = {
condition: (params: GridRowStyleRuleConditionParams) => boolean;
applyStyle: AdditionalStyle;
-}
+};
export type GridRowContextMenuFactory = (row: GridRow, context: GridContext) => MenuItem[];
@@ -40,7 +40,7 @@ export type GridRowSetting = {
events?: {
delete?: (rows: GridRow[]) => void;
}
-}
+};
export type GridRow = {
index: number;
@@ -48,7 +48,7 @@ export type GridRow = {
using: boolean;
setting: GridRowSetting;
additionalStyles: AdditionalStyle[];
-}
+};
export function createRow(index: number, using: boolean, setting: GridRowSetting): GridRow {
return {
diff --git a/packages/frontend/src/local-storage.ts b/packages/frontend/src/local-storage.ts
index 5b8ba77e01..9c8863f863 100644
--- a/packages/frontend/src/local-storage.ts
+++ b/packages/frontend/src/local-storage.ts
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-export type Keys =
+export type Keys = (
'v' |
'lastVersion' |
'instance' |
@@ -40,6 +40,7 @@ export type Keys =
'emojis' | // DEPRECATED, stored in indexeddb (13.9.0~);
`channelLastReadedAt:${string}` |
`idbfallback::${string}`
+);
// セッション毎に廃棄されるLocalStorage代替(セーフモードなどで使用できそう)
//const safeSessionStorage = new Map<Keys, string>();
diff --git a/packages/frontend/src/nirax.ts b/packages/frontend/src/nirax.ts
index ec4ac9d91a..0374d03c48 100644
--- a/packages/frontend/src/nirax.ts
+++ b/packages/frontend/src/nirax.ts
@@ -65,7 +65,7 @@ export type RouterEvent = {
key: string;
}) => void;
same: () => void;
-}
+};
export type Resolved = {
route: RouteDef;
diff --git a/packages/frontend/src/pages/admin/custom-emojis-manager.local.list.vue b/packages/frontend/src/pages/admin/custom-emojis-manager.local.list.vue
index b69457e05e..5916efbc52 100644
--- a/packages/frontend/src/pages/admin/custom-emojis-manager.local.list.vue
+++ b/packages/frontend/src/pages/admin/custom-emojis-manager.local.list.vue
@@ -109,7 +109,7 @@ type GridItem = {
publicUrl?: string | null;
originalUrl?: string | null;
type: string | null;
-}
+};
function setupGrid(): GridSetting {
const $style = useCssModule();
diff --git a/packages/frontend/src/pages/admin/custom-emojis-manager.local.register.vue b/packages/frontend/src/pages/admin/custom-emojis-manager.local.register.vue
index da85d38a40..d6ee8ea49c 100644
--- a/packages/frontend/src/pages/admin/custom-emojis-manager.local.register.vue
+++ b/packages/frontend/src/pages/admin/custom-emojis-manager.local.register.vue
@@ -124,7 +124,7 @@ type GridItem = {
localOnly: boolean;
roleIdsThatCanBeUsedThisEmojiAsReaction: { id: string, name: string }[];
type: string | null;
-}
+};
function setupGrid(): GridSetting {
const $style = useCssModule();
diff --git a/packages/frontend/src/pages/admin/custom-emojis-manager.remote.vue b/packages/frontend/src/pages/admin/custom-emojis-manager.remote.vue
index 21ffe558ca..609d445d79 100644
--- a/packages/frontend/src/pages/admin/custom-emojis-manager.remote.vue
+++ b/packages/frontend/src/pages/admin/custom-emojis-manager.remote.vue
@@ -168,7 +168,7 @@ type GridItem = {
url: string;
name: string;
host: string;
-}
+};
function setupGrid(): GridSetting {
const $style = useCssModule();
diff --git a/packages/frontend/src/pages/search.note.vue b/packages/frontend/src/pages/search.note.vue
index 4cb149a58b..14b9f7a741 100644
--- a/packages/frontend/src/pages/search.note.vue
+++ b/packages/frontend/src/pages/search.note.vue
@@ -93,7 +93,7 @@ const noteSearchableScope = instance.noteSearchableScope ?? 'local';
const hostSelect = ref<'all' | 'local' | 'specified'>('all');
-const setHostSelectWithInput = (after:string|undefined|null, before:string|undefined|null) => {
+const setHostSelectWithInput = (after: string | undefined | null, before: string | undefined | null) => {
if (before === after) return;
if (after === '') hostSelect.value = 'all';
else hostSelect.value = 'specified';
diff --git a/packages/frontend/src/scripts/aiscript/api.ts b/packages/frontend/src/scripts/aiscript/api.ts
index e203c51bba..2c0c8c816e 100644
--- a/packages/frontend/src/scripts/aiscript/api.ts
+++ b/packages/frontend/src/scripts/aiscript/api.ts
@@ -76,7 +76,7 @@ export function createAiScriptEnv(opts: { storageKey: string, token?: string })
// バグがあればundefinedもあり得るため念のため
if (typeof token.value !== 'string') throw new Error('invalid token');
}
- const actualToken: string|null = token?.value ?? opts.token ?? null;
+ const actualToken: string | null = token?.value ?? opts.token ?? null;
if (param == null) {
throw new errors.AiScriptRuntimeError('expected param');
}
diff --git a/packages/frontend/src/scripts/file-drop.ts b/packages/frontend/src/scripts/file-drop.ts
index c2e863c0dc..4259fe25e9 100644
--- a/packages/frontend/src/scripts/file-drop.ts
+++ b/packages/frontend/src/scripts/file-drop.ts
@@ -15,7 +15,7 @@ export type DroppedDirectory = {
isFile: false;
path: string;
children: DroppedItem[];
-}
+};
export async function extractDroppedItems(ev: DragEvent): Promise<DroppedItem[]> {
const dropItems = ev.dataTransfer?.items;
diff --git a/packages/frontend/src/scripts/format-time-string.ts b/packages/frontend/src/scripts/format-time-string.ts
index 35ad77d982..d383f143e1 100644
--- a/packages/frontend/src/scripts/format-time-string.ts
+++ b/packages/frontend/src/scripts/format-time-string.ts
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-const defaultLocaleStringFormats: {[index: string]: string} = {
+const defaultLocaleStringFormats: { [index: string]: string } = {
'weekday': 'narrow',
'era': 'narrow',
'year': 'numeric',
diff --git a/packages/frontend/src/scripts/key-event.ts b/packages/frontend/src/scripts/key-event.ts
index a72776d48c..020a6c2174 100644
--- a/packages/frontend/src/scripts/key-event.ts
+++ b/packages/frontend/src/scripts/key-event.ts
@@ -7,7 +7,7 @@
* {@link KeyboardEvent.code} の値を表す文字列。不足分は適宜追加する
* @see https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values
*/
-export type KeyCode =
+export type KeyCode = (
| 'Backspace'
| 'Tab'
| 'Enter'
@@ -94,32 +94,32 @@ export type KeyCode =
| 'Quote'
| 'Meta'
| 'AltGraph'
- ;
+);
/**
* 修飾キーを表す文字列。不足分は適宜追加する。
*/
-export type KeyModifier =
+export type KeyModifier = (
| 'Shift'
| 'Control'
| 'Alt'
| 'Meta'
- ;
+);
/**
* 押下されたキー以外の状態を表す文字列。不足分は適宜追加する。
*/
-export type KeyState =
+export type KeyState = (
| 'composing'
| 'repeat'
- ;
+);
export type KeyEventHandler = {
modifiers?: KeyModifier[];
states?: KeyState[];
code: KeyCode | 'any';
handler: (event: KeyboardEvent) => void;
-}
+};
export function handleKeyEvent(event: KeyboardEvent, handlers: KeyEventHandler[]) {
function checkModifier(ev: KeyboardEvent, modifiers? : KeyModifier[]) {
diff --git a/packages/frontend/src/scripts/stream-mock.ts b/packages/frontend/src/scripts/stream-mock.ts
index cb0e607fcb..9b1b368de4 100644
--- a/packages/frontend/src/scripts/stream-mock.ts
+++ b/packages/frontend/src/scripts/stream-mock.ts
@@ -37,9 +37,9 @@ export class StreamMock extends EventEmitter<StreamEvents> implements IStream {
// do nothing
}
- public send(typeOrPayload: string): void
- public send(typeOrPayload: string, payload: any): void
- public send(typeOrPayload: Record<string, any> | any[]): void
+ public send(typeOrPayload: string): void;
+ public send(typeOrPayload: string, payload: any): void;
+ public send(typeOrPayload: Record<string, any> | any[]): void;
public send(typeOrPayload: string | Record<string, any> | any[], payload?: any): void {
// do nothing
}
diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts
index e9650bcf1f..16b900e052 100644
--- a/packages/frontend/src/store.ts
+++ b/packages/frontend/src/store.ts
@@ -56,7 +56,7 @@ export type SoundStore = {
fileUrl: string;
volume: number;
-}
+};
export const postFormActions: PostFormAction[] = [];
export const userActions: UserAction[] = [];
diff --git a/packages/frontend/src/types/menu.ts b/packages/frontend/src/types/menu.ts
index 046799536f..7cadef136d 100644
--- a/packages/frontend/src/types/menu.ts
+++ b/packages/frontend/src/types/menu.ts
@@ -6,7 +6,7 @@
import * as Misskey from 'misskey-js';
import type { ComputedRef, Ref } from 'vue';
-interface MenuRadioOptionsDef extends Record<string, any> { }
+type MenuRadioOptionsDef = Record<string, any>;
export type MenuAction = (ev: MouseEvent) => void;