Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ jobs:
npm install --no-audit --no-fund
fi

- name: Lint
run: npm run lint
- name: Lint and Format
run: npm run check

- name: Typecheck
run: npm run typecheck

- name: Build
run: npm run build:ci
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
"docker:dev": "NODE_VERSION=$(cat .nvmrc | tr -d 'v') docker compose --profile dev up",
"docker:prod": "NODE_VERSION=$(cat .nvmrc | tr -d 'v') docker compose --profile prod up -d",
"docker:stop": "docker compose down",
"lint": "biome lint .",
"lint:fix": "biome lint --fix .",
"format": "biome format --write .",
"check": "biome check .",
"check:fix": "biome check --write .",
Comment on lines -18 to -22
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

biome check does linting and formatting, we only need to run that, no need for the other scripts
also you always want --write that will try to fix what can be fixed (linting wise), format and still show what linting/formatting errors that still exist (that couldn't be fixed by --write).

"check": "biome check --write .",
"typecheck": "tsc --noEmit",
"test": "tsx --test '**/*.test.ts'",
"test:ci": "NODE_ENV=test node --test dist/**/*.test.js",
Expand Down
3 changes: 2 additions & 1 deletion src/commands/moderation/repel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ export const repelCommand = createCommand({

const timeout = await handleTimeout({
target: target,
durationInMilliseconds: timeoutHours !== null ? timeoutHours * HOUR : DEFAULT_TIMEOUT_DURATION_MS,
durationInMilliseconds:
timeoutHours !== null ? timeoutHours * HOUR : DEFAULT_TIMEOUT_DURATION_MS,
});

const channels = getTextChannels(interaction);
Expand Down
2 changes: 2 additions & 0 deletions src/commands/onboarding/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const onboardingCommand = createCommand({
});
return;
}
// @ts-expect-error: This command isn't used and shouldn't affect anything, onboarding roles are TBD
const onboardingRole = guild.roles.cache.get(config.onboarding.roleId);
if (!onboardingRole) {
await interaction.reply({
Expand All @@ -27,6 +28,7 @@ export const onboardingCommand = createCommand({
});
return;
}
// @ts-expect-error: This command isn't used and shouldn't affect anything, onboarding channels are TBD
const onboardingChannel = guild.channels.cache.get(config.onboarding.channelId);
if (!onboardingChannel || !onboardingChannel.isSendable()) {
await interaction.reply({
Expand Down
1 change: 1 addition & 0 deletions src/events/auto-roles.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck: This event isn't used and shouldn't affect anything, auto-roles are TBD
import { Events } from 'discord.js';
import { config } from '../env.js';
import { createEvent } from '../util/events.js';
Expand Down
2 changes: 1 addition & 1 deletion src/util/advent-scheduler.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { promises as fs } from 'node:fs';
import { ChannelType, type Client } from 'discord.js';
import * as cron from 'node-cron';
import { promises as fs } from 'node:fs';
import { config } from '../env.js';

const TRACKER_FILE = config.adventOfCodeTrackerPath;
Expand Down