Skip to content

Use markdown linting instead of Jest for validating .md docs #4366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JoshuaKGoldberg opened this issue Dec 30, 2021 · 1 comment
Open
Labels
blocked by another issue Issues which are not ready because another issue needs to be resolved first repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Dec 30, 2021

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.

@JoshuaKGoldberg JoshuaKGoldberg added documentation Documentation ("docs") that needs adding/updating triage Waiting for team members to take a look labels Dec 30, 2021
@bradzacher
Copy link
Member

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.

@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Feb 24, 2022
@JoshuaKGoldberg JoshuaKGoldberg added blocked by another issue Issues which are not ready because another issue needs to be resolved first and removed accepting prs Go ahead, send a pull request that resolves this issue labels Nov 21, 2022
@Josh-Cena Josh-Cena added repo maintenance things to do with maintenance of the repo, and not with code/docs and removed documentation Documentation ("docs") that needs adding/updating labels Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked by another issue Issues which are not ready because another issue needs to be resolved first repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
No open projects
Development

No branches or pull requests

3 participants