Add wrong default import from json files to code quality checks, fix those imports

This commit is contained in:
Pieter Vander Vennet 2023-02-08 01:14:21 +01:00
parent 71c815d37d
commit ce44f34bf3
42 changed files with 167 additions and 148 deletions

View file

@ -1,5 +1,5 @@
import { Utils } from "../../Utils"
import * as polygon_features from "../../assets/polygon-features.json"
import polygon_features from "../../assets/polygon-features.json"
import { Store, UIEventSource } from "../UIEventSource"
import { BBox } from "../BBox"
import OsmToGeoJson from "osmtogeojson"
@ -290,7 +290,7 @@ export abstract class OsmObject {
{ values: Set<string>; blacklist: boolean }
> {
const result = new Map<string, { values: Set<string>; blacklist: boolean }>()
for (const polygonFeature of polygon_features["default"] ?? polygon_features) {
for (const polygonFeature of polygon_features) {
const key = polygonFeature.key
if (polygonFeature.polygon === "all") {