What's new in v0.0.5
New validators (E-codes)
Seven previously undetected spec violations now emit diagnostics:
- E019 — layer missing required
typefield - E024 — layer has empty
id - E025 —
terrainmissingsourceor has invalidexaggeration - E026 — image/video source
coordinatesout of bounds - E027 —
lightanchor/intensity/color/position invalid values - E028 —
transitiondurationordelayis negative or non-number - E030 —
reflayer points to non-existent layer (including self-references) - E031 — source type mismatch: layer type requires raster/raster-dem but source is neither
- E032 — image or video source has empty
url/urls
All new validators skip expression arrays to avoid false positives on data-driven properties.
New linter rules (W-codes)
- W019 — symbol layers use
text-fieldbut noglyphsURL is defined in the style root - W020 —
fogdefined without explicitcolor(renderer falls back to default) - W021 —
fogdefined without explicitrange(renderer falls back to default) - W022 — layer uses
icon-imagebut nospriteis defined in the style root
Autofix expansion
styl lint --fix now covers two additional rules:
- W010 — removes zero-length segments from
line-dasharray(spec-invalid values) - W011 — migrates legacy array filters to expression syntax; handles all 8 legacy operators (
==,!=,<,<=,>,>=,has,!has,in,!in,none, recursiveall/any)
styl lint --fix style.json
Six rules are now fixable: W004, W007, W010, W011, W015, W016/W017.
Bug fixes
- W003 — no longer flags sources used exclusively by
terrain.sourceas unused - E022 — match expression label arrays no longer incorrectly fail expression validation
Commits
125bd3b fix(validator): skip match label arrays in E022 expression validation
f3c98cb docs: add E030, E031, E032, W022 to validators and linter docs
285d7c0 feat(linter): add W022 icon-image without sprite rule
b9f53b9 feat(validator): add E032 for image/video source with empty url/urls
bfff83a fix(validator): E031 use binding pattern, add color-relief negative test
dd36f25 feat(validator): add E031 for source type mismatch on raster/hillshade
5922274 fix(validator): E030 also catches self-referencing ref layers
366653b feat(validator): add E030 for ref pointing to non-existent layer
d933ea5 fix(linter): W003 no longer flags sources used only by terrain
d913d90 feat(linter): add W020/W021 fog missing color and range rules
d7eb73c feat(validator): fix 4 tech/design gaps from gap audit
89f2ec0 feat: implement 7 missing validators (E019, E024–E028, W019)
2a31f46 feat: add autofixes for W010 (zero dasharray) and W011 (legacy filter)
8288ede fix: resolve three validator bugs found in gap scan