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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
bun run db:generate
bun run db:migrate

- run: bun run test
- run: bun run verify
3 changes: 1 addition & 2 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"tabWidth": 2,
"printWidth": 100,
"sortPackageJson": false,
"ignorePatterns": []
"sortPackageJson": false
}
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ bun run dev # Run with hot reload (--watch)
bun run tsc # TypeScript type checking (via tsgo)
bun run format # Format code with oxfmt
bun run format:check # Check formatting without writing
bun run lint # Run ESLint
bun run lint:fix # Auto-fix linting issues
bun run lint # Run oxlint
bun run lint:fix # Auto-fix linting issues (oxlint)
bun run test # Run all tests (vitest)
bun run test:watch # Run tests in watch mode (vitest)
bun run verify # Run format check, lint, type checking, and tests
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ git checkout -b fix/issue-description

### 2. Make Your Changes

- **Follow the existing code style** - The project uses ESLint and Prettier for consistency.
- **Follow the existing code style** - The project uses oxlint and oxfmt for consistency.
- **Write TypeScript** - All code must be properly typed.
- **Add tests** - New functionality should include tests.
- **Update documentation** - Keep README and JSDoc comments up to date.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ For production deployments, the bot is automatically deployed via Forge when cha
- `bun db:migrate` - Apply database migrations
- `bun run format` - Format code with oxfmt
- `bun run format:check` - Check formatting without writing
- `bun lint` - Run ESLint
- `bun lint:fix` - Run ESLint with auto-fix
- `bun lint` - Run oxlint
- `bun lint:fix` - Run oxlint with auto-fix
- `bun tsc` - Run TypeScript type checking (via tsgo)
- `bun run test` - Run all tests
- `bun run test:watch` - Run tests in watch mode
Expand Down
741 changes: 206 additions & 535 deletions bun.lock

Large diffs are not rendered by default.

120 changes: 0 additions & 120 deletions eslint.config.js

This file was deleted.

49 changes: 49 additions & 0 deletions oxlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import nkzw from "@nkzw/oxlint-config";
import { defineConfig } from "oxlint";

export default defineConfig({
extends: [nkzw],
ignorePatterns: ["dist/**"],
rules: {
// Core rules.
eqeqeq: "error",
"no-console": "off",
"no-else-return": "error",
"no-return-await": "error",
"object-shorthand": "error",

// TypeScript rules.
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],

// Unicorn rules.
"unicorn/no-array-reduce": "error",
"unicorn/prefer-includes": "error",
"unicorn/prefer-node-protocol": "off",

// Import sorting.
"perfectionist/sort-imports": "error",
"perfectionist/sort-named-imports": "error",

// Not relevant for this project.
"@nkzw/ensure-relay-types": "off",
"@nkzw/require-use-effect-arguments": "off",
},
overrides: [
{
files: ["**/*.test.ts", "**/test/**/*.ts", "**/*.mock.ts"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
},
},
],
});
17 changes: 6 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"tsc": "tsgo --noEmit",
"format": "oxfmt",
"format:check": "oxfmt --check",
"lint": "eslint src --cache",
"lint:fix": "eslint src --fix",
"lint": "oxlint src",
"lint:fix": "oxlint src --fix",
"test": "vitest run",
"test:watch": "vitest",
"verify": "bun run format:check && bun run lint:fix && bun run tsc && vitest run",
"verify": "bun run format:check && bun run lint && bun run tsc && vitest run",
"postinstall": "git config core.hooksPath .hooks && chmod +x .hooks/*"
},
"dependencies": {
Expand All @@ -48,19 +48,14 @@
"youtube-search": "^1.1.6"
},
"devDependencies": {
"@nkzw/oxlint-config": "^1.0.1",
"@types/bun": "latest",
"@types/figlet": "^1.7.0",
"@typescript/native-preview": "^7.0.0-dev.20260228.1",
"@vitest/coverage-v8": "4.0.18",
"drizzle-kit": "0.31.4",
"eslint": "^9.31.0",
"eslint-config-prettier": "^10.1.5",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sort-keys-shorthand": "^3.0.0",
"eslint-plugin-unicorn": "^59.0.1",
"oxfmt": "^0.35.0",
"typescript-eslint": "^8.37.0",
"oxlint": "^1.50.0",
"vitest": "^4.0.18"
}
}
2 changes: 1 addition & 1 deletion src/deploy-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const commandsPath = join(__dirname, "slash-commands");
commands.push(slashCommand.data.toJSON());
}
}
} catch (_error) {
} catch {
logger.info("📁 No slash commands found in src/slash-commands/");
logger.info("Create slash command files ending with .command.ts to deploy them.");
process.exit(0);
Expand Down
2 changes: 1 addition & 1 deletion src/slash-commands/pingteam.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const pingteamSlashCommand: SlashCommand = {
await TeamService.addMemberByTeamName(teamName, user.id, interaction.user.id);

await interaction.reply(`✅ Added ${user} to team "${teamName}".`);
} catch (_error) {
} catch {
await interaction.reply({
content: `Failed to add ${user} to team "${teamName}". They might already be a member.`,
flags: MessageFlags.Ephemeral,
Expand Down
2 changes: 0 additions & 2 deletions src/slash-commands/uwc.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const uwcSlashCommand: SlashCommand = {
// Extract achievement/game info from thread if available.
let achievementId: number | undefined;
let achievementName: string | undefined;
let gameId: number | undefined;
let gameName: string | undefined;

// Try to extract context from thread name or first message.
Expand Down Expand Up @@ -125,7 +124,6 @@ const uwcSlashCommand: SlashCommand = {
creatorId: interaction.user.id,
achievementId,
achievementName,
gameId,
gameName,
pollUrl: `https://discord.com/channels/${interaction.guildId}/${interaction.channelId}/${pollReply.id}`,
});
Expand Down