errata-ai / Microsoft

A Vale-compatible implementation of the Microsoft Writing Style Guide.
https://github.com/errata-ai/vale
MIT License
85 stars 46 forks source link

Microsoft.RangeFormat and Ranges trigger on ISO formatted dates: 2022-04-16T11:21:30.148Z #42

Closed landure closed 9 months ago

landure commented 2 years ago

I'm using Vale to validate Hugo markdown files.

Microsoft.RangeFormat and Ranges rules raise an error on ISO formatted dates in the front matter.

For "2022-04-16T11:21:30.148Z", theses rules find a issue with '2022-04'.

A solution is to add exceptions for ISO dates formats 'YYYY-mm' and 'YYYY-mm-dd'

exceptions:
  - '\b\d{4}[-]\d{2}\b'
  - '\b\d{4}[-]\d{2}-\d{2}\b'