mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 16:04:36 +00:00
Enable the @typescript-eslint/no-unsafe-assignment eslint rule (#1832)
## Description: Enable the `@typescript-eslint/no-unsafe-assignment` eslint rule. Fixes #1781 ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
This commit is contained in:
@@ -297,7 +297,7 @@ export class FakeHumanExecution implements Execution {
|
||||
UnitType.SAMLauncher,
|
||||
);
|
||||
const structureTiles = structures.map((u) => u.tile());
|
||||
const randomTiles: (TileRef | null)[] = new Array(10);
|
||||
const randomTiles: (TileRef | null)[] = new Array<TileRef | null>(10).fill(null);
|
||||
for (let i = 0; i < randomTiles.length; i++) {
|
||||
randomTiles[i] = this.randTerritoryTile(other);
|
||||
}
|
||||
|
||||
@@ -92,9 +92,9 @@ export class GameMapImpl implements GameMap {
|
||||
this.state = new Uint16Array(width * height);
|
||||
// Precompute the LUTs
|
||||
let ref = 0;
|
||||
this.refToX = new Array(width * height);
|
||||
this.refToY = new Array(width * height);
|
||||
this.yToRef = new Array(height);
|
||||
this.refToX = new Array<number>(width * height);
|
||||
this.refToY = new Array<number>(width * height);
|
||||
this.yToRef = new Array<TileRef>(height);
|
||||
for (let y = 0; y < height; y++) {
|
||||
this.yToRef[y] = ref;
|
||||
for (let x = 0; x < width; x++) {
|
||||
|
||||
Reference in New Issue
Block a user