Skip to content

Commit

Permalink
fixed eslint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJDufour committed Jun 22, 2023
1 parent 626041e commit 5f3438b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.test.js
7 changes: 3 additions & 4 deletions src/convert-geometry/convert-geometry.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function convertPoint(geom) {
}

if (!point) {
throw `Invalid point object was used. Please use either a [lng, lat] array or GeoJSON point.`;
throw "Invalid point object was used. Please use either a [lng, lat] array or GeoJSON point.";
}

return point;
Expand Down Expand Up @@ -46,15 +46,14 @@ export function convertBbox(geom) {
}

if (!bbox) {
throw `Invalid bounding box object was used.
Please use either a [xmin, ymin, xmax, ymax] array or GeoJSON polygon.`;
throw "Invalid bounding box object was used. Please use either a [xmin, ymin, xmax, ymax] array or GeoJSON polygon.";
}

return bbox;
}

export function convertMultiPolygon(geom) {
const ERROR_MESSAGE = `Invalild polygonal object was used. Please use a GeoJSON polygon.`;
const ERROR_MESSAGE = "Invalild polygonal object was used. Please use a GeoJSON polygon.";

const polys = mpoly.get(geom);

Expand Down
2 changes: 0 additions & 2 deletions src/intersect-polygon/intersect-polygon.test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import test from "flug";
import { serve } from "srvd";
import fetch from "cross-fetch";
import mpoly from "mpoly";
import parseGeoraster from "georaster";
import bboxPolygon from "@turf/bbox-polygon";

import get from "../get";
import load from "../load";
import parse from "../parse";
import utils from "../utils";
import { convertMultiPolygon } from "../convert-geometry";
import intersectPolygon from "../intersect-polygon";

Expand Down

0 comments on commit 5f3438b

Please sign in to comment.