Skip to content

Commit 9116216

Browse files
ghirparaclaude
andcommitted
Fix lint warnings in recently modified files
- RouteCanvas: @ts-ignore@ts-expect-error (ban-ts-comment rule), prefix unused `id` prop with underscore - useRenpyAnalysis: remove unused type imports (Link, DialogueLine, VariableUsage) - renpyValidator: remove dead VOICE_KEYWORDS constant - renpyValidator.test: remove unused msgs() helper (superseded by errors()/warnings()) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 66f1973 commit 9116216

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

components/RouteCanvas.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ const getOptimalPath = (sourceNode: LabelNode, targetNode: LabelNode): [Position
8383

8484
for (const sKey of Object.keys(sourcePoints)) {
8585
for (const tKey of Object.keys(targetPoints)) {
86-
// @ts-ignore
86+
// @ts-expect-error — dynamic key access on typed object
8787
const p1 = sourcePoints[sKey];
88-
// @ts-ignore
88+
// @ts-expect-error — dynamic key access on typed object
8989
const p2 = targetPoints[tKey];
9090
const dist = Math.hypot(p1.x - p2.x, p1.y - p2.y);
9191

@@ -197,7 +197,7 @@ const BlockContainer: React.FC<{
197197
title: string;
198198
rect: Rect;
199199
isDimmed: boolean;
200-
}> = ({ id, title, rect, isDimmed }) => {
200+
}> = ({ id: _id, title, rect, isDimmed }) => {
201201
// Add padding to the visual box
202202
const padding = 20;
203203
const x = rect.x - padding;

hooks/useRenpyAnalysis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import { useMemo } from 'react';
10-
import type { Block, Link, RenpyAnalysisResult, LabelLocation, JumpLocation, Character, DialogueLine, Variable, VariableUsage, RenpyScreen, LabelNode, RouteLink, IdentifiedRoute } from '../types';
10+
import type { Block, RenpyAnalysisResult, LabelLocation, JumpLocation, Character, Variable, RenpyScreen, LabelNode, RouteLink, IdentifiedRoute } from '../types';
1111

1212
const LABEL_REGEX = /^\s*label\s+([a-zA-Z0-9_]+):/;
1313
const JUMP_CALL_EXPRESSION_REGEX = /\b(jump|call)\s+expression\s+(?:"([a-zA-Z0-9_]+)"|'([a-zA-Z0-9_]+)'|([a-zA-Z0-9_.]+))/g;

lib/renpyValidator.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import { describe, it, expect } from 'vitest';
22
import { validateRenpyCode } from './renpyValidator';
33

4-
// Helper: run validator and return only messages for easy assertion
5-
function msgs(code: string) {
6-
return validateRenpyCode(code).map(d => d.message);
7-
}
8-
94
function errors(code: string) {
105
return validateRenpyCode(code).filter(d => d.severity === 'error').map(d => d.message);
116
}

lib/renpyValidator.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ const IMAGE_NAME_RESERVED = new Set([
4545
'at', 'as', 'behind', 'onlayer', 'with', 'zorder',
4646
]);
4747

48-
const VOICE_KEYWORDS = new Set(['sustain', 'silence', 'replay', 'stop', 'clear']);
49-
5048
// Python keywords that make `$ kw == expr` a valid (non-assignment) expression
5149
const PYTHON_KEYWORDS = new Set([
5250
'assert', 'if', 'while', 'for', 'not', 'and', 'or', 'in', 'is',

0 commit comments

Comments
 (0)