Skip to content
This repository was archived by the owner on Jan 11, 2026. It is now read-only.

Commit 36a9d1b

Browse files
pterrorclaude
andcommitted
style: apply oxlint auto-fixes
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 754854c commit 36a9d1b

File tree

26 files changed

+83
-82
lines changed

26 files changed

+83
-82
lines changed

apps/discord-bot/src/bot.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class DiscordBot {
7777
// 4. Send Message to Core via sudo
7878
const parts = message.content.split(" ");
7979
if (parts[0]) {
80-
// execute("sudo", [targetId, verb, ...args])
80+
// Execute("sudo", [targetId, verb, ...args])
8181
socket.execute("sudo", [
8282
entityId, // Target ID
8383
parts[0], // Verb
@@ -86,7 +86,7 @@ class DiscordBot {
8686
}
8787
} catch (error) {
8888
console.error("Error handling message:", error);
89-
// message.reply("Something went wrong.");
89+
// Message.reply("Something went wrong.");
9090
}
9191
});
9292
}

apps/discord-bot/src/session.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe("Session Manager", () => {
5555
mockPlayerSocket.on.mockImplementation(
5656
(event: string, _handler: (...args: any[]) => unknown) => {
5757
if (event === "message") {
58-
// no-op
58+
// No-op
5959
}
6060
},
6161
);

apps/discord-bot/src/socket.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class SocketManager extends EventEmitter {
7070
this.socket.on("message", (data) => {
7171
if (data.method === "forward") {
7272
// Forwarded message from Core
73-
// params: { target: entityId, type: string, payload: any }
73+
// Params: { target: entityId, type: string, payload: any }
7474
const { target, type, payload } = data.params;
7575
this.emit("message", target, { type, ...payload });
7676
} else {

apps/tui/src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const App = () => {
200200
// Use local opcodes if available
201201
if (clientState.opcodes) {
202202
const lines = code.split("\n");
203-
const line = lines[position.lineNumber - 1] || "";
203+
const line = lines[position.lineNumber - 1] ?? "";
204204
const textBeforeCursor = line.slice(0, position.column - 1);
205205

206206
// Find the word being typed.
@@ -210,7 +210,7 @@ const App = () => {
210210
const [prefix] = match;
211211
// Filter opcodes
212212
// We cast opcodes to any[] because we don't have the type imported,
213-
// but we know it has an 'opcode' field.
213+
// But we know it has an 'opcode' field.
214214
const matches = clientState.opcodes.filter((op: any) => op.opcode.startsWith(prefix));
215215
if (matches.length > 0) {
216216
// Return the suffix of the first match
@@ -249,7 +249,7 @@ const App = () => {
249249
}
250250
return room["contents"]
251251
.map((id: number) => clientState.entities.get(id))
252-
.filter((entity) => !!entity);
252+
.filter((entity) => Boolean(entity));
253253
};
254254

255255
// Handle item inspection

apps/tui/src/components/Compass.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default function Compass({ room, entities }: CompassProps) {
5353
}
5454

5555
const exit = getExit(dir);
56-
const label = DIR_LABELS[dir] || dir;
56+
const label = DIR_LABELS[dir] ?? dir;
5757
const destName = exit ? ((exit["destination_name"] ?? exit["name"]) as string) : "";
5858

5959
return (

apps/tui/src/components/Editor.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const Editor: React.FC<EditorProps> = ({
7777
});
7878
} else if (key.return) {
7979
setLines((prev) => {
80-
const currentLine = prev[cursor.row] || "";
80+
const currentLine = prev[cursor.row] ?? "";
8181
const before = currentLine.slice(0, cursor.col);
8282
const after = currentLine.slice(cursor.col);
8383
const newLines = [...prev];
@@ -89,7 +89,7 @@ const Editor: React.FC<EditorProps> = ({
8989
if (cursor.col > 0) {
9090
// Simple backspace within line
9191
setLines((prev) => {
92-
const line = prev[cursor.row] || "";
92+
const line = prev[cursor.row] ?? "";
9393
const newLine = line.slice(0, cursor.col - 1) + line.slice(cursor.col);
9494
const newLines = [...prev];
9595
newLines[cursor.row] = newLine;
@@ -99,14 +99,14 @@ const Editor: React.FC<EditorProps> = ({
9999
} else if (cursor.row > 0) {
100100
// Merge with previous line
101101
setLines((prev) => {
102-
const currentLine = prev[cursor.row] || "";
103-
const prevLine = prev[cursor.row - 1] || "";
102+
const currentLine = prev[cursor.row] ?? "";
103+
const prevLine = prev[cursor.row - 1] ?? "";
104104
const newLines = [...prev];
105105
newLines.splice(cursor.row - 1, 2, prevLine + currentLine);
106106
return newLines;
107107
});
108108
setCursor((prev) => ({
109-
col: (lines[prev.row - 1] || "").length,
109+
col: (lines[prev.row - 1] ?? "").length,
110110
row: prev.row - 1,
111111
}));
112112
}
@@ -123,7 +123,7 @@ const Editor: React.FC<EditorProps> = ({
123123
.then((completion) => {
124124
if (completion) {
125125
setLines((prev) => {
126-
const line = prev[cursor.row] || "";
126+
const line = prev[cursor.row] ?? "";
127127
const newLine = line.slice(0, cursor.col) + completion + line.slice(cursor.col);
128128
const newLines = [...prev];
129129
newLines[cursor.row] = newLine;
@@ -149,7 +149,7 @@ const Editor: React.FC<EditorProps> = ({
149149
.then((completion) => {
150150
if (completion) {
151151
setLines((prev) => {
152-
const line = prev[cursor.row] || "";
152+
const line = prev[cursor.row] ?? "";
153153
const newLine = line.slice(0, cursor.col) + completion + line.slice(cursor.col);
154154
const newLines = [...prev];
155155
newLines[cursor.row] = newLine;
@@ -161,7 +161,7 @@ const Editor: React.FC<EditorProps> = ({
161161
} else {
162162
// Regular typing
163163
setLines((prev) => {
164-
const line = prev[cursor.row] || "";
164+
const line = prev[cursor.row] ?? "";
165165
const newLine = line.slice(0, cursor.col) + input + line.slice(cursor.col);
166166
const newLines = [...prev];
167167
newLines[cursor.row] = newLine;
@@ -205,7 +205,7 @@ const Editor: React.FC<EditorProps> = ({
205205
<Text>
206206
{line.slice(0, cursor.col)}
207207
<Text inverse color="cyan">
208-
{line[cursor.col] || " "}
208+
{line[cursor.col] ?? " "}
209209
</Text>
210210
{line.slice(cursor.col + 1)}
211211
</Text>

apps/web/src/components/Compass.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ export default function Compass() {
4242
}}
4343
classList={{
4444
compass__cell: true,
45-
"compass__cell--active": !!exit(),
45+
"compass__cell--active": Boolean(exit()),
4646
}}
4747
>
4848
<div class="compass__cell-label">{props.label}</div>
4949
<div
5050
classList={{
5151
"compass__cell-dest": true,
52-
"compass__cell-dest--active": !!exit(),
52+
"compass__cell-dest--active": Boolean(exit()),
5353
}}
5454
>
5555
{exit() ? ((exit()?.["destination_name"] ?? exit()?.["name"]) as string) : "+"}

apps/web/src/components/DigPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface DigPanelProps {
99
}
1010

1111
export default function DigPanel(props: DigPanelProps) {
12-
const [direction, setDirection] = createSignal(props.initialDirection || "");
12+
const [direction, setDirection] = createSignal(props.initialDirection ?? "");
1313
const [mode, setMode] = createSignal<"new" | "existing">("new");
1414
const [roomName, setRoomName] = createSignal("");
1515
const [targetRoom, setTargetRoom] = createSignal("");

apps/web/src/components/GameLog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function GameLog() {
1818
// Auto-scroll to bottom
1919
createEffect(() => {
2020
// oxlint-disable-next-line no-unused-expressions
21-
gameStore.state.messages.length; // dependency
21+
gameStore.state.messages.length; // Dependency
2222
if (containerRef) {
2323
containerRef.scrollTop = containerRef.scrollHeight;
2424
}
@@ -30,7 +30,7 @@ export default function GameLog() {
3030
{(msg) => {
3131
switch (msg.type) {
3232
case "error": {
33-
// fallthrough to message view, which handles error type styling
33+
// Fallthrough to message view, which handles error type styling
3434
return <MessageView text={msg.text} type={msg.type} />;
3535
}
3636
case "message": {

apps/web/src/components/RoomPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function RoomPanel() {
4646
}
4747
return (roomValue["contents"] as number[])
4848
.map((id) => gameStore.state.entities.get(id))
49-
.filter((entity) => !!entity);
49+
.filter((entity) => Boolean(entity));
5050
};
5151

5252
const exits = () => {
@@ -56,7 +56,7 @@ export default function RoomPanel() {
5656
}
5757
return (roomValue["exits"] as number[])
5858
.map((id) => gameStore.state.entities.get(id))
59-
.filter((entity) => !!entity);
59+
.filter((entity) => Boolean(entity));
6060
};
6161

6262
return (

0 commit comments

Comments
 (0)