diff --git a/assets/layers/charging_station/csvToJson.ts b/assets/layers/charging_station/csvToJson.ts index 174fa2585..63ba2e508 100644 --- a/assets/layers/charging_station/csvToJson.ts +++ b/assets/layers/charging_station/csvToJson.ts @@ -225,6 +225,7 @@ function run(file, protojson) { } +// noinspection JSUnusedLocalSymbols async function queryTagInfo(file, type, clean: ((s: string) => string)) { for (const e of loadCsv(file)) { const value = await ScriptUtils.TagInfoHistogram(e.key + ":" + type) @@ -252,6 +253,7 @@ async function queryTagInfo(file, type, clean: ((s: string) => string)) { } } +// noinspection JSUnusedLocalSymbols /** * Adds the translations into the 'newConfig' object * @param origPath diff --git a/scripts/ScriptUtils.ts b/scripts/ScriptUtils.ts index 2a9ac68bc..0f969da76 100644 --- a/scripts/ScriptUtils.ts +++ b/scripts/ScriptUtils.ts @@ -39,7 +39,7 @@ export default class ScriptUtils { public static DownloadFileTo(url, targetFilePath: string): Promise { ScriptUtils.erasableLog("Downloading", url, "to", targetFilePath) - return new Promise((resolve, err) => { + return new Promise((resolve) => { https.get(url, (res) => { const filePath = fs.createWriteStream(targetFilePath) res.pipe(filePath) diff --git a/scripts/conflate.ts b/scripts/conflate.ts index e25abfbf5..f0b342978 100644 --- a/scripts/conflate.ts +++ b/scripts/conflate.ts @@ -112,7 +112,7 @@ export class Conflate extends Script { const changedObjects: OsmObject[] = [] for (const { match, replayed } of bestMatches) { - const { external_feature, d, osm_feature } = match + const { d, osm_feature } = match const { possibly_imported, certainly_imported, resting_properties } = replayed const status = resting_properties["status"] delete resting_properties["status"] diff --git a/scripts/lint.ts b/scripts/lint.ts index 09206e68c..55ef491ea 100644 --- a/scripts/lint.ts +++ b/scripts/lint.ts @@ -30,17 +30,6 @@ t.OnEveryLanguage((txt, ln) => { return txt }) -const articles = { - /* de: "eine", - es: 'una', - fr: 'une', - it: 'una', - nb_NO: 'en', - nl: 'een', - pt: 'uma', - pt_BR : 'uma',//*/ -} - function reorder(object: object, order: string[]) { const allKeys = new Set(Object.keys(object)) const copy = {} @@ -54,38 +43,6 @@ function reorder(object: object, order: string[]) { return copy } -function addArticleToPresets(layerConfig: { presets?: { title: any }[] }) { - /* - if(layerConfig.presets === undefined){ - return - } - for (const preset of layerConfig.presets) { - preset.title = new Translation(preset.title, "autofix") - .OnEveryLanguage((txt, lang) => { - let article = articles[lang] - if(lang === "en"){ - if(["a","e","u","o","i"].some(vowel => txt.toLowerCase().startsWith(vowel))) { - article = "an" - }else{ - article = "a" - } - } - if(article === undefined){ - return txt; - } - if(txt.startsWith(article+" ")){ - return txt; - } - if(txt.startsWith("an ")){ - return txt; - } - return article +" " + txt.toLowerCase(); - }) - .translations - } - //*/ -} - const layerFiles = ScriptUtils.getLayerFiles() for (const layerFile of layerFiles) { try { @@ -95,7 +52,6 @@ for (const layerFile of layerFiles) { ConversionContext.construct([layerFile.path.split("/").at(-1)], ["update legacy"]) ) ) - addArticleToPresets(fixed) const reordered = reorder(fixed, layerAttributesOrder) writeFileSync(layerFile.path, JSON.stringify(reordered, null, " ") + "\n") } catch (e) { @@ -110,11 +66,7 @@ for (const themeFile of themeFiles) { themeFile.parsed, ConversionContext.construct([themeFile.path.split("/").at(-1)], ["update legacy layer"]) ) - for (const layer of fixed.layers) { - if (layer["presets"] !== undefined) { - addArticleToPresets(layer) - } - } + // extractInlineLayer(fixed) const endsWithNewline = themeFile.raw.at(-1) === "\n" const ordered = reorder(fixed, themeAttributesOrder) diff --git a/src/Logic/FeatureSource/Sources/FavouritesFeatureSource.ts b/src/Logic/FeatureSource/Sources/FavouritesFeatureSource.ts index 1f2764062..3d2f23cbe 100644 --- a/src/Logic/FeatureSource/Sources/FavouritesFeatureSource.ts +++ b/src/Logic/FeatureSource/Sources/FavouritesFeatureSource.ts @@ -159,7 +159,6 @@ export default class FavouritesFeatureSource extends StaticFeatureSource { public removeFavourite(feature: Feature, tags?: UIEventSource>) { const id = feature.properties.id.replace("/", "-") - const pref = this._osmConnection.GetPreference("favourite-" + id) this._osmConnection.preferencesHandler.removeAllWithPrefix("mapcomplete-favourite-" + id) if (tags) { delete tags.data._favourite diff --git a/src/Logic/FeatureSource/Sources/LayoutSource.ts b/src/Logic/FeatureSource/Sources/LayoutSource.ts index fa430f561..87546015d 100644 --- a/src/Logic/FeatureSource/Sources/LayoutSource.ts +++ b/src/Logic/FeatureSource/Sources/LayoutSource.ts @@ -46,7 +46,6 @@ export default class LayoutSource extends FeatureSourceMerger { ) const overpassSource = LayoutSource.setupOverpass( - backend, osmLayers, bounds, zoom, @@ -132,7 +131,6 @@ export default class LayoutSource extends FeatureSourceMerger { } private static setupOverpass( - backend: string, osmLayers: LayerConfig[], bounds: Store, zoom: Store, diff --git a/src/Logic/FeatureSource/Sources/NearbyFeatureSource.ts b/src/Logic/FeatureSource/Sources/NearbyFeatureSource.ts index 4ca206498..00ea2fc8e 100644 --- a/src/Logic/FeatureSource/Sources/NearbyFeatureSource.ts +++ b/src/Logic/FeatureSource/Sources/NearbyFeatureSource.ts @@ -48,7 +48,7 @@ export default class NearbyFeatureSource implements FeatureSource { flayer.layerDef.minzoom, flayer.isDisplayed ) - calcSource.addCallbackAndRunD((features) => { + calcSource.addCallbackAndRunD(() => { this.update() }) this._allSources.push(calcSource) diff --git a/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts b/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts index 09d89e086..51afcdfdd 100644 --- a/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts +++ b/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts @@ -103,7 +103,7 @@ export default class OverpassFeatureSource implements FeatureSource { if (!result) { return } - const [bounds, date, updatedLayers] = result + const [bounds, _, _] = result this._lastQueryBBox = bounds } diff --git a/src/Logic/ImageProviders/Mapillary.ts b/src/Logic/ImageProviders/Mapillary.ts index a508263fe..b9e6f70ca 100644 --- a/src/Logic/ImageProviders/Mapillary.ts +++ b/src/Logic/ImageProviders/Mapillary.ts @@ -133,7 +133,7 @@ export class Mapillary extends ImageProvider { return [this.PrepareUrlAsync(key, value)] } - public async DownloadAttribution(url: string): Promise { + public async DownloadAttribution(_: string): Promise { const license = new LicenseInfo() license.artist = undefined license.license = "CC BY-SA 4.0" diff --git a/src/Logic/Osm/OsmConnection.ts b/src/Logic/Osm/OsmConnection.ts index a6295bd8d..4c6d028de 100644 --- a/src/Logic/Osm/OsmConnection.ts +++ b/src/Logic/Osm/OsmConnection.ts @@ -416,7 +416,7 @@ export class OsmConnection { ): Promise<{ id: number }> { if (this._dryRun.data) { console.warn("Dryrun enabled - not actually uploading GPX ", gpx) - return new Promise<{ id: number }>((ok, error) => { + return new Promise<{ id: number }>((ok) => { window.setTimeout( () => ok({ id: Math.floor(Math.random() * 1000) }), Math.random() * 5000 diff --git a/src/Logic/SimpleMetaTagger.ts b/src/Logic/SimpleMetaTagger.ts index a425596ac..25a5e2b30 100644 --- a/src/Logic/SimpleMetaTagger.ts +++ b/src/Logic/SimpleMetaTagger.ts @@ -615,7 +615,7 @@ export default class SimpleMetaTaggers { isLazy: true, includesDates: true, }, - (feature, layer, tagsStore) => { + (feature) => { Utils.AddLazyProperty(feature.properties, "_last_edit:passed_time", () => { const lastEditTimestamp = new Date( feature.properties["_last_edit:timestamp"] diff --git a/src/Logic/Tags/ComparingTag.ts b/src/Logic/Tags/ComparingTag.ts index 8009662f4..981a64a92 100644 --- a/src/Logic/Tags/ComparingTag.ts +++ b/src/Logic/Tags/ComparingTag.ts @@ -20,11 +20,11 @@ export default class ComparingTag implements TagsFilter { this._boundary = boundary } - asChange(properties: Record): { k: string; v: string }[] { + asChange(_: Record): { k: string; v: string }[] { throw "A comparable tag can not be used to be uploaded to OSM" } - asHumanString(linkToWiki: boolean, shorten: boolean, properties: Record) { + asHumanString() { return this._key + this._representation + this._boundary } diff --git a/src/Logic/Web/ThemeViewStateHashActor.ts b/src/Logic/Web/ThemeViewStateHashActor.ts index df38edce1..129de09ce 100644 --- a/src/Logic/Web/ThemeViewStateHashActor.ts +++ b/src/Logic/Web/ThemeViewStateHashActor.ts @@ -122,7 +122,7 @@ export default class ThemeViewStateHashActor { private loadStateFromHash(hash: string) { const state = this._state const parts = hash.split(":") - outer: for (const { toggle, name, showOverOthers, submenu } of state.guistate.allToggles) { + outer: for (const { toggle, name, submenu } of state.guistate.allToggles) { for (const part of parts) { if (part === name) { toggle.setData(true) diff --git a/src/Models/ThemeConfig/Conversion/Conversion.ts b/src/Models/ThemeConfig/Conversion/Conversion.ts index 867a3d8f8..7603e5685 100644 --- a/src/Models/ThemeConfig/Conversion/Conversion.ts +++ b/src/Models/ThemeConfig/Conversion/Conversion.ts @@ -173,7 +173,7 @@ export class Pass extends Conversion { super(message ?? "Does nothing, often to swap out steps in testing", [], "Pass") } - convert(json: T, context: ConversionContext): T { + convert(json: T, _: ConversionContext): T { return json } } @@ -304,7 +304,7 @@ export class SetDefault extends DesugaringStep { this._overrideEmptyString = overrideEmptyString } - convert(json: T, context: ConversionContext): T { + convert(json: T, _: ConversionContext): T { if (json === undefined) { return undefined } diff --git a/src/Models/ThemeConfig/Conversion/CreateNoteImportLayer.ts b/src/Models/ThemeConfig/Conversion/CreateNoteImportLayer.ts index b7c94df56..05c95e618 100644 --- a/src/Models/ThemeConfig/Conversion/CreateNoteImportLayer.ts +++ b/src/Models/ThemeConfig/Conversion/CreateNoteImportLayer.ts @@ -24,7 +24,7 @@ export default class CreateNoteImportLayer extends Conversion { this._desugaring = desugaring } - convert(json: LayerConfigJson, context: ConversionContext): LayerConfigJson { + convert(json: LayerConfigJson, _: ConversionContext): LayerConfigJson { if (this._desugaring.tagRenderings === null) { return json } @@ -1088,7 +1088,7 @@ class AddFavouriteBadges extends DesugaringStep { ) } - convert(json: LayerConfigJson, context: ConversionContext): LayerConfigJson { + convert(json: LayerConfigJson, _: ConversionContext): LayerConfigJson { if (json.source === "special" || json.source === "special:library") { return json } @@ -1113,7 +1113,7 @@ export class AddRatingBadge extends DesugaringStep { ) } - convert(json: LayerConfigJson, context: ConversionContext): LayerConfigJson { + convert(json: LayerConfigJson, _: ConversionContext): LayerConfigJson { if (!json.tagRenderings) { return json } diff --git a/src/Models/ThemeConfig/Conversion/PrepareTheme.ts b/src/Models/ThemeConfig/Conversion/PrepareTheme.ts index a371019a8..f932c9c43 100644 --- a/src/Models/ThemeConfig/Conversion/PrepareTheme.ts +++ b/src/Models/ThemeConfig/Conversion/PrepareTheme.ts @@ -301,7 +301,7 @@ class ApplyOverrideAll extends DesugaringStep { ) } - convert(json: LayoutConfigJson, context: ConversionContext): LayoutConfigJson { + convert(json: LayoutConfigJson, _: ConversionContext): LayoutConfigJson { const overrideAll = json.overrideAll if (overrideAll === undefined) { return json diff --git a/src/UI/DownloadFlow/DownloadPanel.svelte b/src/UI/DownloadFlow/DownloadPanel.svelte index 6cbac91dd..773f4f3e7 100644 --- a/src/UI/DownloadFlow/DownloadPanel.svelte +++ b/src/UI/DownloadFlow/DownloadPanel.svelte @@ -27,7 +27,7 @@ mapExtent: state.mapProperties.bounds.data, width: maindiv.offsetWidth, height: maindiv.offsetHeight, - noSelfIntersectingLines: true, + noSelfIntersectingLines, }) } diff --git a/src/UI/Image/AttributedImage.svelte b/src/UI/Image/AttributedImage.svelte index 083f6dfd6..1730b3b5e 100644 --- a/src/UI/Image/AttributedImage.svelte +++ b/src/UI/Image/AttributedImage.svelte @@ -26,7 +26,7 @@ on:click={() => { previewedImage?.setData(image) }} - on:error={(event) => { + on:error={() => { if (fallbackImage) { imgEl.src = fallbackImage } diff --git a/src/UI/Image/ImageCarousel.ts b/src/UI/Image/ImageCarousel.ts index daa3c4ca4..4677f2082 100644 --- a/src/UI/Image/ImageCarousel.ts +++ b/src/UI/Image/ImageCarousel.ts @@ -21,8 +21,7 @@ export class ImageCarousel extends Toggle { changes?: Changes layout: LayoutConfig previewedImage?: UIEventSource - }, - feature: Feature + } ) { const uiElements = images.map( (imageURLS: { key: string; url: string; provider: ImageProvider; id: string }[]) => { diff --git a/src/UI/Input/SearchableMappingsSelector.ts b/src/UI/Input/SearchableMappingsSelector.ts index afdb29d9c..8c41b32a6 100644 --- a/src/UI/Input/SearchableMappingsSelector.ts +++ b/src/UI/Input/SearchableMappingsSelector.ts @@ -98,7 +98,7 @@ class SelfHidingToggle extends UIElement implements InputElement { return this._selected } - IsValid(t: boolean): boolean { + IsValid(_: boolean): boolean { return true } @@ -298,7 +298,7 @@ export class SearchablePillsSelector extends Combine implements InputElement< return this.selectedElements } - IsValid(t: T[]): boolean { + IsValid(_: T[]): boolean { return true } } diff --git a/src/UI/InputElement/Helpers/TranslationInput.svelte b/src/UI/InputElement/Helpers/TranslationInput.svelte index 5dd19df48..8bf57e244 100644 --- a/src/UI/InputElement/Helpers/TranslationInput.svelte +++ b/src/UI/InputElement/Helpers/TranslationInput.svelte @@ -23,7 +23,7 @@ function update() { const v = currentVal.data const l = currentLang.data - if (translations.data === "" || translations.data === undefined) { + if ( translations.data === "" || translations.data === undefined) { translations.data = {} } if (translations.data[l] === v) { @@ -44,7 +44,7 @@ ) onDestroy( - currentVal.addCallbackAndRunD((v) => { + currentVal.addCallbackAndRunD(() => { update() }) ) diff --git a/src/UI/InputElement/Validator.ts b/src/UI/InputElement/Validator.ts index ab48ad4ff..7aeee9654 100644 --- a/src/UI/InputElement/Validator.ts +++ b/src/UI/InputElement/Validator.ts @@ -71,7 +71,7 @@ export abstract class Validator { return Translations.t.validation[this.name].description } - public isValid(key: string, getCountry?: () => string): boolean { + public isValid(_: string): boolean { return true } diff --git a/src/UI/InputElement/Validators/TranslationValidator.ts b/src/UI/InputElement/Validators/TranslationValidator.ts index 8acfdce46..f0a602e72 100644 --- a/src/UI/InputElement/Validators/TranslationValidator.ts +++ b/src/UI/InputElement/Validators/TranslationValidator.ts @@ -6,7 +6,7 @@ export default class TranslationValidator extends Validator { super("translation", "Makes sure the the string is of format `Record` ") } - isValid(value: string, getCountry?: () => string): boolean { + isValid(value: string): boolean { try { JSON.parse(value) return true diff --git a/src/UI/Map/MapLibreAdaptor.ts b/src/UI/Map/MapLibreAdaptor.ts index 1e010c05e..d9e354c8b 100644 --- a/src/UI/Map/MapLibreAdaptor.ts +++ b/src/UI/Map/MapLibreAdaptor.ts @@ -136,7 +136,7 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { map.on("dblclick", (e) => { handleClick(e) }) - map.on("rotateend", (e) => { + map.on("rotateend", (_) => { this.updateStores() }) map.getContainer().addEventListener("keydown", (event) => { diff --git a/src/UI/OpeningHours/OpeningHoursInput.ts b/src/UI/OpeningHours/OpeningHoursInput.ts index 7802fed9a..7e824645c 100644 --- a/src/UI/OpeningHours/OpeningHoursInput.ts +++ b/src/UI/OpeningHours/OpeningHoursInput.ts @@ -145,7 +145,7 @@ export default class OpeningHoursInput extends InputElement { return this._value } - IsValid(t: string): boolean { + IsValid(_: string): boolean { return true } diff --git a/src/UI/OpeningHours/OpeningHoursPicker.ts b/src/UI/OpeningHours/OpeningHoursPicker.ts index 6cf5de63f..40eedcaa6 100644 --- a/src/UI/OpeningHours/OpeningHoursPicker.ts +++ b/src/UI/OpeningHours/OpeningHoursPicker.ts @@ -23,7 +23,7 @@ export default class OpeningHoursPicker extends InputElement { return this._ohs } - IsValid(t: OpeningHour[]): boolean { + IsValid(_: OpeningHour[]): boolean { return true } diff --git a/src/UI/OpeningHours/OpeningHoursPickerTable.ts b/src/UI/OpeningHours/OpeningHoursPickerTable.ts index 543cac73b..0e660f714 100644 --- a/src/UI/OpeningHours/OpeningHoursPickerTable.ts +++ b/src/UI/OpeningHours/OpeningHoursPickerTable.ts @@ -37,7 +37,7 @@ export default class OpeningHoursPickerTable extends InputElement this.SetClass("w-full block") } - IsValid(t: OpeningHour[]): boolean { + IsValid(_: OpeningHour[]): boolean { return true } diff --git a/src/UI/OpeningHours/PublicHolidayInput.ts b/src/UI/OpeningHours/PublicHolidayInput.ts index a1e54dea4..f52bc701a 100644 --- a/src/UI/OpeningHours/PublicHolidayInput.ts +++ b/src/UI/OpeningHours/PublicHolidayInput.ts @@ -21,7 +21,7 @@ export default class PublicHolidayInput extends InputElement { return this._value } - IsValid(t: string): boolean { + IsValid(_: string): boolean { return true } diff --git a/src/UI/Popup/ImportButtons/ConflateImportButtonViz.ts b/src/UI/Popup/ImportButtons/ConflateImportButtonViz.ts index fee676bf7..6c5b10189 100644 --- a/src/UI/Popup/ImportButtons/ConflateImportButtonViz.ts +++ b/src/UI/Popup/ImportButtons/ConflateImportButtonViz.ts @@ -86,8 +86,7 @@ export default class ConflateImportButtonViz implements SpecialVisualization, Au state: SpecialVisualizationState, tagSource: UIEventSource>, argument: string[], - feature: Feature, - layer: LayerConfig + feature: Feature ): BaseUIElement { const canBeImported = feature.geometry.type === "LineString" || diff --git a/src/UI/Popup/ImportButtons/PointImportButtonViz.ts b/src/UI/Popup/ImportButtons/PointImportButtonViz.ts index 583e5d3c3..6ab07ee19 100644 --- a/src/UI/Popup/ImportButtons/PointImportButtonViz.ts +++ b/src/UI/Popup/ImportButtons/PointImportButtonViz.ts @@ -51,8 +51,7 @@ export class PointImportButtonViz implements SpecialVisualization { state: SpecialVisualizationState, tagSource: UIEventSource>, argument: string[], - feature: Feature, - layer: LayerConfig + feature: Feature ): BaseUIElement { if (feature.geometry.type !== "Point") { return Translations.t.general.add.import.wrongType.SetClass("alert") diff --git a/src/UI/Popup/LanguageElement.ts b/src/UI/Popup/LanguageElement.ts index 93c03039d..a806faeed 100644 --- a/src/UI/Popup/LanguageElement.ts +++ b/src/UI/Popup/LanguageElement.ts @@ -17,7 +17,7 @@ import { EditButton, SaveButton } from "./SaveButton" import Translations from "../i18n/Translations" import Toggle from "../Input/Toggle" import { Feature } from "geojson" - +class xyz {} export class LanguageElement implements SpecialVisualization { funcName: string = "language_chooser" needsUrls = [] diff --git a/src/UI/Popup/Notes/AddNoteCommentViz.ts b/src/UI/Popup/Notes/AddNoteCommentViz.ts index 04a20467c..e448930b6 100644 --- a/src/UI/Popup/Notes/AddNoteCommentViz.ts +++ b/src/UI/Popup/Notes/AddNoteCommentViz.ts @@ -18,8 +18,7 @@ export class AddNoteCommentViz implements SpecialVisualization { public constr( state: SpecialVisualizationState, - tags: UIEventSource>, - args: string[] + tags: UIEventSource> ) { return new SvelteUIElement(AddNoteComment, { state, tags }) } diff --git a/src/UI/Popup/TagRendering/TagRenderingQuestion.svelte b/src/UI/Popup/TagRendering/TagRenderingQuestion.svelte index fbcc2d3a0..ae33fc1ba 100644 --- a/src/UI/Popup/TagRendering/TagRenderingQuestion.svelte +++ b/src/UI/Popup/TagRendering/TagRenderingQuestion.svelte @@ -171,7 +171,7 @@ } } - function onSave(e = undefined, deleteFreeform = false) { + function onSave(_ = undefined) { if (selectedTags === undefined) { return } @@ -395,7 +395,7 @@ {#if allowDeleteOfFreeform && mappings?.length === 0 && $freeformInput === undefined && $freeformInputUnvalidated === ""} - diff --git a/src/UI/Reviews/ReviewForm.svelte b/src/UI/Reviews/ReviewForm.svelte index 01b10c9ef..7cd9242f5 100644 --- a/src/UI/Reviews/ReviewForm.svelte +++ b/src/UI/Reviews/ReviewForm.svelte @@ -77,7 +77,7 @@ on:hover={(e) => { score = e.detail.score }} - on:mouseout={(e) => { + on:mouseout={() => { score = null }} score={score ?? confirmedScore ?? 0} diff --git a/src/UI/SpecialVisualizations.ts b/src/UI/SpecialVisualizations.ts index 1f7339e9d..9145ef99a 100644 --- a/src/UI/SpecialVisualizations.ts +++ b/src/UI/SpecialVisualizations.ts @@ -681,8 +681,7 @@ export default class SpecialVisualizations { return new ImageCarousel( AllImageProviders.LoadImagesFor(tags, imagePrefixes), tags, - state, - feature + state ) }, }, diff --git a/src/UI/Studio/EditLayerState.ts b/src/UI/Studio/EditLayerState.ts index f09bd65ad..480a568a6 100644 --- a/src/UI/Studio/EditLayerState.ts +++ b/src/UI/Studio/EditLayerState.ts @@ -119,7 +119,7 @@ export abstract class EditJsonState { this.setValueAt(path, v) }) this._stores.set(key, store) - this.configuration.addCallbackD((config) => { + this.configuration.addCallbackD(() => { store.setData(this.getCurrentValueFor(path)) }) return store diff --git a/src/UI/Studio/SchemaBasedTranslationInput.svelte b/src/UI/Studio/SchemaBasedTranslationInput.svelte index 21747a24f..c3a749d1b 100644 --- a/src/UI/Studio/SchemaBasedTranslationInput.svelte +++ b/src/UI/Studio/SchemaBasedTranslationInput.svelte @@ -6,13 +6,11 @@ export let state: EditLayerState export let path: (string | number)[] = [] - export let schema: ConfigMeta - - let value = new UIEventSource({}) + let value = new UIEventSource>({}) console.log("Registering translation to path", path) state.register( path, - value.mapD((v) => JSON.parse(value.data)) + value.mapD(() => JSON.parse(value.data)) ) diff --git a/src/UI/Studio/StudioServer.ts b/src/UI/Studio/StudioServer.ts index 1256e0895..56e230ccf 100644 --- a/src/UI/Studio/StudioServer.ts +++ b/src/UI/Studio/StudioServer.ts @@ -20,7 +20,6 @@ export default class StudioServer { category: "layers" | "themes" }[] > { - const uid = this._userId.data const { allFiles } = <{ allFiles: string[] }>( await Utils.downloadJson(this.url + "/overview") ) diff --git a/src/Utils/svgToPdf.ts b/src/Utils/svgToPdf.ts index 9c715b601..e979d3f18 100644 --- a/src/Utils/svgToPdf.ts +++ b/src/Utils/svgToPdf.ts @@ -698,7 +698,7 @@ class SvgToPdfPage { } for (const mapSpec of mapSpecs) { - await this.prepareMap(mapSpec, !this.options?.disableDataLoading) + await this.prepareMap(mapSpec) } } @@ -840,7 +840,7 @@ class SvgToPdfPage { /** * Replaces a mapSpec with the appropriate map */ - private async prepareMap(mapSpec: SVGTSpanElement, loadData: boolean): Promise { + private async prepareMap(mapSpec: SVGTSpanElement): Promise { if (this.options.disableMaps) { return } diff --git a/test/Logic/OSM/Actions/ReplaceGeometryAction.spec.ts b/test/Logic/OSM/Actions/ReplaceGeometryAction.spec.ts index 8a7c566a7..1d51db69a 100644 --- a/test/Logic/OSM/Actions/ReplaceGeometryAction.spec.ts +++ b/test/Logic/OSM/Actions/ReplaceGeometryAction.spec.ts @@ -884,7 +884,6 @@ describe("ReplaceGeometryAction", () => { ) it("should move nodes accordingly", async () => { - const layout = new LayoutConfig(grbStripped) const bbox = new BBox([ [3.2166673243045807, 51.21467321525788], diff --git a/test/Logic/OSM/ChangesetHandler.spec.ts b/test/Logic/OSM/ChangesetHandler.spec.ts index fce23419b..eba47ed6b 100644 --- a/test/Logic/OSM/ChangesetHandler.spec.ts +++ b/test/Logic/OSM/ChangesetHandler.spec.ts @@ -6,7 +6,7 @@ import { Changes } from "../../../src/Logic/Osm/Changes" import { describe, expect, it } from "vitest" function elstorage() { - return { addAlias: (a, b) => {} } + return { addAlias: (_, __) => {} } } describe("ChangesetHanlder", () => {