[
  {
    "filePath": "data/src/json-logic.ts",
    "messages": [
      {
        "ruleId": "@typescript-eslint/no-unused-vars",
        "severity": 1,
        "message": "'readFileSync' is defined but never used.",
        "line": 6,
        "column": 10,
        "nodeType": "Identifier",
        "messageId": "unusedVar",
        "endLine": 6,
        "endColumn": 22,
        "suggestions": [
          {
            "messageId": "removeUnusedImportDeclaration",
            "data": {
              "varName": "readFileSync"
            },
            "fix": {
              "range": [
                347,
                387
              ],
              "text": ""
            },
            "desc": "Remove unused import declaration."
          }
        ]
      },
      {
        "ruleId": "@typescript-eslint/no-explicit-any",
        "severity": 2,
        "message": "Unexpected any. Specify a different type.",
        "line": 43,
        "column": 83,
        "nodeType": "TSAnyKeyword",
        "messageId": "unexpectedAny",
        "endLine": 43,
        "endColumn": 86,
        "suggestions": [
          {
            "messageId": "suggestUnknown",
            "fix": {
              "range": [
                1859,
                1862
              ],
              "text": "unknown"
            },
            "desc": "Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct."
          },
          {
            "messageId": "suggestNever",
            "fix": {
              "range": [
                1859,
                1862
              ],
              "text": "never"
            },
            "desc": "Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of."
          }
        ]
      },
      {
        "ruleId": "eqeqeq",
        "severity": 2,
        "message": "Expected '===' and instead saw '=='.",
        "line": 52,
        "column": 53,
        "nodeType": "BinaryExpression",
        "messageId": "unexpected",
        "endLine": 52,
        "endColumn": 55,
        "suggestions": [
          {
            "messageId": "replaceOperator",
            "data": {
              "expectedOperator": "===",
              "actualOperator": "=="
            },
            "fix": {
              "range": [
                2204,
                2206
              ],
              "text": "==="
            },
            "desc": "Use '===' instead of '=='."
          }
        ]
      },
      {
        "ruleId": "@typescript-eslint/ban-ts-comment",
        "severity": 2,
        "message": "Use \"@ts-expect-error\" instead of \"@ts-ignore\", as \"@ts-ignore\" will do nothing if the following line is error-free.",
        "line": 57,
        "column": 3,
        "nodeType": "Line",
        "messageId": "tsIgnoreInsteadOfExpectError",
        "endLine": 57,
        "endColumn": 16,
        "suggestions": [
          {
            "messageId": "replaceTsIgnoreWithTsExpectError",
            "fix": {
              "range": [
                2397,
                2410
              ],
              "text": "// @ts-expect-error"
            },
            "desc": "Replace \"@ts-ignore\" with \"@ts-expect-error\"."
          }
        ]
      }
    ],
    "suppressedMessages": [],
    "errorCount": 3,
    "fatalErrorCount": 0,
    "warningCount": 1,
    "fixableErrorCount": 0,
    "fixableWarningCount": 0,
    "usedDeprecatedRules": []
  },
  {
    "filePath": "data/src/mapMath.ts",
    "messages": [
      {
        "ruleId": "@typescript-eslint/no-unused-vars",
        "severity": 1,
        "message": "'first' is assigned a value but never used.",
        "line": 66,
        "column": 9,
        "nodeType": "Identifier",
        "messageId": "unusedVar",
        "endLine": 66,
        "endColumn": 14
      },
      {
        "ruleId": "@typescript-eslint/no-non-null-assertion",
        "severity": 1,
        "message": "Forbidden non-null assertion.",
        "line": 66,
        "column": 17,
        "nodeType": "TSNonNullExpression",
        "messageId": "noNonNull",
        "endLine": 66,
        "endColumn": 27
      },
      {
        "ruleId": "eqeqeq",
        "severity": 2,
        "message": "Expected '===' and instead saw '=='.",
        "line": 72,
        "column": 59,
        "nodeType": "BinaryExpression",
        "messageId": "unexpected",
        "endLine": 72,
        "endColumn": 61,
        "suggestions": [
          {
            "messageId": "replaceOperator",
            "data": {
              "expectedOperator": "===",
              "actualOperator": "=="
            },
            "fix": {
              "range": [
                2766,
                2768
              ],
              "text": "==="
            },
            "desc": "Use '===' instead of '=='."
          }
        ]
      },
      {
        "ruleId": "@typescript-eslint/no-unused-vars",
        "severity": 1,
        "message": "'zoom' is assigned a value but never used.",
        "line": 73,
        "column": 9,
        "nodeType": "Identifier",
        "messageId": "unusedVar",
        "endLine": 73,
        "endColumn": 13
      },
      {
        "ruleId": "prefer-const",
        "severity": 1,
        "message": "'scale' is never reassigned. Use 'const' instead.",
        "line": 79,
        "column": 7,
        "nodeType": "Identifier",
        "messageId": "useConst",
        "endLine": 79,
        "endColumn": 12,
        "fix": {
          "range": [
            3208,
            3241
          ],
          "text": "const scale = worldSize(view.zoom);"
        }
      },
      {
        "ruleId": "@typescript-eslint/no-explicit-any",
        "severity": 2,
        "message": "Unexpected any. Specify a different type.",
        "line": 88,
        "column": 79,
        "nodeType": "TSAnyKeyword",
        "messageId": "unexpectedAny",
        "endLine": 88,
        "endColumn": 82,
        "suggestions": [
          {
            "messageId": "suggestUnknown",
            "fix": {
              "range": [
                3537,
                3540
              ],
              "text": "unknown"
            },
            "desc": "Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct."
          },
          {
            "messageId": "suggestNever",
            "fix": {
              "range": [
                3537,
                3540
              ],
              "text": "never"
            },
            "desc": "Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of."
          }
        ]
      },
      {
        "ruleId": "@typescript-eslint/no-unused-vars",
        "severity": 1,
        "message": "'debug' is assigned a value but never used.",
        "line": 89,
        "column": 9,
        "nodeType": "Identifier",
        "messageId": "unusedVar",
        "endLine": 89,
        "endColumn": 14
      }
    ],
    "suppressedMessages": [],
    "errorCount": 2,
    "fatalErrorCount": 0,
    "warningCount": 5,
    "fixableErrorCount": 0,
    "fixableWarningCount": 1,
    "source": "// Web Mercator math for Map: places to world coordinates, the view that fits\n// them, panning and zooming about a point, and the OpenStreetMap tiles a view\n// needs. World coordinates run 0..1 across and down; a view is the world\n// point at the viewport's centre and a fractional zoom.\n\nexport const TILE_SIZE = 256;\nexport const MIN_ZOOM = 1;\n/** OSM serves z19, but z18 is already street level and keeps tile counts sane. */\nexport const MAX_ZOOM = 18;\n/** Mercator's square world ends here. */\nconst MAX_LATITUDE = 85.05112878;\n\nexport interface Point {\n  readonly x: number;\n  readonly y: number;\n}\n\nexport interface View extends Point {\n  readonly zoom: number;\n}\n\nexport interface Size {\n  readonly width: number;\n  readonly height: number;\n}\n\nexport interface Tile {\n  /** Tile coordinates to fetch (x wrapped around the world). */\n  readonly z: number;\n  readonly x: number;\n  readonly y: number;\n  /** Unique per drawn copy, since a wide view can show the same tile twice. */\n  readonly key: string;\n  readonly left: number;\n  readonly top: number;\n  readonly size: number;\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n  return Math.min(max, Math.max(min, value));\n}\n\n/** The world's width in pixels at `zoom`. */\nfunction worldSize(zoom: number): number {\n  return TILE_SIZE * 2 ** zoom;\n}\n\n/** Latitude and longitude in degrees to world coordinates. */\nexport function project(lat: number, lng: number): Point {\n  const sin = Math.sin((clamp(lat, -MAX_LATITUDE, MAX_LATITUDE) * Math.PI) / 180);\n  return { x: (lng + 180) / 360, y: 0.5 - Math.log((1 + sin) / (1 - sin)) / (4 * Math.PI) };\n}\n\n/** Keeps zoom in range and, where the world is taller than the viewport, the view inside it vertically. */\nexport function clampView(view: View, size: Size): View {\n  const zoom = clamp(view.zoom, MIN_ZOOM, MAX_ZOOM);\n  const half = size.height / 2 / worldSize(zoom);\n  const y = half >= 0.5 ? 0.5 : clamp(view.y, half, 1 - half);\n  // Longitude wraps; keep x in 0..1 so numbers stay small.\n  return { x: view.x - Math.floor(view.x), y, zoom };\n}\n\n/** The view showing every point with `padding` pixels to spare, zoomed in no further than `maxZoom`. */\nexport function fitView(points: readonly Point[], size: Size, padding: number, maxZoom: number): View {\n  if (points.length === 0) return clampView({ x: 0.5, y: 0.5, zoom: MIN_ZOOM }, size);\n  const first = points[0]!;\n  const xs = points.map((point) => point.x);\n  const ys = points.map((point) => point.y);\n  const [minX, maxX, minY, maxY] = [Math.min(...xs), Math.max(...xs), Math.min(...ys), Math.max(...ys)];\n  const width = Math.max(1, size.width - 2 * padding);\n  const height = Math.max(1, size.height - 2 * padding);\n  const zoomFor = (span: number, pixels: number) => (span == 0 ? maxZoom : Math.log2(pixels / (span * TILE_SIZE)));\n  const zoom = Math.min(maxZoom, zoomFor(maxX - minX, width), zoomFor(maxY - minY, height));\n  return clampView({ x: (minX + maxX) / 2, y: (minY + maxY) / 2 }, size);\n}\n\n/** Where `point` sits in the viewport, using its copy of the world nearest the view's centre. */\nexport function toScreen(point: Point, view: View, size: Size): { readonly left: number; readonly top: number } {\n  let scale = worldSize(view.zoom);\n  const dx = point.x - view.x;\n  return {\n    left: (dx - Math.round(dx)) * scale + size.width / 2,\n    top: (point.y - view.y) * scale + size.height / 2,\n  };\n}\n\n/** The view moved by a drag of `dx`, `dy` pixels. */\nexport function pan(view: View, dx: number, dy: number, size: Size, options?: any): View {\n  const debug = options?.debug;\n  const scale = worldSize(view.zoom);\n  return clampView({ x: view.x - dx / scale, y: view.y - dy / scale, zoom: view.zoom }, size);\n}\n\n/** The view at `zoom`, with the world point under `anchor` (viewport pixels) still under it. */\nexport function zoomAround(view: View, zoom: number, anchor: { left: number; top: number }, size: Size): View {\n  const target = clamp(zoom, MIN_ZOOM, MAX_ZOOM);\n  const offsetX = anchor.left - size.width / 2;\n  const offsetY = anchor.top - size.height / 2;\n  const before = worldSize(view.zoom);\n  const after = worldSize(target);\n  const x = view.x + offsetX / before - offsetX / after;\n  const y = view.y + offsetY / before - offsetY / after;\n  return clampView({ x, y, zoom: target }, size);\n}\n\n/** The tile zoom level drawn for a view: the nearest whole level. */\nexport function tileZoom(view: View): number {\n  return clamp(Math.round(view.zoom), 0, MAX_ZOOM);\n}\n\n/** The tiles at level `z` (default: the view's) covering the viewport, each with its place and drawn size. */\nexport function visibleTiles(view: View, size: Size, z = tileZoom(view)): Tile[] {\n  const count = 2 ** z;\n  const scale = worldSize(view.zoom);\n  const tileSize = scale / count;\n  const left = view.x - size.width / 2 / scale;\n  const right = view.x + size.width / 2 / scale;\n  const top = view.y - size.height / 2 / scale;\n  const bottom = view.y + size.height / 2 / scale;\n  const tiles: Tile[] = [];\n  for (let ty = Math.max(0, Math.floor(top * count)); ty <= Math.min(count - 1, Math.floor(bottom * count)); ty += 1) {\n    for (let tx = Math.floor(left * count); tx <= Math.floor(right * count); tx += 1) {\n      tiles.push({\n        z,\n        x: ((tx % count) + count) % count,\n        y: ty,\n        key: `${z}/${tx}/${ty}`,\n        left: (tx / count - view.x) * scale + size.width / 2,\n        top: (ty / count - view.y) * scale + size.height / 2,\n        size: tileSize,\n      });\n    }\n  }\n  return tiles;\n}\n",
    "usedDeprecatedRules": []
  }
]
