chore: automatic fix some linting errors, update lint config

This commit is contained in:
Pieter Vander Vennet 2025-06-18 21:52:03 +02:00
parent 04c8ccb0d2
commit 804280511b
26 changed files with 47 additions and 45 deletions

View file

@ -930,7 +930,7 @@ export class AddRatingBadge extends DesugaringStep<LayerConfigJson> {
const funcs = new Set<string>(specialVis.map((rs) => rs.func.funcName))
if (funcs.has("list_reviews")) {
;(<(string | TagRenderingConfigJson)[]>json.titleIcons).push("icons.rating")
(<(string | TagRenderingConfigJson)[]>json.titleIcons).push("icons.rating")
}
return json
}

View file

@ -18,7 +18,7 @@ export default class ExtraLinkConfig {
this.newTab = configJson.newTab
this.requirements = new Set(configJson.requirements)
for (let requirement of configJson.requirements) {
for (const requirement of configJson.requirements) {
if (this.requirements.has(<any>("no-" + requirement))) {
throw (
"Conflicting requirements found for " +

View file

@ -17,7 +17,7 @@ export default class WithContextLoader {
* The found value is interpreted as a tagrendering and fetched/parsed
* */
public tr(key: string, deflt?: string, translationContext?: string) {
let v: Translatable | TagRenderingConfigJson = this._json[key]
const v: Translatable | TagRenderingConfigJson = this._json[key]
if (v === undefined || v === null) {
if (deflt === undefined) {
return undefined

View file

@ -86,7 +86,7 @@ export class Tiles {
static asGeojson(zIndex: number, x?: number, y?: number): Feature<Polygon> {
let z = zIndex
if (x === undefined) {
;[z, x, y] = Tiles.tile_from_index(zIndex)
[z, x, y] = Tiles.tile_from_index(zIndex)
}
const bounds = Tiles.tile_bounds_lon_lat(z, x, y)
return new BBox(bounds).asGeoJson()