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
I know I can access frontmatter data using params.frontMatterLines; however, the onError function seems to operate solely on the params.lines array. Is there any way to write custom linting rules to validate text in the frontmatter area of a document?
The text was updated successfully, but these errors were encountered:
Not directly. Front matter is so varied that I have not thought to support something like this.
But if you want to lint front matter, I suppose you could report errors for line 1 of the Markdown. It would be slightly wrong, but maybe good enough for your purposes.
Your decisions makes sense. I think everything is great in markdownlint as it is. The one thing that would make it perfect would be the ability to tell onError which array to operate on so people could write custom linters for their frontmatter, too, since it is only the reporting that doesn't currently work.
I'll try doing what you suggested with line one of the params.lines array.
I know I can access frontmatter data using
params.frontMatterLines
; however, theonError
function seems to operate solely on theparams.lines
array. Is there any way to write custom linting rules to validate text in the frontmatter area of a document?The text was updated successfully, but these errors were encountered: