From a3283c71ef3d858a00f6c69ee572642b0bd7fbfa Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 10 May 2020 17:25:16 +0900 Subject: [PATCH] chore(lint): Add missing semicolons --- src/client/scripts/create-aiscript-env.ts | 2 +- src/client/scripts/hpml/lib.ts | 34 +++++++++---------- src/misc/count-same-renotes.ts | 4 +-- src/misc/reaction-lib.ts | 2 +- .../api/endpoints/federation/instances.ts | 2 +- .../users/search-by-username-and-host.ts | 2 +- src/services/note/reaction/create.ts | 2 +- src/services/note/reaction/delete.ts | 2 +- src/services/note/read.ts | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/client/scripts/create-aiscript-env.ts b/src/client/scripts/create-aiscript-env.ts index 863cfadb8..f6429ba92 100644 --- a/src/client/scripts/create-aiscript-env.ts +++ b/src/client/scripts/create-aiscript-env.ts @@ -20,7 +20,7 @@ export function createAiScriptEnv(vm, opts) { title: title.value, text: text.value, }); - return confirm.canceled ? values.FALSE : values.TRUE + return confirm.canceled ? values.FALSE : values.TRUE; }), 'Mk:api': values.FN_NATIVE(async ([ep, param, token]) => { apiRequests++; diff --git a/src/client/scripts/hpml/lib.ts b/src/client/scripts/hpml/lib.ts index eaa237b73..9708581a1 100644 --- a/src/client/scripts/hpml/lib.ts +++ b/src/client/scripts/hpml/lib.ts @@ -26,23 +26,23 @@ export function initLib(hpml: Hpml) { const canvas = hpml.canvases[id.value]; const ctx = canvas.getContext('2d'); return values.OBJ(new Map([ - ['clear_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.clearRect(x.value, y.value, width.value, height.value) })], - ['fill_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.fillRect(x.value, y.value, width.value, height.value) })], - ['stroke_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.strokeRect(x.value, y.value, width.value, height.value) })], - ['fill_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.fillText(text.value, x.value, y.value, width ? width.value : undefined) })], - ['stroke_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.strokeText(text.value, x.value, y.value, width ? width.value : undefined) })], - ['set_line_width', values.FN_NATIVE(([width]) => { ctx.lineWidth = width.value })], - ['set_font', values.FN_NATIVE(([font]) => { ctx.font = font.value })], - ['set_fill_style', values.FN_NATIVE(([style]) => { ctx.fillStyle = style.value })], - ['set_stroke_style', values.FN_NATIVE(([style]) => { ctx.strokeStyle = style.value })], - ['begin_path', values.FN_NATIVE(() => { ctx.beginPath() })], - ['close_path', values.FN_NATIVE(() => { ctx.closePath() })], - ['move_to', values.FN_NATIVE(([x, y]) => { ctx.moveTo(x.value, y.value) })], - ['line_to', values.FN_NATIVE(([x, y]) => { ctx.lineTo(x.value, y.value) })], - ['arc', values.FN_NATIVE(([x, y, radius, startAngle, endAngle]) => { ctx.arc(x.value, y.value, radius.value, startAngle.value, endAngle.value) })], - ['rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.rect(x.value, y.value, width.value, height.value) })], - ['fill', values.FN_NATIVE(() => { ctx.fill() })], - ['stroke', values.FN_NATIVE(() => { ctx.stroke() })], + ['clear_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.clearRect(x.value, y.value, width.value, height.value); })], + ['fill_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.fillRect(x.value, y.value, width.value, height.value); })], + ['stroke_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.strokeRect(x.value, y.value, width.value, height.value); })], + ['fill_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.fillText(text.value, x.value, y.value, width ? width.value : undefined); })], + ['stroke_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.strokeText(text.value, x.value, y.value, width ? width.value : undefined); })], + ['set_line_width', values.FN_NATIVE(([width]) => { ctx.lineWidth = width.value; })], + ['set_font', values.FN_NATIVE(([font]) => { ctx.font = font.value; })], + ['set_fill_style', values.FN_NATIVE(([style]) => { ctx.fillStyle = style.value; })], + ['set_stroke_style', values.FN_NATIVE(([style]) => { ctx.strokeStyle = style.value; })], + ['begin_path', values.FN_NATIVE(() => { ctx.beginPath(); })], + ['close_path', values.FN_NATIVE(() => { ctx.closePath(); })], + ['move_to', values.FN_NATIVE(([x, y]) => { ctx.moveTo(x.value, y.value); })], + ['line_to', values.FN_NATIVE(([x, y]) => { ctx.lineTo(x.value, y.value); })], + ['arc', values.FN_NATIVE(([x, y, radius, startAngle, endAngle]) => { ctx.arc(x.value, y.value, radius.value, startAngle.value, endAngle.value); })], + ['rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.rect(x.value, y.value, width.value, height.value); })], + ['fill', values.FN_NATIVE(() => { ctx.fill(); })], + ['stroke', values.FN_NATIVE(() => { ctx.stroke(); })], ])); }), 'MkPages:chart': values.FN_NATIVE(([id, opts]) => { diff --git a/src/misc/count-same-renotes.ts b/src/misc/count-same-renotes.ts index 0233bdf88..bc1072080 100644 --- a/src/misc/count-same-renotes.ts +++ b/src/misc/count-same-renotes.ts @@ -4,11 +4,11 @@ export async function countSameRenotes(userId: string, renoteId: string, exclude // 指定したユーザーの指定したノートのリノートがいくつあるか数える const query = Notes.createQueryBuilder('note') .where('note.userId = :userId', { userId }) - .andWhere('note.renoteId = :renoteId', { renoteId }) + .andWhere('note.renoteId = :renoteId', { renoteId }); // 指定した投稿を除く if (excludeNoteId) { - query.andWhere('note.id != :excludeNoteId', { excludeNoteId }) + query.andWhere('note.id != :excludeNoteId', { excludeNoteId }); } return await query.getCount(); diff --git a/src/misc/reaction-lib.ts b/src/misc/reaction-lib.ts index e9a9d4f7c..b393154d9 100644 --- a/src/misc/reaction-lib.ts +++ b/src/misc/reaction-lib.ts @@ -78,7 +78,7 @@ export async function toDbReaction(reaction?: string | null, reacterHost?: strin name, }); - if (emoji) return reacterHost ? `:${name}@${reacterHost}:` : `:${name}:` + if (emoji) return reacterHost ? `:${name}@${reacterHost}:` : `:${name}:`; } return await getFallbackReaction(); diff --git a/src/server/api/endpoints/federation/instances.ts b/src/server/api/endpoints/federation/instances.ts index 7f0ad44aa..6b6fe42a4 100644 --- a/src/server/api/endpoints/federation/instances.ts +++ b/src/server/api/endpoints/federation/instances.ts @@ -129,7 +129,7 @@ export default define(meta, async (ps, me) => { } if (ps.host) { - query.andWhere('instance.host like :host', { host: '%' + ps.host.toLowerCase() + '%' }) + query.andWhere('instance.host like :host', { host: '%' + ps.host.toLowerCase() + '%' }); } const instances = await query.take(ps.limit!).skip(ps.offset).getMany(); diff --git a/src/server/api/endpoints/users/search-by-username-and-host.ts b/src/server/api/endpoints/users/search-by-username-and-host.ts index b6ba09d0c..8e436ddb9 100644 --- a/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -69,7 +69,7 @@ export default define(meta, async (ps, me) => { .andWhere('user.host LIKE :host', { host: ps.host.toLowerCase() + '%' }); if (ps.username) { - q.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' }) + q.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' }); } q.andWhere('user.updatedAt IS NOT NULL'); diff --git a/src/services/note/reaction/create.ts b/src/services/note/reaction/create.ts index c650b2e10..f3637352c 100644 --- a/src/services/note/reaction/create.ts +++ b/src/services/note/reaction/create.ts @@ -118,7 +118,7 @@ export default async (user: User, note: Note, reaction?: string) => { const content = renderActivity(await renderLike(inserted, note)); const dm = new DeliverManager(user, content); if (note.userHost !== null) { - const reactee = await Users.findOne(note.userId) + const reactee = await Users.findOne(note.userId); dm.addDirectRecipe(reactee as IRemoteUser); } dm.addFollowersRecipe(); diff --git a/src/services/note/reaction/delete.ts b/src/services/note/reaction/delete.ts index 3f7dda7bc..8d2f0682c 100644 --- a/src/services/note/reaction/delete.ts +++ b/src/services/note/reaction/delete.ts @@ -48,7 +48,7 @@ export default async (user: User, note: Note) => { const content = renderActivity(renderUndo(await renderLike(exist, note), user)); const dm = new DeliverManager(user, content); if (note.userHost !== null) { - const reactee = await Users.findOne(note.userId) + const reactee = await Users.findOne(note.userId); dm.addDirectRecipe(reactee as IRemoteUser); } dm.addFollowersRecipe(); diff --git a/src/services/note/read.ts b/src/services/note/read.ts index c87513f48..33fe4f1bf 100644 --- a/src/services/note/read.ts +++ b/src/services/note/read.ts @@ -68,5 +68,5 @@ export default ( if (!unread) { publishMainStream(userId, 'readAllAntennas'); } - }) + }); });