From f1fd1d2585bd5230caea4c7b8814c2cf007e57cc Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Thu, 22 Dec 2022 16:01:59 +0900 Subject: [PATCH] style: add missing trailing commas (#9387) --- .../src/components/MkAbuseReportWindow.vue | 2 +- .../client/src/components/MkAutocomplete.vue | 8 +- packages/client/src/components/MkAvatars.vue | 2 +- packages/client/src/components/MkCwButton.vue | 2 +- .../src/components/MkDrive.navFolder.vue | 4 +- packages/client/src/components/MkFolder.vue | 8 +- .../client/src/components/MkFormulaCore.vue | 12 +-- .../MkPushNotificationAllowButton.vue | 4 +- packages/client/src/components/MkSample.vue | 12 +-- .../client/src/components/page/page.block.vue | 10 +-- .../src/components/page/page.button.vue | 20 ++--- .../src/components/page/page.canvas.vue | 10 +-- .../src/components/page/page.counter.vue | 12 +-- .../client/src/components/page/page.if.vue | 10 +-- .../client/src/components/page/page.note.vue | 8 +- .../src/components/page/page.number-input.vue | 12 +-- .../src/components/page/page.radio-button.vue | 12 +-- .../src/components/page/page.section.vue | 10 +-- .../src/components/page/page.switch.vue | 12 +-- .../src/components/page/page.text-input.vue | 12 +-- .../client/src/components/page/page.text.vue | 12 +-- .../components/page/page.textarea-input.vue | 12 +-- .../src/components/page/page.textarea.vue | 14 ++-- packages/client/src/components/page/page.vue | 6 +- packages/client/src/directives/appear.ts | 2 +- packages/client/src/directives/click-anime.ts | 2 +- .../client/src/directives/follow-append.ts | 2 +- packages/client/src/directives/get-size.ts | 4 +- packages/client/src/directives/hotkey.ts | 2 +- packages/client/src/directives/ripple.ts | 2 +- packages/client/src/directives/size.ts | 4 +- .../client/src/directives/user-preview.ts | 6 +- packages/client/src/instance.ts | 2 +- packages/client/src/pages/admin/metrics.vue | 84 +++++++++---------- packages/client/src/pages/auth.form.vue | 12 +-- packages/client/src/pages/emojis.emoji.vue | 2 +- .../page-editor/els/page-editor.el.button.vue | 4 +- .../page-editor/els/page-editor.el.canvas.vue | 4 +- .../els/page-editor.el.counter.vue | 4 +- .../page-editor/els/page-editor.el.if.vue | 6 +- .../page-editor/els/page-editor.el.image.vue | 6 +- .../page-editor/els/page-editor.el.note.vue | 6 +- .../els/page-editor.el.number-input.vue | 4 +- .../page-editor/els/page-editor.el.post.vue | 4 +- .../els/page-editor.el.radio-button.vue | 6 +- .../els/page-editor.el.section.vue | 8 +- .../page-editor/els/page-editor.el.switch.vue | 4 +- .../els/page-editor.el.text-input.vue | 4 +- .../page-editor/els/page-editor.el.text.vue | 4 +- .../els/page-editor.el.textarea-input.vue | 4 +- .../els/page-editor.el.textarea.vue | 4 +- .../page-editor/page-editor.container.vue | 16 ++-- .../page-editor/page-editor.script-block.vue | 32 +++---- .../client/src/pages/welcome.entrance.b.vue | 16 ++-- .../client/src/pages/welcome.entrance.c.vue | 16 ++-- .../client/src/pages/welcome.timeline.vue | 4 +- packages/client/src/plugin.ts | 12 +-- packages/client/src/scripts/2fa.ts | 8 +- packages/client/src/scripts/autocomplete.ts | 2 +- packages/client/src/scripts/focus.ts | 4 +- .../client/src/scripts/format-time-string.ts | 2 +- .../client/src/scripts/gen-search-query.ts | 2 +- .../src/scripts/get-static-image-url.ts | 2 +- packages/client/src/scripts/hotkey.ts | 6 +- packages/client/src/scripts/hpml/evaluator.ts | 6 +- packages/client/src/scripts/hpml/index.ts | 22 ++--- packages/client/src/scripts/lookup-user.ts | 2 +- packages/client/src/scripts/physics.ts | 20 ++--- packages/client/src/scripts/please-login.ts | 2 +- .../client/src/scripts/reaction-picker.ts | 4 +- .../src/scripts/show-suspended-dialog.ts | 2 +- packages/client/src/scripts/theme-editor.ts | 2 +- .../client/src/scripts/use-note-capture.ts | 4 +- packages/client/src/ui/classic.widgets.vue | 10 +-- packages/client/src/ui/deck/direct-column.vue | 2 +- .../client/src/widgets/activity.calendar.vue | 2 +- .../src/widgets/server-metric/cpu-mem.vue | 2 +- .../client/src/widgets/server-metric/net.vue | 2 +- packages/client/src/widgets/timeline.vue | 14 ++-- 79 files changed, 320 insertions(+), 320 deletions(-) diff --git a/packages/client/src/components/MkAbuseReportWindow.vue b/packages/client/src/components/MkAbuseReportWindow.vue index 03890b4e97..039f77c859 100644 --- a/packages/client/src/components/MkAbuseReportWindow.vue +++ b/packages/client/src/components/MkAbuseReportWindow.vue @@ -50,7 +50,7 @@ function send() { }, undefined).then(res => { os.alert({ type: 'success', - text: i18n.ts.abuseReported + text: i18n.ts.abuseReported, }); uiWindow.value?.close(); emit('closed'); diff --git a/packages/client/src/components/MkAutocomplete.vue b/packages/client/src/components/MkAutocomplete.vue index 144281e3c3..e1fd5693b6 100644 --- a/packages/client/src/components/MkAutocomplete.vue +++ b/packages/client/src/components/MkAutocomplete.vue @@ -86,7 +86,7 @@ for (const x of customEmojis) { name: x.name, emoji: `:${x.name}:`, url: x.url, - isCustomEmoji: true + isCustomEmoji: true, }); if (x.aliases) { @@ -96,7 +96,7 @@ for (const x of customEmojis) { aliasOf: x.name, emoji: `:${x.name}:`, url: x.url, - isCustomEmoji: true + isCustomEmoji: true, }); } } @@ -193,7 +193,7 @@ function exec() { os.api('users/search-by-username-and-host', { username: props.q, limit: 10, - detail: false + detail: false, }).then(searchedUsers => { users.value = searchedUsers as any[]; fetching.value = false; @@ -215,7 +215,7 @@ function exec() { } else { os.api('hashtags/search', { query: props.q, - limit: 30 + limit: 30, }).then(searchedHashtags => { hashtags.value = searchedHashtags as any[]; fetching.value = false; diff --git a/packages/client/src/components/MkAvatars.vue b/packages/client/src/components/MkAvatars.vue index 958e5db0a1..162338b639 100644 --- a/packages/client/src/components/MkAvatars.vue +++ b/packages/client/src/components/MkAvatars.vue @@ -18,7 +18,7 @@ const users = ref([]); onMounted(async () => { users.value = await os.api('users/show', { - userIds: props.userIds + userIds: props.userIds, }); }); diff --git a/packages/client/src/components/MkCwButton.vue b/packages/client/src/components/MkCwButton.vue index a473d682a9..ee611921ef 100644 --- a/packages/client/src/components/MkCwButton.vue +++ b/packages/client/src/components/MkCwButton.vue @@ -25,7 +25,7 @@ const label = computed(() => { return concat([ props.note.text ? [i18n.t('_cw.chars', { count: length(props.note.text) })] : [], props.note.files && props.note.files.length !== 0 ? [i18n.t('_cw.files', { count: props.note.files.length })] : [], - props.note.poll != null ? [i18n.ts.poll] : [] + props.note.poll != null ? [i18n.ts.poll] : [], ] as string[][]).join(' / '); }); diff --git a/packages/client/src/components/MkDrive.navFolder.vue b/packages/client/src/components/MkDrive.navFolder.vue index 3614113501..dbbfef5f05 100644 --- a/packages/client/src/components/MkDrive.navFolder.vue +++ b/packages/client/src/components/MkDrive.navFolder.vue @@ -109,7 +109,7 @@ function onDrop(ev: DragEvent) { emit('removeFile', file.id); os.api('drive/files/update', { fileId: file.id, - folderId: props.folder ? props.folder.id : null + folderId: props.folder ? props.folder.id : null, }); } //#endregion @@ -123,7 +123,7 @@ function onDrop(ev: DragEvent) { emit('removeFolder', folder.id); os.api('drive/folders/update', { folderId: folder.id, - parentId: props.folder ? props.folder.id : null + parentId: props.folder ? props.folder.id : null, }); } //#endregion diff --git a/packages/client/src/components/MkFolder.vue b/packages/client/src/components/MkFolder.vue index bc9bff99b6..ee3df83287 100644 --- a/packages/client/src/components/MkFolder.vue +++ b/packages/client/src/components/MkFolder.vue @@ -32,12 +32,12 @@ export default defineComponent({ expanded: { type: Boolean, required: false, - default: true + default: true, }, persistKey: { type: String, required: false, - default: null + default: null, }, }, data() { @@ -51,7 +51,7 @@ export default defineComponent({ if (this.persistKey) { localStorage.setItem(localStoragePrefix + this.persistKey, this.showBody ? 't' : 'f'); } - } + }, }, mounted() { function getParentBg(el: Element | null): string { @@ -91,7 +91,7 @@ export default defineComponent({ afterLeave(el) { el.style.height = null; }, - } + }, }); diff --git a/packages/client/src/components/MkFormulaCore.vue b/packages/client/src/components/MkFormulaCore.vue index 8db8932fcd..6028db9e64 100644 --- a/packages/client/src/components/MkFormulaCore.vue +++ b/packages/client/src/components/MkFormulaCore.vue @@ -12,20 +12,20 @@ export default defineComponent({ props: { formula: { type: String, - required: true + required: true, }, block: { type: Boolean, - required: true - } + required: true, + }, }, computed: { compiledFormula(): any { return katex.renderToString(this.formula, { - throwOnError: false + throwOnError: false, } as any); - } - } + }, + }, }); diff --git a/packages/client/src/components/MkPushNotificationAllowButton.vue b/packages/client/src/components/MkPushNotificationAllowButton.vue index a762914e64..b356fd3b89 100644 --- a/packages/client/src/components/MkPushNotificationAllowButton.vue +++ b/packages/client/src/components/MkPushNotificationAllowButton.vue @@ -70,7 +70,7 @@ function subscribe() { // SEE: https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe#Parameters return promiseDialog(registration.pushManager.subscribe({ userVisibleOnly: true, - applicationServerKey: urlBase64ToUint8Array(instance.swPublickey) + applicationServerKey: urlBase64ToUint8Array(instance.swPublickey), }) .then(async subscription => { pushSubscription = subscription; @@ -79,7 +79,7 @@ function subscribe() { pushRegistrationInServer = await api('sw/register', { endpoint: subscription.endpoint, auth: encode(subscription.getKey('auth')), - publickey: encode(subscription.getKey('p256dh')) + publickey: encode(subscription.getKey('p256dh')), }); }, async err => { // When subscribe failed // 通知が許可されていなかったとき diff --git a/packages/client/src/components/MkSample.vue b/packages/client/src/components/MkSample.vue index 1169654d09..1d25ab54b5 100644 --- a/packages/client/src/components/MkSample.vue +++ b/packages/client/src/components/MkSample.vue @@ -51,7 +51,7 @@ export default defineComponent({ text: '', flag: true, radio: 'misskey', - mfm: `Hello world! This is an @example mention. BTW you are @${this.$i ? this.$i.username : 'guest'}.\nAlso, here is ${config.url} and [example link](${config.url}). for more details, see https://example.com.\nAs you know #misskey is open-source software.` + mfm: `Hello world! This is an @example mention. BTW you are @${this.$i ? this.$i.username : 'guest'}.\nAlso, here is ${config.url} and [example link](${config.url}). for more details, see https://example.com.\nAs you know #misskey is open-source software.`, }; }, @@ -69,17 +69,17 @@ export default defineComponent({ foo: { type: 'boolean', default: true, - label: 'This is a boolean property' + label: 'This is a boolean property', }, bar: { type: 'number', default: 300, - label: 'This is a number property' + label: 'This is a number property', }, baz: { type: 'string', default: 'Misskey makes you happy.', - label: 'This is a string property' + label: 'This is a string property', }, }); }, @@ -95,7 +95,7 @@ export default defineComponent({ async openMenu(ev) { os.popupMenu([{ type: 'label', - text: 'Fruits' + text: 'Fruits', }, { text: 'Create some apples', action: () => {}, @@ -111,6 +111,6 @@ export default defineComponent({ action: () => {}, }], ev.currentTarget ?? ev.target); }, - } + }, }); diff --git a/packages/client/src/components/page/page.block.vue b/packages/client/src/components/page/page.block.vue index d7984afac2..f3e7764604 100644 --- a/packages/client/src/components/page/page.block.vue +++ b/packages/client/src/components/page/page.block.vue @@ -24,21 +24,21 @@ import { Block } from '@/scripts/hpml/block'; export default defineComponent({ components: { - XText, XSection, XImage, XButton, XNumberInput, XTextInput, XTextareaInput, XTextarea, XPost, XSwitch, XIf, XCounter, XRadioButton, XCanvas, XNote + XText, XSection, XImage, XButton, XNumberInput, XTextInput, XTextareaInput, XTextarea, XPost, XSwitch, XIf, XCounter, XRadioButton, XCanvas, XNote, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true + required: true, }, h: { type: Number, - required: true - } + required: true, + }, }, }); diff --git a/packages/client/src/components/page/page.button.vue b/packages/client/src/components/page/page.button.vue index e8878df8de..83931021d8 100644 --- a/packages/client/src/components/page/page.button.vue +++ b/packages/client/src/components/page/page.button.vue @@ -13,24 +13,24 @@ import { Hpml } from '@/scripts/hpml/evaluator'; export default defineComponent({ components: { - MkButton + MkButton, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, methods: { click() { if (this.block.action === 'dialog') { this.hpml.eval(); os.alert({ - text: this.hpml.interpolate(this.block.content) + text: this.hpml.interpolate(this.block.content), }); } else if (this.block.action === 'resetRandom') { this.hpml.updateRandomSeed(Math.random()); @@ -40,19 +40,19 @@ export default defineComponent({ pageId: this.hpml.page.id, event: this.block.event, ...(this.block.var ? { - var: unref(this.hpml.vars)[this.block.var] - } : {}) + var: unref(this.hpml.vars)[this.block.var], + } : {}), }); os.alert({ type: 'success', - text: this.hpml.interpolate(this.block.message) + text: this.hpml.interpolate(this.block.message), }); } else if (this.block.action === 'callAiScript') { this.hpml.callAiScript(this.block.fn); } - } - } + }, + }, }); diff --git a/packages/client/src/components/page/page.canvas.vue b/packages/client/src/components/page/page.canvas.vue index 8f49b88e5e..80f6c8339c 100644 --- a/packages/client/src/components/page/page.canvas.vue +++ b/packages/client/src/components/page/page.canvas.vue @@ -14,12 +14,12 @@ export default defineComponent({ props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const canvas: Ref = ref(null); @@ -29,9 +29,9 @@ export default defineComponent({ }); return { - canvas + canvas, }; - } + }, }); diff --git a/packages/client/src/components/page/page.counter.vue b/packages/client/src/components/page/page.counter.vue index 6eeef71431..a9e1f41a54 100644 --- a/packages/client/src/components/page/page.counter.vue +++ b/packages/client/src/components/page/page.counter.vue @@ -13,17 +13,17 @@ import { Hpml } from '@/scripts/hpml/evaluator'; export default defineComponent({ components: { - MkButton + MkButton, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -36,9 +36,9 @@ export default defineComponent({ } return { - click + click, }; - } + }, }); diff --git a/packages/client/src/components/page/page.if.vue b/packages/client/src/components/page/page.if.vue index 6dc7a429a6..372a15f0c6 100644 --- a/packages/client/src/components/page/page.if.vue +++ b/packages/client/src/components/page/page.if.vue @@ -11,21 +11,21 @@ import { defineComponent, defineAsyncComponent, PropType } from 'vue'; export default defineComponent({ components: { - XBlock: defineAsyncComponent(() => import('./page.block.vue')) + XBlock: defineAsyncComponent(() => import('./page.block.vue')), }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true + required: true, }, h: { type: Number, - required: true - } + required: true, + }, }, }); diff --git a/packages/client/src/components/page/page.note.vue b/packages/client/src/components/page/page.note.vue index 431f0b08df..7d5c484a1b 100644 --- a/packages/client/src/components/page/page.note.vue +++ b/packages/client/src/components/page/page.note.vue @@ -20,8 +20,8 @@ export default defineComponent({ props: { block: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const note: Ref | null> = ref(null); @@ -34,9 +34,9 @@ export default defineComponent({ }); return { - note + note, }; - } + }, }); diff --git a/packages/client/src/components/page/page.number-input.vue b/packages/client/src/components/page/page.number-input.vue index 47ff2a0177..0348ba7434 100644 --- a/packages/client/src/components/page/page.number-input.vue +++ b/packages/client/src/components/page/page.number-input.vue @@ -15,17 +15,17 @@ import { NumberInputVarBlock } from '@/scripts/hpml/block'; export default defineComponent({ components: { - MkInput + MkInput, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -39,9 +39,9 @@ export default defineComponent({ return { value, - updateValue + updateValue, }; - } + }, }); diff --git a/packages/client/src/components/page/page.radio-button.vue b/packages/client/src/components/page/page.radio-button.vue index 5a726da229..b0940a8781 100644 --- a/packages/client/src/components/page/page.radio-button.vue +++ b/packages/client/src/components/page/page.radio-button.vue @@ -14,17 +14,17 @@ import { RadioButtonVarBlock } from '@/scripts/hpml/block'; export default defineComponent({ components: { - MkRadio + MkRadio, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -38,8 +38,8 @@ export default defineComponent({ return { value, - updateValue + updateValue, }; - } + }, }); diff --git a/packages/client/src/components/page/page.section.vue b/packages/client/src/components/page/page.section.vue index a2cd662833..630c1f5179 100644 --- a/packages/client/src/components/page/page.section.vue +++ b/packages/client/src/components/page/page.section.vue @@ -16,20 +16,20 @@ import { Hpml } from '@/scripts/hpml/evaluator'; export default defineComponent({ components: { - XBlock: defineAsyncComponent(() => import('./page.block.vue')) + XBlock: defineAsyncComponent(() => import('./page.block.vue')), }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true + required: true, }, h: { - required: true - } + required: true, + }, }, }); diff --git a/packages/client/src/components/page/page.switch.vue b/packages/client/src/components/page/page.switch.vue index 1ece88157f..ac8d5e05c8 100644 --- a/packages/client/src/components/page/page.switch.vue +++ b/packages/client/src/components/page/page.switch.vue @@ -13,17 +13,17 @@ import { SwitchVarBlock } from '@/scripts/hpml/block'; export default defineComponent({ components: { - MkSwitch + MkSwitch, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -37,9 +37,9 @@ export default defineComponent({ return { value, - updateValue + updateValue, }; - } + }, }); diff --git a/packages/client/src/components/page/page.text-input.vue b/packages/client/src/components/page/page.text-input.vue index 30a0379df9..5d7eef8bb9 100644 --- a/packages/client/src/components/page/page.text-input.vue +++ b/packages/client/src/components/page/page.text-input.vue @@ -15,17 +15,17 @@ import { TextInputVarBlock } from '@/scripts/hpml/block'; export default defineComponent({ components: { - MkInput + MkInput, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -39,9 +39,9 @@ export default defineComponent({ return { value, - updateValue + updateValue, }; - } + }, }); diff --git a/packages/client/src/components/page/page.text.vue b/packages/client/src/components/page/page.text.vue index b4abe82840..689c484521 100644 --- a/packages/client/src/components/page/page.text.vue +++ b/packages/client/src/components/page/page.text.vue @@ -19,12 +19,12 @@ export default defineComponent({ props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, data() { return { @@ -38,15 +38,15 @@ export default defineComponent({ } else { return []; } - } + }, }, watch: { 'hpml.vars': { handler() { this.text = this.hpml.interpolate(this.block.text); }, - deep: true - } + deep: true, + }, }, }); diff --git a/packages/client/src/components/page/page.textarea-input.vue b/packages/client/src/components/page/page.textarea-input.vue index 6e082b2bef..6be0092851 100644 --- a/packages/client/src/components/page/page.textarea-input.vue +++ b/packages/client/src/components/page/page.textarea-input.vue @@ -16,17 +16,17 @@ import { TextInputVarBlock } from '@/scripts/hpml/block'; export default defineComponent({ components: { - MkTextarea + MkTextarea, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, setup(props, ctx) { const value = computed(() => { @@ -40,8 +40,8 @@ export default defineComponent({ return { value, - updateValue + updateValue, }; - } + }, }); diff --git a/packages/client/src/components/page/page.textarea.vue b/packages/client/src/components/page/page.textarea.vue index 5b4ee2b452..f809925081 100644 --- a/packages/client/src/components/page/page.textarea.vue +++ b/packages/client/src/components/page/page.textarea.vue @@ -10,17 +10,17 @@ import MkTextarea from '../form/textarea.vue'; export default defineComponent({ components: { - MkTextarea + MkTextarea, }, props: { block: { type: Object as PropType, - required: true + required: true, }, hpml: { type: Object as PropType, - required: true - } + required: true, + }, }, data() { return { @@ -32,8 +32,8 @@ export default defineComponent({ handler() { this.text = this.hpml.interpolate(this.block.text); }, - deep: true - } - } + deep: true, + }, + }, }); diff --git a/packages/client/src/components/page/page.vue b/packages/client/src/components/page/page.vue index 58c43b22bc..b5cb73c009 100644 --- a/packages/client/src/components/page/page.vue +++ b/packages/client/src/components/page/page.vue @@ -15,12 +15,12 @@ import { defaultStore } from '@/store'; export default defineComponent({ components: { - XBlock + XBlock, }, props: { page: { type: Object as PropType>, - required: true + required: true, }, }, setup(props, ctx) { @@ -28,7 +28,7 @@ export default defineComponent({ randomSeed: Math.random(), visitor: $i, url: url, - enableAiScript: !defaultStore.state.disablePagesScript + enableAiScript: !defaultStore.state.disablePagesScript, }); onMounted(() => { diff --git a/packages/client/src/directives/appear.ts b/packages/client/src/directives/appear.ts index a504d11ef9..7fa43fc34a 100644 --- a/packages/client/src/directives/appear.ts +++ b/packages/client/src/directives/appear.ts @@ -18,5 +18,5 @@ export default { unmounted(src, binding, vn) { if (src._observer_) src._observer_.disconnect(); - } + }, } as Directive; diff --git a/packages/client/src/directives/click-anime.ts b/packages/client/src/directives/click-anime.ts index 099aac28f7..e2f514b7ca 100644 --- a/packages/client/src/directives/click-anime.ts +++ b/packages/client/src/directives/click-anime.ts @@ -27,5 +27,5 @@ export default { el.classList.add('_anime_bounce_standBy'); }); */ - } + }, } as Directive; diff --git a/packages/client/src/directives/follow-append.ts b/packages/client/src/directives/follow-append.ts index b0e99628b0..62e0ac3b94 100644 --- a/packages/client/src/directives/follow-append.ts +++ b/packages/client/src/directives/follow-append.ts @@ -31,5 +31,5 @@ export default { unmounted(src, binding, vn) { if (src._ro_) src._ro_.unobserve(src); - } + }, } as Directive; diff --git a/packages/client/src/directives/get-size.ts b/packages/client/src/directives/get-size.ts index 76b54ea4b0..ff3bdd78ac 100644 --- a/packages/client/src/directives/get-size.ts +++ b/packages/client/src/directives/get-size.ts @@ -39,7 +39,7 @@ export default { }); resize.observe(src); - mountings.set(src, { resize, fn: binding.value, }); + mountings.set(src, { resize, fn: binding.value }); calc(src); }, @@ -50,5 +50,5 @@ export default { info.resize.disconnect(); if (info.intersection) info.intersection.disconnect(); mountings.delete(src); - } + }, } as Directive void>; diff --git a/packages/client/src/directives/hotkey.ts b/packages/client/src/directives/hotkey.ts index d813a95074..dfc5f646a4 100644 --- a/packages/client/src/directives/hotkey.ts +++ b/packages/client/src/directives/hotkey.ts @@ -20,5 +20,5 @@ export default { } else { el.removeEventListener('keydown', el._keyHandler); } - } + }, } as Directive; diff --git a/packages/client/src/directives/ripple.ts b/packages/client/src/directives/ripple.ts index 5329d021fb..d32f7ab441 100644 --- a/packages/client/src/directives/ripple.ts +++ b/packages/client/src/directives/ripple.ts @@ -14,5 +14,5 @@ export default { popup(Ripple, { x, y }, {}, 'end'); }); - } + }, }; diff --git a/packages/client/src/directives/size.ts b/packages/client/src/directives/size.ts index c472a528ac..c8f446e3a8 100644 --- a/packages/client/src/directives/size.ts +++ b/packages/client/src/directives/size.ts @@ -29,7 +29,7 @@ function getClassOrder(width: number, queue: Value): ClassOrder { remove: [ ...(queue.max ? queue.max.filter(v => width > v).map(getMaxClass) : []), ...(queue.min ? queue.min.filter(v => width < v).map(getMinClass) : []), - ] + ], }; } @@ -103,5 +103,5 @@ export default { info.resize.disconnect(); if (info.intersection) info.intersection.disconnect(); mountings.delete(src); - } + }, } as Directive; diff --git a/packages/client/src/directives/user-preview.ts b/packages/client/src/directives/user-preview.ts index c461676624..ed5f00ca65 100644 --- a/packages/client/src/directives/user-preview.ts +++ b/packages/client/src/directives/user-preview.ts @@ -27,7 +27,7 @@ export class UserPreview { popup(defineAsyncComponent(() => import('@/components/MkUserPreview.vue')), { showing, q: this.user, - source: this.el + source: this.el, }, { mouseover: () => { window.clearTimeout(this.hideTimer); @@ -41,7 +41,7 @@ export class UserPreview { this.promise = { cancel: () => { showing.value = false; - } + }, }; this.checkTimer = window.setInterval(() => { @@ -114,5 +114,5 @@ export default { const self = el._userPreviewDirective_; self.preview.detach(); - } + }, } as Directive; diff --git a/packages/client/src/instance.ts b/packages/client/src/instance.ts index 4f591f4fc1..51464f32fb 100644 --- a/packages/client/src/instance.ts +++ b/packages/client/src/instance.ts @@ -14,7 +14,7 @@ export const instance: Misskey.entities.InstanceMetadata = reactive(instanceData export async function fetchInstance() { const meta = await api('meta', { - detail: false + detail: false, }); for (const [k, v] of Object.entries(meta)) { diff --git a/packages/client/src/pages/admin/metrics.vue b/packages/client/src/pages/admin/metrics.vue index e0e47e667f..db8e448639 100644 --- a/packages/client/src/pages/admin/metrics.vue +++ b/packages/client/src/pages/admin/metrics.vue @@ -65,7 +65,7 @@ import { Legend, Title, Tooltip, - SubTitle + SubTitle, } from 'chart.js'; import MkButton from '@/components/MkButton.vue'; import MkSelect from '@/components/form/select.vue'; @@ -89,7 +89,7 @@ Chart.register( Legend, Title, Tooltip, - SubTitle + SubTitle, ); const alpha = (hex, a) => { @@ -155,13 +155,13 @@ export default defineComponent({ this.connection.on('statsLog', this.onStatsLog); this.connection.send('requestLog', { id: Math.random().toString().substr(2, 8), - length: 150 + length: 150, }); this.$nextTick(() => { this.queueConnection.send('requestLog', { id: Math.random().toString().substr(2, 8), - length: 200 + length: 200, }); }); }); @@ -190,7 +190,7 @@ export default defineComponent({ borderWidth: 2, borderColor: '#86b300', backgroundColor: alpha('#86b300', 0.1), - data: [] + data: [], }, { label: 'MEM (active)', pointRadius: 0, @@ -198,7 +198,7 @@ export default defineComponent({ borderWidth: 2, borderColor: '#935dbf', backgroundColor: alpha('#935dbf', 0.02), - data: [] + data: [], }, { label: 'MEM (used)', pointRadius: 0, @@ -207,8 +207,8 @@ export default defineComponent({ borderColor: '#935dbf', borderDash: [5, 5], fill: false, - data: [] - }] + data: [], + }], }, options: { aspectRatio: 3, @@ -217,14 +217,14 @@ export default defineComponent({ left: 16, right: 16, top: 16, - bottom: 0 - } + bottom: 0, + }, }, legend: { position: 'bottom', labels: { boxWidth: 16, - } + }, }, scales: { x: { @@ -235,7 +235,7 @@ export default defineComponent({ }, ticks: { display: false, - } + }, }, y: { position: 'right', @@ -246,15 +246,15 @@ export default defineComponent({ }, ticks: { display: false, - max: 100 - } - } + max: 100, + }, + }, }, tooltips: { intersect: false, mode: 'index', - } - } + }, + }, })); }, @@ -271,7 +271,7 @@ export default defineComponent({ borderWidth: 2, borderColor: '#94a029', backgroundColor: alpha('#94a029', 0.1), - data: [] + data: [], }, { label: 'Out', pointRadius: 0, @@ -279,8 +279,8 @@ export default defineComponent({ borderWidth: 2, borderColor: '#ff9156', backgroundColor: alpha('#ff9156', 0.1), - data: [] - }] + data: [], + }], }, options: { aspectRatio: 3, @@ -289,14 +289,14 @@ export default defineComponent({ left: 16, right: 16, top: 16, - bottom: 0 - } + bottom: 0, + }, }, legend: { position: 'bottom', labels: { boxWidth: 16, - } + }, }, scales: { x: { @@ -306,8 +306,8 @@ export default defineComponent({ zeroLineColor: this.gridColor, }, ticks: { - display: false - } + display: false, + }, }, y: { position: 'right', @@ -318,14 +318,14 @@ export default defineComponent({ }, ticks: { display: false, - } - } + }, + }, }, tooltips: { intersect: false, mode: 'index', - } - } + }, + }, })); }, @@ -342,7 +342,7 @@ export default defineComponent({ borderWidth: 2, borderColor: '#94a029', backgroundColor: alpha('#94a029', 0.1), - data: [] + data: [], }, { label: 'Write', pointRadius: 0, @@ -350,8 +350,8 @@ export default defineComponent({ borderWidth: 2, borderColor: '#ff9156', backgroundColor: alpha('#ff9156', 0.1), - data: [] - }] + data: [], + }], }, options: { aspectRatio: 3, @@ -360,14 +360,14 @@ export default defineComponent({ left: 16, right: 16, top: 16, - bottom: 0 - } + bottom: 0, + }, }, legend: { position: 'bottom', labels: { boxWidth: 16, - } + }, }, scales: { x: { @@ -377,8 +377,8 @@ export default defineComponent({ zeroLineColor: this.gridColor, }, ticks: { - display: false - } + display: false, + }, }, y: { position: 'right', @@ -389,14 +389,14 @@ export default defineComponent({ }, ticks: { display: false, - } - } + }, + }, }, tooltips: { intersect: false, mode: 'index', - } - } + }, + }, })); }, @@ -458,7 +458,7 @@ export default defineComponent({ resume() { this.paused = false; }, - } + }, }); diff --git a/packages/client/src/pages/auth.form.vue b/packages/client/src/pages/auth.form.vue index 024a7a2c5b..1546735266 100644 --- a/packages/client/src/pages/auth.form.vue +++ b/packages/client/src/pages/auth.form.vue @@ -26,7 +26,7 @@ import * as os from '@/os'; export default defineComponent({ components: { - MkButton + MkButton, }, props: ['session'], computed: { @@ -37,12 +37,12 @@ export default defineComponent({ }, app(): any { return this.session.app; - } + }, }, methods: { cancel() { os.api('auth/deny', { - token: this.session.token + token: this.session.token, }).then(() => { this.$emit('denied'); }); @@ -50,11 +50,11 @@ export default defineComponent({ accept() { os.api('auth/accept', { - token: this.session.token + token: this.session.token, }).then(() => { this.$emit('accepted'); }); - } - } + }, + }, }); diff --git a/packages/client/src/pages/emojis.emoji.vue b/packages/client/src/pages/emojis.emoji.vue index 04bf4ef167..40fe496520 100644 --- a/packages/client/src/pages/emojis.emoji.vue +++ b/packages/client/src/pages/emojis.emoji.vue @@ -28,7 +28,7 @@ function menu(ev) { action: () => { copyToClipboard(`:${props.emoji.name}:`); os.success(); - } + }, }], ev.currentTarget ?? ev.target); } diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.button.vue b/packages/client/src/pages/page-editor/els/page-editor.el.button.vue index 0438969afa..08f993c426 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.button.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.button.vue @@ -58,8 +58,8 @@ withDefaults(defineProps<{ message: null, primary: false, var: null, - fn: null - } + fn: null, + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.canvas.vue b/packages/client/src/pages/page-editor/els/page-editor.el.canvas.vue index 191321ae14..7ebf8c1478 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.canvas.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.canvas.vue @@ -32,7 +32,7 @@ withDefaults(defineProps<{ value: { name: '', width: 300, - height: 200 - } + height: 200, + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.counter.vue b/packages/client/src/pages/page-editor/els/page-editor.el.counter.vue index 8625c26e78..994d0b5b00 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.counter.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.counter.vue @@ -28,7 +28,7 @@ withDefaults(defineProps<{ value: any }>(), { value: { - name: '' - } + name: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.if.vue b/packages/client/src/pages/page-editor/els/page-editor.el.if.vue index c93caeb9bd..f56c8aec8a 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.if.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.if.vue @@ -42,8 +42,8 @@ const props = withDefaults(defineProps<{ }>(), { value: { children: [], - var: null - } + var: null, + }, }); const getPageBlockList = inject<(any) => any>('getPageBlockList'); @@ -51,7 +51,7 @@ const getPageBlockList = inject<(any) => any>('getPageBlockList'); async function add() { const { canceled, result: type } = await os.select({ title: i18n.ts._pages.chooseBlock, - groupedItems: getPageBlockList() + groupedItems: getPageBlockList(), }); if (canceled) return; diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.image.vue b/packages/client/src/pages/page-editor/els/page-editor.el.image.vue index 4d471e7b94..4b3c6cbf10 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.image.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.image.vue @@ -25,8 +25,8 @@ const props = withDefaults(defineProps<{ value: any }>(), { value: { - fileId: null - } + fileId: null, + }, }); let file: any = $ref(null); @@ -43,7 +43,7 @@ onMounted(async () => { await choose(); } else { os.api('drive/files/show', { - fileId: props.value.fileId + fileId: props.value.fileId, }).then(fileResponse => { file = fileResponse; }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.note.vue b/packages/client/src/pages/page-editor/els/page-editor.el.note.vue index 5e494ee23b..c3b3e3b37e 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.note.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.note.vue @@ -31,8 +31,8 @@ const props = withDefaults(defineProps<{ }>(), { value: { note: null, - detailed: false - } + detailed: false, + }, }); let id: any = $ref(props.value.note); @@ -47,6 +47,6 @@ watch(id, async () => { note = await os.api('notes/show', { noteId: props.value.note }); }, { - immediate: true + immediate: true, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.number-input.vue b/packages/client/src/pages/page-editor/els/page-editor.el.number-input.vue index a8fb702329..dc89d0287b 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.number-input.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.number-input.vue @@ -28,7 +28,7 @@ withDefaults(defineProps<{ value: any }>(), { value: { - name: '' - } + name: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.post.vue b/packages/client/src/pages/page-editor/els/page-editor.el.post.vue index 39be01ab32..9592d36829 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.post.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.post.vue @@ -25,7 +25,7 @@ withDefaults(defineProps<{ value: { text: '', attachCanvasImage: false, - canvasId: '' - } + canvasId: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.radio-button.vue b/packages/client/src/pages/page-editor/els/page-editor.el.radio-button.vue index 754af477b6..1aa2f5ca4b 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.radio-button.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.radio-button.vue @@ -25,8 +25,8 @@ const props = withDefaults(defineProps<{ value: { name: '', title: '', - values: [] - } + values: [], + }, }); let values: string = $ref(props.value.values.join('\n')); @@ -34,6 +34,6 @@ let values: string = $ref(props.value.values.join('\n')); watch(values, () => { props.value.values = values.split('\n'); }, { - deep: true + deep: true, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.section.vue b/packages/client/src/pages/page-editor/els/page-editor.el.section.vue index c7b87c660b..f18188ce61 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.section.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.section.vue @@ -33,8 +33,8 @@ const props = withDefaults(defineProps<{ }>(), { value: { title: null, - children: [] - } + children: [], + }, }); const getPageBlockList = inject<(any) => any>('getPageBlockList'); @@ -42,7 +42,7 @@ const getPageBlockList = inject<(any) => any>('getPageBlockList'); async function rename() { const { canceled, result: title } = await os.inputText({ title: 'Enter title', - default: props.value.title + default: props.value.title, }); if (canceled) return; props.value.title = title; @@ -51,7 +51,7 @@ async function rename() { async function add() { const { canceled, result: type } = await os.select({ title: i18n.ts._pages.chooseBlock, - groupedItems: getPageBlockList() + groupedItems: getPageBlockList(), }); if (canceled) return; diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.switch.vue b/packages/client/src/pages/page-editor/els/page-editor.el.switch.vue index c74b17cc2c..96d35c3966 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.switch.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.switch.vue @@ -22,8 +22,8 @@ withDefaults(defineProps<{ value: any }>(), { value: { - name: '' - } + name: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.text-input.vue b/packages/client/src/pages/page-editor/els/page-editor.el.text-input.vue index 99631c4dae..8cbae1caf5 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.text-input.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.text-input.vue @@ -21,7 +21,7 @@ withDefaults(defineProps<{ value: any }>(), { value: { - name: '' - } + name: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.text.vue b/packages/client/src/pages/page-editor/els/page-editor.el.text.vue index e0ebe68dda..27274253b4 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.text.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.text.vue @@ -18,8 +18,8 @@ withDefaults(defineProps<{ value: any }>(), { value: { - text: '' - } + text: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue b/packages/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue index 4b417e39a7..973f32242b 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue @@ -22,7 +22,7 @@ withDefaults(defineProps<{ value: any }>(), { value: { - name: '' - } + name: '', + }, }); diff --git a/packages/client/src/pages/page-editor/els/page-editor.el.textarea.vue b/packages/client/src/pages/page-editor/els/page-editor.el.textarea.vue index dca7de8df9..e0c05df911 100644 --- a/packages/client/src/pages/page-editor/els/page-editor.el.textarea.vue +++ b/packages/client/src/pages/page-editor/els/page-editor.el.textarea.vue @@ -18,8 +18,8 @@ withDefaults(defineProps<{ value: any }>(), { value: { - text: '' - } + text: '', + }, }); diff --git a/packages/client/src/pages/page-editor/page-editor.container.vue b/packages/client/src/pages/page-editor/page-editor.container.vue index efc9aac2a7..03228b8e01 100644 --- a/packages/client/src/pages/page-editor/page-editor.container.vue +++ b/packages/client/src/pages/page-editor/page-editor.container.vue @@ -31,24 +31,24 @@ export default defineComponent({ props: { expanded: { type: Boolean, - default: true + default: true, }, removable: { type: Boolean, - default: true + default: true, }, draggable: { type: Boolean, - default: false + default: false, }, error: { required: false, - default: null + default: null, }, warn: { required: false, - default: null - } + default: null, + }, }, emits: ['toggle', 'remove'], data() { @@ -63,8 +63,8 @@ export default defineComponent({ }, remove() { this.$emit('remove'); - } - } + }, + }, }); diff --git a/packages/client/src/pages/page-editor/page-editor.script-block.vue b/packages/client/src/pages/page-editor/page-editor.script-block.vue index bb07adaae2..1f621e185f 100644 --- a/packages/client/src/pages/page-editor/page-editor.script-block.vue +++ b/packages/client/src/pages/page-editor/page-editor.script-block.vue @@ -78,17 +78,17 @@ export default defineComponent({ props: { getExpectedType: { required: false, - default: null + default: null, }, modelValue: { - required: true + required: true, }, title: { - required: false + required: false, }, removable: { required: false, - default: false + default: false, }, hpml: { required: true, @@ -101,8 +101,8 @@ export default defineComponent({ }, draggable: { required: false, - default: false - } + default: false, + }, }, data() { @@ -131,11 +131,11 @@ export default defineComponent({ handler() { this.modelValue.value.slots = this.slots.split('\n').map(x => ({ name: x, - type: null + type: null, })); }, - deep: true - } + deep: true, + }, }, created() { @@ -150,7 +150,7 @@ export default defineComponent({ const id = uuid(); this.modelValue.value = { slots: [], - expression: { id, type: null } + expression: { id, type: null }, }; return; } @@ -194,13 +194,13 @@ export default defineComponent({ const emptySlotIndex = args.findIndex(x => x.type === null); if (emptySlotIndex !== -1 && emptySlotIndex < args.length) { this.warn = { - slot: emptySlotIndex + slot: emptySlotIndex, }; } else { this.warn = null; } }, { - deep: true + deep: true, }); this.$watch(() => this.hpml.variables, () => { @@ -208,7 +208,7 @@ export default defineComponent({ this.error = this.hpml.typeCheck(this.modelValue); } }, { - deep: true + deep: true, }); }, @@ -216,7 +216,7 @@ export default defineComponent({ async changeType() { const { canceled, result: type } = await os.select({ title: this.$ts._pages.selectType, - groupedItems: this.getScriptBlockList(this.getExpectedType ? this.getExpectedType() : null) + groupedItems: this.getScriptBlockList(this.getExpectedType ? this.getExpectedType() : null), }); if (canceled) return; this.modelValue.type = type; @@ -224,8 +224,8 @@ export default defineComponent({ _getExpectedType(slot: number) { return this.hpml.getExpectedType(this.modelValue, slot); - } - } + }, + }, }); diff --git a/packages/client/src/pages/welcome.entrance.b.vue b/packages/client/src/pages/welcome.entrance.b.vue index 53a6dd3469..8230adaf1f 100644 --- a/packages/client/src/pages/welcome.entrance.b.vue +++ b/packages/client/src/pages/welcome.entrance.b.vue @@ -82,7 +82,7 @@ export default defineComponent({ os.api('hashtags/list', { sort: '+mentionedLocalUsers', - limit: 8 + limit: 8, }).then(tags => { this.tags = tags; }); @@ -91,13 +91,13 @@ export default defineComponent({ methods: { signin() { os.popup(XSigninDialog, { - autoSet: true + autoSet: true, }, {}, 'closed'); }, signup() { os.popup(XSignupDialog, { - autoSet: true + autoSet: true, }, {}, 'closed'); }, @@ -107,24 +107,24 @@ export default defineComponent({ icon: 'ti ti-info-circle', action: () => { os.pageWindow('/about'); - } + }, }, { text: this.$ts.aboutMisskey, icon: 'ti ti-info-circle', action: () => { os.pageWindow('/about-misskey'); - } + }, }, null, { text: this.$ts.help, icon: 'ti ti-question-circle', action: () => { window.open(`https://misskey-hub.net/help.md`, '_blank'); - } + }, }], ev.currentTarget ?? ev.target); }, - number - } + number, + }, }); diff --git a/packages/client/src/pages/welcome.entrance.c.vue b/packages/client/src/pages/welcome.entrance.c.vue index bae3f2ed9d..d2d07bb1f0 100644 --- a/packages/client/src/pages/welcome.entrance.c.vue +++ b/packages/client/src/pages/welcome.entrance.c.vue @@ -102,7 +102,7 @@ export default defineComponent({ os.api('hashtags/list', { sort: '+mentionedLocalUsers', - limit: 8 + limit: 8, }).then(tags => { this.tags = tags; }); @@ -111,13 +111,13 @@ export default defineComponent({ methods: { signin() { os.popup(XSigninDialog, { - autoSet: true + autoSet: true, }, {}, 'closed'); }, signup() { os.popup(XSignupDialog, { - autoSet: true + autoSet: true, }, {}, 'closed'); }, @@ -127,24 +127,24 @@ export default defineComponent({ icon: 'ti ti-info-circle', action: () => { os.pageWindow('/about'); - } + }, }, { text: this.$ts.aboutMisskey, icon: 'ti ti-info-circle', action: () => { os.pageWindow('/about-misskey'); - } + }, }, null, { text: this.$ts.help, icon: 'ti ti-question-circle', action: () => { window.open(`https://misskey-hub.net/help.md`, '_blank'); - } + }, }], ev.currentTarget ?? ev.target); }, - number - } + number, + }, }); diff --git a/packages/client/src/pages/welcome.timeline.vue b/packages/client/src/pages/welcome.timeline.vue index f45a15448d..d6a88540d1 100644 --- a/packages/client/src/pages/welcome.timeline.vue +++ b/packages/client/src/pages/welcome.timeline.vue @@ -32,7 +32,7 @@ export default defineComponent({ components: { XReactionsViewer, XMediaList, - XPoll + XPoll, }, data() { @@ -52,7 +52,7 @@ export default defineComponent({ if (this.$refs.scroll.clientHeight > window.innerHeight) { this.isScrolling = true; } - } + }, }); diff --git a/packages/client/src/plugin.ts b/packages/client/src/plugin.ts index de1c955675..3a00cd0455 100644 --- a/packages/client/src/plugin.ts +++ b/packages/client/src/plugin.ts @@ -12,7 +12,7 @@ export function install(plugin) { const aiscript = new AiScript(createPluginEnv({ plugin: plugin, - storageKey: 'plugins:' + plugin.id + storageKey: 'plugins:' + plugin.id, }), { in: (q) => { return new Promise(ok => { @@ -86,7 +86,7 @@ function registerPostFormAction({ pluginId, title, handler }) { pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(form), values.FN_NATIVE(([key, value]) => { update(key.value, value.value); })]); - } + }, }); } @@ -94,7 +94,7 @@ function registerUserAction({ pluginId, title, handler }) { userActions.push({ title, handler: (user) => { pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(user)]); - } + }, }); } @@ -102,7 +102,7 @@ function registerNoteAction({ pluginId, title, handler }) { noteActions.push({ title, handler: (note) => { pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)]); - } + }, }); } @@ -110,7 +110,7 @@ function registerNoteViewInterruptor({ pluginId, handler }) { noteViewInterruptors.push({ handler: async (note) => { return utils.valToJs(await pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)])); - } + }, }); } @@ -118,6 +118,6 @@ function registerNotePostInterruptor({ pluginId, handler }) { notePostInterruptors.push({ handler: async (note) => { return utils.valToJs(await pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)])); - } + }, }); } diff --git a/packages/client/src/scripts/2fa.ts b/packages/client/src/scripts/2fa.ts index d1b9581e72..62a38ff02a 100644 --- a/packages/client/src/scripts/2fa.ts +++ b/packages/client/src/scripts/2fa.ts @@ -7,15 +7,15 @@ export function byteify(string: string, encoding: 'ascii' | 'base64' | 'hex') { atob( string .replace(/-/g, '+') - .replace(/_/g, '/') + .replace(/_/g, '/'), ), - c => c.charCodeAt(0) + c => c.charCodeAt(0), ); case 'hex': return new Uint8Array( string .match(/.{1,2}/g) - .map(byte => parseInt(byte, 16)) + .map(byte => parseInt(byte, 16)), ); } } @@ -24,7 +24,7 @@ export function hexify(buffer: ArrayBuffer) { return Array.from(new Uint8Array(buffer)) .reduce( (str, byte) => str + byte.toString(16).padStart(2, '0'), - '' + '', ); } diff --git a/packages/client/src/scripts/autocomplete.ts b/packages/client/src/scripts/autocomplete.ts index 62de37ed27..1bae3790f5 100644 --- a/packages/client/src/scripts/autocomplete.ts +++ b/packages/client/src/scripts/autocomplete.ts @@ -171,7 +171,7 @@ export class Autocomplete { }, { done: (res) => { this.complete(res); - } + }, }); this.suggestion = { diff --git a/packages/client/src/scripts/focus.ts b/packages/client/src/scripts/focus.ts index 0894877820..d6802fa322 100644 --- a/packages/client/src/scripts/focus.ts +++ b/packages/client/src/scripts/focus.ts @@ -4,7 +4,7 @@ export function focusPrev(el: Element | null, self = false, scroll = true) { if (el) { if (el.hasAttribute('tabindex')) { (el as HTMLElement).focus({ - preventScroll: !scroll + preventScroll: !scroll, }); } else { focusPrev(el.previousElementSibling, true); @@ -18,7 +18,7 @@ export function focusNext(el: Element | null, self = false, scroll = true) { if (el) { if (el.hasAttribute('tabindex')) { (el as HTMLElement).focus({ - preventScroll: !scroll + preventScroll: !scroll, }); } else { focusPrev(el.nextElementSibling, true); diff --git a/packages/client/src/scripts/format-time-string.ts b/packages/client/src/scripts/format-time-string.ts index fb4718c007..c20db5e827 100644 --- a/packages/client/src/scripts/format-time-string.ts +++ b/packages/client/src/scripts/format-time-string.ts @@ -7,7 +7,7 @@ const defaultLocaleStringFormats: {[index: string]: string} = { 'hour': 'numeric', 'minute': 'numeric', 'second': 'numeric', - 'timeZoneName': 'short' + 'timeZoneName': 'short', }; function formatLocaleString(date: Date, format: string): string { diff --git a/packages/client/src/scripts/gen-search-query.ts b/packages/client/src/scripts/gen-search-query.ts index b413cbbab1..da7d622632 100644 --- a/packages/client/src/scripts/gen-search-query.ts +++ b/packages/client/src/scripts/gen-search-query.ts @@ -25,6 +25,6 @@ export async function genSearchQuery(v: any, q: string) { return { query: q.split(' ').filter(x => !x.startsWith('/') && !x.startsWith('@')).join(' '), host: host, - userId: userId + userId: userId, }; } diff --git a/packages/client/src/scripts/get-static-image-url.ts b/packages/client/src/scripts/get-static-image-url.ts index e9a3e87cc8..79dbcf9325 100644 --- a/packages/client/src/scripts/get-static-image-url.ts +++ b/packages/client/src/scripts/get-static-image-url.ts @@ -11,6 +11,6 @@ export function getStaticImageUrl(baseUrl: string): string { const dummy = `${u.host}${u.pathname}`; // 拡張子がないとキャッシュしてくれないCDNがあるので return `${instanceUrl}/proxy/${dummy}?${url.query({ url: u.href, - static: '1' + static: '1', })}`; } diff --git a/packages/client/src/scripts/hotkey.ts b/packages/client/src/scripts/hotkey.ts index bd8c3b6cab..4a0ded637d 100644 --- a/packages/client/src/scripts/hotkey.ts +++ b/packages/client/src/scripts/hotkey.ts @@ -21,7 +21,7 @@ const parseKeymap = (keymap: Keymap) => Object.entries(keymap).map(([patterns, c const result = { patterns: [], callback, - allowRepeat: true + allowRepeat: true, } as Action; if (patterns.match(/^\(.*\)$/) !== null) { @@ -34,7 +34,7 @@ const parseKeymap = (keymap: Keymap) => Object.entries(keymap).map(([patterns, c which: [], ctrl: false, alt: false, - shift: false + shift: false, } as Pattern; const keys = part.trim().split('+').map(x => x.trim().toLowerCase()); @@ -61,7 +61,7 @@ function match(ev: KeyboardEvent, patterns: Action['patterns']): boolean { pattern.ctrl === ev.ctrlKey && pattern.shift === ev.shiftKey && pattern.alt === ev.altKey && - !ev.metaKey + !ev.metaKey, ); } diff --git a/packages/client/src/scripts/hpml/evaluator.ts b/packages/client/src/scripts/hpml/evaluator.ts index 10023edffb..196b3142a1 100644 --- a/packages/client/src/scripts/hpml/evaluator.ts +++ b/packages/client/src/scripts/hpml/evaluator.ts @@ -35,7 +35,7 @@ export class Hpml { if (this.opts.enableAiScript) { this.aiscript = markRaw(new AiScript({ ...createAiScriptEnv({ - storageKey: 'pages:' + this.page.id + storageKey: 'pages:' + this.page.id, }), ...initAiLib(this) }, { in: (q) => { return new Promise(ok => { @@ -75,7 +75,7 @@ export class Hpml { SEED: opts.randomSeed ? opts.randomSeed : '', YMD: `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`, AISCRIPT_DISABLED: !this.opts.enableAiScript, - NULL: null + NULL: null, }; this.eval(); @@ -198,7 +198,7 @@ export class Hpml { slots: expr.value.slots.map(x => x.name), exec: (slotArg: Record) => { return this.evaluate(expr.value.expression, scope.createChildScope(slotArg, expr.id)); - } + }, } as Fn; } return; diff --git a/packages/client/src/scripts/hpml/index.ts b/packages/client/src/scripts/hpml/index.ts index 4e5aadfbd3..9a55a5c286 100644 --- a/packages/client/src/scripts/hpml/index.ts +++ b/packages/client/src/scripts/hpml/index.ts @@ -14,22 +14,22 @@ export type Fn = { export type Type = 'string' | 'number' | 'boolean' | 'stringArray' | null; export const literalDefs: Record = { - text: { out: 'string', category: 'value', icon: 'ti ti-quote', }, - multiLineText: { out: 'string', category: 'value', icon: 'fas fa-align-left', }, - textList: { out: 'stringArray', category: 'value', icon: 'fas fa-list', }, - number: { out: 'number', category: 'value', icon: 'fas fa-sort-numeric-up', }, - ref: { out: null, category: 'value', icon: 'fas fa-magic', }, - aiScriptVar: { out: null, category: 'value', icon: 'fas fa-magic', }, - fn: { out: 'function', category: 'value', icon: 'fas fa-square-root-alt', }, + text: { out: 'string', category: 'value', icon: 'ti ti-quote' }, + multiLineText: { out: 'string', category: 'value', icon: 'fas fa-align-left' }, + textList: { out: 'stringArray', category: 'value', icon: 'fas fa-list' }, + number: { out: 'number', category: 'value', icon: 'fas fa-sort-numeric-up' }, + ref: { out: null, category: 'value', icon: 'fas fa-magic' }, + aiScriptVar: { out: null, category: 'value', icon: 'fas fa-magic' }, + fn: { out: 'function', category: 'value', icon: 'fas fa-square-root-alt' }, }; export const blockDefs = [ ...Object.entries(literalDefs).map(([k, v]) => ({ - type: k, out: v.out, category: v.category, icon: v.icon + type: k, out: v.out, category: v.category, icon: v.icon, })), ...Object.entries(funcDefs).map(([k, v]) => ({ - type: k, out: v.out, category: v.category, icon: v.icon - })) + type: k, out: v.out, category: v.category, icon: v.icon, + })), ]; export type PageVar = { name: string; value: any; type: Type; }; @@ -82,7 +82,7 @@ export class HpmlScope { throw new HpmlError( `No such variable '${name}' in scope '${this.name}'`, { - scope: this.layerdStates + scope: this.layerdStates, }); } } diff --git a/packages/client/src/scripts/lookup-user.ts b/packages/client/src/scripts/lookup-user.ts index 2d00e51621..3ab9d55300 100644 --- a/packages/client/src/scripts/lookup-user.ts +++ b/packages/client/src/scripts/lookup-user.ts @@ -19,7 +19,7 @@ export async function lookupUser() { if (_notFound) { os.alert({ type: 'error', - text: i18n.ts.noSuchUser + text: i18n.ts.noSuchUser, }); } else { _notFound = true; diff --git a/packages/client/src/scripts/physics.ts b/packages/client/src/scripts/physics.ts index f0a5b0fdd6..efda80f074 100644 --- a/packages/client/src/scripts/physics.ts +++ b/packages/client/src/scripts/physics.ts @@ -29,7 +29,7 @@ export function physics(container: HTMLElement) { height: containerHeight, background: 'transparent', // transparent to hide wireframeBackground: 'transparent', // transparent to hide - } + }, }); // Disable to hide debug @@ -43,7 +43,7 @@ export function physics(container: HTMLElement) { const ground = Matter.Bodies.rectangle(containerCenterX, containerHeight + (groundThickness / 2), containerWidth, groundThickness, { isStatic: true, restitution: 0.1, - friction: 2 + friction: 2, }); //const wallRight = Matter.Bodies.rectangle(window.innerWidth+50, window.innerHeight/2, 100, window.innerHeight, wallopts); @@ -68,8 +68,8 @@ export function physics(container: HTMLElement) { top + (objEl.offsetHeight / 2), Math.max(objEl.offsetWidth, objEl.offsetHeight) / 2, { - restitution: 0.5 - } + restitution: 0.5, + }, ); } else { const style = window.getComputedStyle(objEl); @@ -80,8 +80,8 @@ export function physics(container: HTMLElement) { objEl.offsetHeight, { chamfer: { radius: parseInt(style.borderRadius || '0', 10) }, - restitution: 0.5 - } + restitution: 0.5, + }, ); } objEl.id = obj.id.toString(); @@ -98,9 +98,9 @@ export function physics(container: HTMLElement) { constraint: { stiffness: 0.1, render: { - visible: false - } - } + visible: false, + }, + }, }); Matter.World.add(engine.world, mouseConstraint); @@ -147,6 +147,6 @@ export function physics(container: HTMLElement) { stop = true; Matter.Runner.stop(runner); window.clearInterval(intervalId); - } + }, }; } diff --git a/packages/client/src/scripts/please-login.ts b/packages/client/src/scripts/please-login.ts index 3323968f71..b8fb853cc1 100644 --- a/packages/client/src/scripts/please-login.ts +++ b/packages/client/src/scripts/please-login.ts @@ -8,7 +8,7 @@ export function pleaseLogin(path?: string) { popup(defineAsyncComponent(() => import('@/components/MkSigninDialog.vue')), { autoSet: true, - message: i18n.ts.signinRequired + message: i18n.ts.signinRequired, }, { cancelled: () => { if (path) { diff --git a/packages/client/src/scripts/reaction-picker.ts b/packages/client/src/scripts/reaction-picker.ts index a6d0940a40..fe32e719da 100644 --- a/packages/client/src/scripts/reaction-picker.ts +++ b/packages/client/src/scripts/reaction-picker.ts @@ -15,7 +15,7 @@ class ReactionPicker { await popup(defineAsyncComponent(() => import('@/components/MkEmojiPickerDialog.vue')), { src: this.src, asReactionPicker: true, - manualShowing: this.manualShowing + manualShowing: this.manualShowing, }, { done: reaction => { this.onChosen!(reaction); @@ -26,7 +26,7 @@ class ReactionPicker { closed: () => { this.src.value = null; this.onClosed!(); - } + }, }); } diff --git a/packages/client/src/scripts/show-suspended-dialog.ts b/packages/client/src/scripts/show-suspended-dialog.ts index acfbc60e92..e11569ecd4 100644 --- a/packages/client/src/scripts/show-suspended-dialog.ts +++ b/packages/client/src/scripts/show-suspended-dialog.ts @@ -5,6 +5,6 @@ export function showSuspendedDialog() { return os.alert({ type: 'error', title: i18n.ts.yourAccountSuspendedTitle, - text: i18n.ts.yourAccountSuspendedDescription + text: i18n.ts.yourAccountSuspendedDescription, }); } diff --git a/packages/client/src/scripts/theme-editor.ts b/packages/client/src/scripts/theme-editor.ts index 6d88d6856c..944875ff15 100644 --- a/packages/client/src/scripts/theme-editor.ts +++ b/packages/client/src/scripts/theme-editor.ts @@ -61,7 +61,7 @@ export const convertToMisskeyTheme = (vm: ThemeViewModel, name: string, desc: st return { id: uuid(), - name, desc, author, props, base + name, desc, author, props, base, }; }; diff --git a/packages/client/src/scripts/use-note-capture.ts b/packages/client/src/scripts/use-note-capture.ts index f1f976693e..e6bdb345c4 100644 --- a/packages/client/src/scripts/use-note-capture.ts +++ b/packages/client/src/scripts/use-note-capture.ts @@ -60,8 +60,8 @@ export function useNoteCapture(props: { ...choices[choice], votes: choices[choice].votes + 1, ...($i && (body.userId === $i.id) ? { - isVoted: true - } : {}) + isVoted: true, + } : {}), }; note.value.poll.choices = choices; diff --git a/packages/client/src/ui/classic.widgets.vue b/packages/client/src/ui/classic.widgets.vue index ca919b168a..163ec982ce 100644 --- a/packages/client/src/ui/classic.widgets.vue +++ b/packages/client/src/ui/classic.widgets.vue @@ -14,13 +14,13 @@ import XWidgets from '@/components/MkWidgets.vue'; export default defineComponent({ components: { - XWidgets + XWidgets, }, props: { place: { type: String, - } + }, }, emits: ['mounted'], @@ -57,10 +57,10 @@ export default defineComponent({ updateWidgets(widgets) { this.$store.set('widgets', [ ...this.$store.state.widgets.filter(w => w.place !== this.place), - ...widgets + ...widgets, ]); - } - } + }, + }, }); diff --git a/packages/client/src/ui/deck/direct-column.vue b/packages/client/src/ui/deck/direct-column.vue index c60c5707f1..75b018cacd 100644 --- a/packages/client/src/ui/deck/direct-column.vue +++ b/packages/client/src/ui/deck/direct-column.vue @@ -25,7 +25,7 @@ const pagination = { endpoint: 'notes/mentions' as const, limit: 10, params: { - visibility: 'specified' + visibility: 'specified', }, }; diff --git a/packages/client/src/widgets/activity.calendar.vue b/packages/client/src/widgets/activity.calendar.vue index 33b95b00db..84f6af1c13 100644 --- a/packages/client/src/widgets/activity.calendar.vue +++ b/packages/client/src/widgets/activity.calendar.vue @@ -47,7 +47,7 @@ props.activity.slice().forEach((d, i) => { year: date.getFullYear(), month: date.getMonth(), day: date.getDate(), - weekday: date.getDay() + weekday: date.getDay(), }; d.v = peak === 0 ? 0 : d.total / (peak / 2); diff --git a/packages/client/src/widgets/server-metric/cpu-mem.vue b/packages/client/src/widgets/server-metric/cpu-mem.vue index 429ccdf3ae..80a8e427e1 100644 --- a/packages/client/src/widgets/server-metric/cpu-mem.vue +++ b/packages/client/src/widgets/server-metric/cpu-mem.vue @@ -100,7 +100,7 @@ onMounted(() => { props.connection.on('stats', onStats); props.connection.on('statsLog', onStatsLog); props.connection.send('requestLog', { - id: Math.random().toString().substr(2, 8) + id: Math.random().toString().substr(2, 8), }); }); diff --git a/packages/client/src/widgets/server-metric/net.vue b/packages/client/src/widgets/server-metric/net.vue index 82801964f3..ab8b0fe471 100644 --- a/packages/client/src/widgets/server-metric/net.vue +++ b/packages/client/src/widgets/server-metric/net.vue @@ -70,7 +70,7 @@ onMounted(() => { props.connection.on('stats', onStats); props.connection.on('statsLog', onStatsLog); props.connection.send('requestLog', { - id: Math.random().toString().substr(2, 8) + id: Math.random().toString().substr(2, 8), }); }); diff --git a/packages/client/src/widgets/timeline.vue b/packages/client/src/widgets/timeline.vue index b22d3e445b..e48444d33f 100644 --- a/packages/client/src/widgets/timeline.vue +++ b/packages/client/src/widgets/timeline.vue @@ -82,7 +82,7 @@ const choose = async (ev) => { menuOpened.value = true; const [antennas, lists] = await Promise.all([ os.api('antennas/list'), - os.api('users/lists/list') + os.api('users/lists/list'), ]); const antennaItems = antennas.map(antenna => ({ text: antenna.name, @@ -90,7 +90,7 @@ const choose = async (ev) => { action: () => { widgetProps.antenna = antenna; setSrc('antenna'); - } + }, })); const listItems = lists.map(list => ({ text: list.name, @@ -98,24 +98,24 @@ const choose = async (ev) => { action: () => { widgetProps.list = list; setSrc('list'); - } + }, })); os.popupMenu([{ text: i18n.ts._timelines.home, icon: 'ti ti-home', - action: () => { setSrc('home'); } + action: () => { setSrc('home'); }, }, { text: i18n.ts._timelines.local, icon: 'ti ti-messages', - action: () => { setSrc('local'); } + action: () => { setSrc('local'); }, }, { text: i18n.ts._timelines.social, icon: 'ti ti-share', - action: () => { setSrc('social'); } + action: () => { setSrc('social'); }, }, { text: i18n.ts._timelines.global, icon: 'ti ti-world', - action: () => { setSrc('global'); } + action: () => { setSrc('global'); }, }, antennaItems.length > 0 ? null : undefined, ...antennaItems, listItems.length > 0 ? null : undefined, ...listItems], ev.currentTarget ?? ev.target).then(() => { menuOpened.value = false; });