Skip to content

Commit 41f4ffc

Browse files
committed
style: apply biome
1 parent f140591 commit 41f4ffc

File tree

6 files changed

+16
-10
lines changed

6 files changed

+16
-10
lines changed

bots/asakatsu-bot/commands/ask.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { execWithContext } from "../lib/executor";
2-
import { REACTION, type Context } from "../lib/types";
2+
import { REACTION } from "../lib/types";
33

44
await execWithContext(async (c) => {
55
const poll = await c.channel.send(

bots/asakatsu-bot/lib/executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Client, GatewayIntentBits, Partials } from "discord.js";
2-
import { Env, type Context } from "./types";
2+
import { type Context, Env } from "./types";
33

44
export async function execWithContext(fn: (c: Context) => Promise<void>) {
55
const env = Env.parse(process.env);

bots/asakatsu-bot/lib/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Client, type SendableChannels } from "discord.js";
1+
import type { Client, SendableChannels } from "discord.js";
22

33
import { z } from "zod";
44

bots/auto-moderator/src/env.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import * as v from "valibot";
22

33
const Env = v.object({
4-
DISCORD_WEBHOOK_URL: v.pipe(v.string(), v.url()),
5-
NOTION_API_KEY: v.string(),
6-
DISABLE_MENTION: v.optional(v.pipe(v.string(), v.transform((s) => s === "1" || s === "true"))),
4+
DISCORD_WEBHOOK_URL: v.pipe(v.string(), v.url()),
5+
NOTION_API_KEY: v.string(),
6+
DISABLE_MENTION: v.optional(
7+
v.pipe(
8+
v.string(),
9+
v.transform((s) => s === "1" || s === "true"),
10+
),
11+
),
712
});
813

914
export const env = v.parse(Env, process.env);

bots/gsc-report/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ async function sendToDiscord(data) {
5353
const webhook = new WebhookClient({ url });
5454

5555
const fields = Object.entries(data)
56-
.filter(([sub, stats]) => stats.clicks > 0)
57-
.sort(([sub1, stats1], [sub2, stats2]) => stats2.clicks - stats1.clicks)
56+
.filter(([_sub, stats]) => stats.clicks > 0)
57+
.sort(([_sub1, stats1], [_sub2, stats2]) => stats2.clicks - stats1.clicks)
5858
.slice(0, 10)
5959
.map(([sub, stats], i) => {
6060
let name;
6161
if (sub.startsWith("kf")) {
62-
name = `${sub} (駒場祭${2000 + parseInt(sub.slice(2)) - 51})`;
62+
name = `${sub} (駒場祭${2000 + parseInt(sub.slice(2), 10) - 51})`;
6363
} else if (sub.startsWith("mf")) {
64-
name = `${sub} (五月祭${2000 + parseInt(sub.slice(2)) - 73})`;
64+
name = `${sub} (五月祭${2000 + parseInt(sub.slice(2), 10) - 73})`;
6565
} else if (channelIds[sub]) {
6666
name = `${sub} ${channelIds[sub]}`;
6767
} else {

shell.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ pkgs.mkShell {
33
packages = [
44
pkgs.bun
55
pkgs.nodejs
6+
pkgs.biome
67
];
78
}

0 commit comments

Comments
 (0)