From df07ff6fd8e8503209fd7d02944dc2d3864caf21 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 29 Oct 2023 20:05:40 +0100 Subject: [PATCH] Fixed remaining linting errors --- lib/map/clientlayer.ts | 6 +++++- lib/utils/router.ts | 2 +- package-lock.json | 7 +++++++ package.json | 2 ++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/map/clientlayer.ts b/lib/map/clientlayer.ts index a5173bc2..0a366c41 100644 --- a/lib/map/clientlayer.ts +++ b/lib/map/clientlayer.ts @@ -27,7 +27,11 @@ export const ClientLayer = L.GridLayer.extend({ this.redraw(); }, createTile: function (tilePoint: Coords) { - let tile = L.DomUtil.create("canvas", "leaflet-tile"); + let tile: HTMLElement & { + width?: number; + height?: number; + getContext?: (type: string) => CanvasRenderingContext2D; + } = L.DomUtil.create("canvas", "leaflet-tile"); let tileSize = this.options.tileSize; tile.width = tileSize; diff --git a/lib/utils/router.ts b/lib/utils/router.ts index 5ab03aa1..6f32f4f1 100644 --- a/lib/utils/router.ts +++ b/lib/utils/router.ts @@ -125,7 +125,7 @@ export const Router = function (language: ReturnType) { } } - var router = new Navigo(null, true, "#!"); + let router = new Navigo(null, true, "#!"); router .on( diff --git a/package-lock.json b/package-lock.json index 0596f268..9d4b7666 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,12 @@ "version": "12.2.1", "license": "AGPL-3.0", "dependencies": { + "@types/d3-collection": "^1.0.12", "@types/d3-drag": "^3.0.5", "@types/d3-ease": "^3.0.1", "@types/d3-force": "^3.0.7", "@types/d3-interpolate": "^3.0.3", + "@types/d3-selection": "^3.0.8", "@types/d3-timer": "^3.0.1", "@types/d3-zoom": "^3.0.6", "@types/leaflet": "^1.7.1", @@ -2487,6 +2489,11 @@ "string.prototype.matchall": "^4.0.6" } }, + "node_modules/@types/d3-collection": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@types/d3-collection/-/d3-collection-1.0.12.tgz", + "integrity": "sha512-wBKsp5U/IiZoa5t5q6AGmmZ/LQIr8ItbsYDH1xo8R4LA6hoqTR6HZ1+okES/f0UZbmSbG9zvkRiBLoY4Gw9bsA==" + }, "node_modules/@types/d3-color": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.2.tgz", diff --git a/package.json b/package.json index fb47dd3a..63865362 100644 --- a/package.json +++ b/package.json @@ -21,10 +21,12 @@ "vite-plugin-pwa": "^0.16.5" }, "dependencies": { + "@types/d3-collection": "^1.0.12", "@types/d3-drag": "^3.0.5", "@types/d3-ease": "^3.0.1", "@types/d3-force": "^3.0.7", "@types/d3-interpolate": "^3.0.3", + "@types/d3-selection": "^3.0.8", "@types/d3-timer": "^3.0.1", "@types/d3-zoom": "^3.0.6", "@types/leaflet": "^1.7.1",