Open JoshuaKGoldberg opened 2 years ago
The reason we set it up as a jest test was because it was super easy to script it up by using a markdown parser and we needed to load all of the rule files as well as the markdown files.
The issue with doing this in a Linter is that you need to have the latest disk contents each lint run. In the IDE this can be clunky because lint runs are so frequent.. so you need to build some watch and cache system. (This is a problem eslint-plugin-import
had to solve).
It's definitely doable! But it's just a lot harder than slapping together a jest test!
An ESLint rule with a fixer would be much better though.
Right now,
packages/eslint-plugin/docs.test.ts
is what validates rule docs are set up properly. I think it'd give a better dev experience to have whatever linter we use for markdown validate inline rather than waiting for a separate CI job / CLI task.Blocked on #3223, presumably, in case we do end up switching to
remark-lint
/eslint-plugin-mdx
.