chore: eslint

This commit is contained in:
ccmdi 2025-11-23 18:40:23 -05:00
parent c85125cdb4
commit d491fe0171
No known key found for this signature in database
3 changed files with 4 additions and 3 deletions

View file

@ -20,6 +20,7 @@ export interface MapPoint {
polygon?: LatLng.Verified[];
}
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace MapPoint {
export function areSamePlace(point1: MapPoint, point2: MapPoint): boolean {
return point1.location.lat === point2.location.lat && point1.location.lng === point2.location.lng;

View file

@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace LatLng {
// Unverified input - accepts various formats
export type Like =

View file

@ -3,7 +3,6 @@ import {
BasesPropertyId,
BasesView,
ListValue,
NumberValue,
QueryController,
StringValue,
ViewOption,
@ -460,7 +459,7 @@ export class MapBasesView extends BasesView {
const latValue = extractFromFrontmatter(fileCache.frontmatter, this.plugin.settings.latKey);
const lngValue = extractFromFrontmatter(fileCache.frontmatter, this.plugin.settings.lngKey);
return LatLng.parse(`${latValue}, ${lngValue}`);
return LatLng.parse([latValue, lngValue]);
}
} catch (error) {
console.error(`Error extracting coordinates from frontmatter for ${entry.file.name}:`, error);
@ -482,7 +481,7 @@ export class MapBasesView extends BasesView {
}
// Handle string value as JSON array
else if (value instanceof StringValue) {
const parsed = JSON.parse(value.toString().trim());
const parsed = JSON.parse(value.toString().trim()) as unknown[];
if (Array.isArray(parsed)) {
items = parsed;
}