mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-30 08:02:12 +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:
@@ -81,9 +81,9 @@ export function createGrid(
|
||||
|
||||
const width = scaledBoundingBox.max.x - scaledBoundingBox.min.x + 1;
|
||||
const height = scaledBoundingBox.max.y - scaledBoundingBox.min.y + 1;
|
||||
const grid: boolean[][] = Array(width)
|
||||
.fill(null)
|
||||
.map(() => Array(height).fill(false));
|
||||
const grid: boolean[][] = Array<Array<boolean>>(width)
|
||||
.fill(null as unknown as boolean[])
|
||||
.map(() => Array<boolean>(height).fill(false));
|
||||
|
||||
for (let x = scaledBoundingBox.min.x; x <= scaledBoundingBox.max.x; x++) {
|
||||
for (let y = scaledBoundingBox.min.y; y <= scaledBoundingBox.max.y; y++) {
|
||||
@@ -102,7 +102,7 @@ export function createGrid(
|
||||
export function findLargestInscribedRectangle(grid: boolean[][]): Rectangle {
|
||||
const rows = grid[0].length;
|
||||
const cols = grid.length;
|
||||
const heights: number[] = new Array(cols).fill(0);
|
||||
const heights: number[] = new Array<number>(cols).fill(0);
|
||||
let largestRect: Rectangle = { x: 0, y: 0, width: 0, height: 0 };
|
||||
|
||||
for (let row = 0; row < rows; row++) {
|
||||
|
||||
Reference in New Issue
Block a user