From 1d658f6d88e71a7883f2d83210b45474742fb3d5 Mon Sep 17 00:00:00 2001 From: samanpwbb Date: Wed, 27 Jul 2016 16:32:20 -0400 Subject: [PATCH] bump geojsonhint version to 2.0.0 and ignore (newly introduced) hint warnings --- package.json | 2 +- src/api.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fdf0dce47c3..a5451cf5cac 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "geojson-area": "^0.2.1", "geojson-extent": "^0.3.2", "geojson-normalize": "0.0.1", - "geojsonhint": "^1.2.0", + "geojsonhint": "^2.0.0beta", "hat": "0.0.3", "lodash.isequal": "^4.2.0", "point-geometry": "0.0.0", diff --git a/src/api.js b/src/api.js index 211612d63d5..8583317962e 100644 --- a/src/api.js +++ b/src/api.js @@ -50,7 +50,7 @@ module.exports = function(ctx) { api.add = function (geojson) { var featureCollection = normalize(geojson); - var errors = geojsonhint.hint(featureCollection); + var errors = geojsonhint.hint(featureCollection).filter(e => e.level !== 'warn'); if (errors.length) { throw new Error(errors[0].message); }