mapbox / geojsonhint

IMPORTANT: This repo will be archived. Use @placemarkio/check-geojson instead
ISC License
258 stars 37 forks source link

filtering hints by type #63

Open derhuerst opened 7 years ago

derhuerst commented 7 years ago

thanks for this tool! i'm trying to use this to validate GeoJSON coming from a web service, so i'm interested only in the fact that the response is valid GeoJSON.

reading the GeoJSON spec, it sounds a lot like the "old-style crs member is not recommended" warning should be labeled as a warning:

OGC CRS URNs such as urn:ogc:def:crs:OGC:1.3:CRS84 shall be preferred over legacy identifiers such as EPSG:4326.

I'd like to propose to add a level field to all hints returned by hint(data). others could continue using this lib just like before, but it would be possible to tell if data is outright invalid or just doesn't comply with recommendations.

derhuerst commented 7 years ago

This would work similar to ESLint, which returns a severity property with each message.