You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using remark-lint-frontmatter-schema to validate the frontmatter for some markdown files. However, it seems that this plugin doesn't warn you when a file is missing frontmatter entirely, which means required fields don't get enforced at all. I believe it's reasonable behavior for an error to be thrown if the frontmatter schema requires a field to exist but the frontmatter isn't present (since the field therefore must not exist). I think a relatively easy way to solve this would be to feed empty frontmatter into validation if the frontmatter doesn't exist.
Would be ideal to get this fixed, even if this behavior is behind a flag or something to avoid breaking existing projects. Thank you!
The text was updated successfully, but these errors were encountered:
Hi, I'm using
remark-lint-frontmatter-schema
to validate the frontmatter for some markdown files. However, it seems that this plugin doesn't warn you when a file is missing frontmatter entirely, which means required fields don't get enforced at all. I believe it's reasonable behavior for an error to be thrown if the frontmatter schema requires a field to exist but the frontmatter isn't present (since the field therefore must not exist). I think a relatively easy way to solve this would be to feed empty frontmatter into validation if the frontmatter doesn't exist.Would be ideal to get this fixed, even if this behavior is behind a flag or something to avoid breaking existing projects. Thank you!
The text was updated successfully, but these errors were encountered: