Skip to content

Commit 93a8fd4

Browse files
committed
updated eslint rules
1 parent 76ad8e2 commit 93a8fd4

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

webapp/eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ module.exports = tseslint.config(
4040
'@typescript-eslint/ban-ts-comment': 'off',
4141
'@typescript-eslint/no-require-imports': 'off',
4242
'@typescript-eslint/no-unused-vars': 'off',
43+
'@typescript-eslint/prefer-for-of': 'off',
4344

4445
// Code style
4546
quotes: ['error', 'single'],

webapp/src/app/services/phaser/entities/registry/npc.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,12 @@ export interface Face {
5757
parts?: Part[];
5858
expressions?: Expressions;
5959
ABSTRACT?: string | SubJsonParam;
60-
subImages?: { [key: string]: string };
60+
subImages?: Record<string, string>;
6161
}
6262

63-
export interface Part {
64-
[key: string]: DetailPart | number;
65-
}
63+
export type Part = Record<string, DetailPart | number>;
6664

67-
export interface Expressions {
68-
[key: string]: Faces;
69-
}
65+
export type Expressions = Record<string, Faces>;
7066

7167
export interface Faces {
7268
faces: string[][];
@@ -85,18 +81,15 @@ export interface DetailPart {
8581
hideOnClip?: boolean;
8682
}
8783

88-
export interface WalkAnimSet {
89-
[key: string]: { [key: string]: string | WalkAnimSetInner | undefined } | undefined;
90-
}
84+
export type WalkAnimSet = Record<string, Record<string, string | WalkAnimSetInner | undefined> | undefined>;
85+
9186

9287
export interface WalkAnimSetInner extends IfThen {
9388
[key: string]: string | undefined;
9489
}
9590

9691

97-
export interface Configs {
98-
[key: string]: ConfigSet;
99-
}
92+
export type Configs = Record<string, ConfigSet>;
10093

10194
export interface ConfigSet {
10295
relativeVel?: number;

webapp/src/app/services/phaser/global-settings.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export namespace GlobalSettings {
88
}
99

1010
export interface Entity {
11-
ItemDestruct: { [key: string]: ItemDestruct };
11+
ItemDestruct: Record<string, ItemDestruct>;
1212
JumpPanel: JumpPanel;
1313
HiddenBlock: HiddenBlock;
1414
}

webapp/src/app/services/phaser/map-pan.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class MapPan extends Phaser.GameObjects.GameObject implements PreUpdate{
7474

7575
// @ts-ignore
7676
cam.preRender(this.scene.scale.resolution);
77-
cam.getWorldPoint(pointer.x, pointer.y, <any>mouse);
77+
cam.getWorldPoint(pointer.x, pointer.y, mouse as any);
7878
cam.scrollX += oldX - mouse.x;
7979
cam.scrollY += oldY - mouse.y;
8080
}

0 commit comments

Comments
 (0)