Skip to content

Commit 4953b4b

Browse files
authored
Chore: adjust scripts and add typecheck step in worflow (#44)
* 🧹 chore: run biome check * 🧹 chore: simplify biome commands in package.json * 🧹 chore: update linting step to use check script and add typecheck step * 🧹 chore: add TypeScript error suppression comments for onboarding roles and channels * 🧹 chore: suppress TS errors in unused auto-role event
1 parent fbd4a77 commit 4953b4b

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ jobs:
3232
npm install --no-audit --no-fund
3333
fi
3434
35-
- name: Lint
36-
run: npm run lint
35+
- name: Lint and Format
36+
run: npm run check
37+
38+
- name: Typecheck
39+
run: npm run typecheck
3740

3841
- name: Build
3942
run: npm run build:ci

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
"docker:dev": "NODE_VERSION=$(cat .nvmrc | tr -d 'v') docker compose --profile dev up",
1616
"docker:prod": "NODE_VERSION=$(cat .nvmrc | tr -d 'v') docker compose --profile prod up -d",
1717
"docker:stop": "docker compose down",
18-
"lint": "biome lint .",
19-
"lint:fix": "biome lint --fix .",
20-
"format": "biome format --write .",
21-
"check": "biome check .",
22-
"check:fix": "biome check --write .",
18+
"check": "biome check --write .",
2319
"typecheck": "tsc --noEmit",
2420
"test": "tsx --test '**/*.test.ts'",
2521
"test:ci": "NODE_ENV=test node --test dist/**/*.test.js",

src/commands/moderation/repel.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,8 @@ export const repelCommand = createCommand({
431431

432432
const timeout = await handleTimeout({
433433
target: target,
434-
durationInMilliseconds: timeoutHours !== null ? timeoutHours * HOUR : DEFAULT_TIMEOUT_DURATION_MS,
434+
durationInMilliseconds:
435+
timeoutHours !== null ? timeoutHours * HOUR : DEFAULT_TIMEOUT_DURATION_MS,
435436
});
436437

437438
const channels = getTextChannels(interaction);

src/commands/onboarding/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const onboardingCommand = createCommand({
1919
});
2020
return;
2121
}
22+
// @ts-expect-error: This command isn't used and shouldn't affect anything, onboarding roles are TBD
2223
const onboardingRole = guild.roles.cache.get(config.onboarding.roleId);
2324
if (!onboardingRole) {
2425
await interaction.reply({
@@ -27,6 +28,7 @@ export const onboardingCommand = createCommand({
2728
});
2829
return;
2930
}
31+
// @ts-expect-error: This command isn't used and shouldn't affect anything, onboarding channels are TBD
3032
const onboardingChannel = guild.channels.cache.get(config.onboarding.channelId);
3133
if (!onboardingChannel || !onboardingChannel.isSendable()) {
3234
await interaction.reply({

src/events/auto-roles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-nocheck: This event isn't used and shouldn't affect anything, auto-roles are TBD
12
import { Events } from 'discord.js';
23
import { config } from '../env.js';
34
import { createEvent } from '../util/events.js';

src/util/advent-scheduler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { promises as fs } from 'node:fs';
12
import { ChannelType, type Client } from 'discord.js';
23
import * as cron from 'node-cron';
3-
import { promises as fs } from 'node:fs';
44
import { config } from '../env.js';
55

66
const TRACKER_FILE = config.adventOfCodeTrackerPath;

0 commit comments

Comments
 (0)