Skip to content

Commit 8e33ed9

Browse files
committed
style: Fix all lint errors with Biome auto-fix
Ran Biome with --unsafe flag to automatically fix all linting errors: - Alphabetized imports - Reformatted long lines - Simplified conditionals - Changed non-null assertions to optional chaining - Standardized formatting All changes are formatting-only with no functional impact.
1 parent 53c7f6e commit 8e33ed9

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

.claude/settings.local.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,5 @@
3737
]
3838
},
3939
"enableAllProjectMcpServers": true,
40-
"enabledMcpjsonServers": [
41-
"minecraft-dev"
42-
]
40+
"enabledMcpjsonServers": ["minecraft-dev"]
4341
}

__tests__/utils/path-converter.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
isUncWslPath,
77
isWindowsDrivePath,
88
isWslMountPath,
9-
normalizePath,
109
normalizeOptionalPath,
10+
normalizePath,
1111
validatePathFormat,
1212
} from '../../src/utils/path-converter.js';
1313
import { resetPlatformCache } from '../../src/utils/platform.js';
@@ -190,7 +190,7 @@ describe('Path Converter', () => {
190190
it('should normalize valid paths', () => {
191191
const result = normalizeOptionalPath('/home/user/project');
192192
expect(result).toBeDefined();
193-
expect(result!.length).toBeGreaterThan(0);
193+
expect(result?.length).toBeGreaterThan(0);
194194
});
195195
});
196196

src/java/java-process.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { spawn } from 'node:child_process';
22
import { JavaProcessError } from '../utils/errors.js';
33
import { logger } from '../utils/logger.js';
4-
import { normalizePath, normalizeOptionalPath } from '../utils/path-converter.js';
4+
import { normalizeOptionalPath, normalizePath } from '../utils/path-converter.js';
55

66
export interface JavaProcessOptions {
77
maxMemory?: string; // e.g., "2G"
@@ -51,11 +51,7 @@ export async function executeJavaProcess(
5151
// Normalize file path arguments (paths that look like absolute paths)
5252
const normalizedArgs = args.map((arg) => {
5353
// Normalize arguments that look like absolute file paths
54-
if (
55-
arg.startsWith('/') ||
56-
arg.startsWith('\\') ||
57-
/^[A-Za-z]:/.test(arg)
58-
) {
54+
if (arg.startsWith('/') || arg.startsWith('\\') || /^[A-Za-z]:/.test(arg)) {
5955
return normalizePath(arg);
6056
}
6157
return arg;

src/server/tools.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ const GetRegistryDataSchema = z.object({
4343

4444
const RemapModJarSchema = z.object({
4545
inputJar: z.string().describe('Path to the input mod JAR file (supports WSL and Windows paths)'),
46-
outputJar: z.string().describe('Path for the output remapped JAR file (supports WSL and Windows paths)'),
46+
outputJar: z
47+
.string()
48+
.describe('Path for the output remapped JAR file (supports WSL and Windows paths)'),
4749
mcVersion: z.string().describe('Minecraft version the mod is for'),
4850
toMapping: z.enum(['yarn', 'mojmap']).describe('Target mapping type'),
4951
});
@@ -76,13 +78,21 @@ const CompareVersionsSchema = z.object({
7678

7779
// Phase 2 Tool Schemas
7880
const AnalyzeMixinSchema = z.object({
79-
source: z.string().describe('Mixin source code (Java) or path to a JAR/directory (supports WSL and Windows paths)'),
81+
source: z
82+
.string()
83+
.describe(
84+
'Mixin source code (Java) or path to a JAR/directory (supports WSL and Windows paths)',
85+
),
8086
mcVersion: z.string().describe('Minecraft version to validate against'),
8187
mapping: z.enum(['yarn', 'mojmap']).optional().describe('Mapping type (default: yarn)'),
8288
});
8389

8490
const ValidateAccessWidenerSchema = z.object({
85-
content: z.string().describe('Access widener file content or path to .accesswidener file (supports WSL and Windows paths)'),
91+
content: z
92+
.string()
93+
.describe(
94+
'Access widener file content or path to .accesswidener file (supports WSL and Windows paths)',
95+
),
8696
mcVersion: z.string().describe('Minecraft version to validate against'),
8797
mapping: z.enum(['yarn', 'mojmap']).optional().describe('Mapping type (default: yarn)'),
8898
});
@@ -124,7 +134,9 @@ const SearchDocumentationSchema = z.object({
124134

125135
// Phase 3 Tool Schemas
126136
const AnalyzeModJarSchema = z.object({
127-
jarPath: z.string().describe('Local file path to the mod JAR file (supports WSL and Windows paths)'),
137+
jarPath: z
138+
.string()
139+
.describe('Local file path to the mod JAR file (supports WSL and Windows paths)'),
128140
includeAllClasses: z
129141
.boolean()
130142
.optional()
@@ -369,7 +381,8 @@ export const tools = [
369381
properties: {
370382
content: {
371383
type: 'string',
372-
description: 'Access widener file content or path to .accesswidener file (WSL or Windows path)',
384+
description:
385+
'Access widener file content or path to .accesswidener file (WSL or Windows path)',
373386
},
374387
mcVersion: {
375388
type: 'string',

0 commit comments

Comments
 (0)