-
Notifications
You must be signed in to change notification settings - Fork 2k
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
add markdown linting using remark #2181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(
visit <https://uppy.io>
instead ofvisit https://uppy.io
). I didn't know that was a thing but I quite like it and it doesn't require that many changes to comply.
^-- i don't always add URLs as is, but when i do I <>
wrap them when i intend auto-hyperlinking; so not controversial in my mind at least :)
No strong opinions on the other things, this looks very fine to me!
Looks very good! I like the
I think I’d prefer to only keep actual uppy packages in |
* build: add markdown linting * build: support markdown front matter * build: fail remark lint on warnings * Fix markdown lint warnings * changelog: fix markdown errors, allow literal URLs * ci: add markdown lint step * website: regenerate contributing.md * build: properly ignore vendor and built files from remark-lint * build: add private packages to lerna config
Lints our readmes, blog posts, and docs. The settings are derived from remark-preset-lint-recommended which only checks for actual mistakes like missing
[url][references]
, and things that are not supported by all parsers. I disabled the rules around list item indentation because we don't follow them anywhere and that massive diff isn't really worth it. One other possibly controversial thing it requires is adding<>
around literal URLs (visit <https://uppy.io>
instead ofvisit https://uppy.io
). I didn't know that was a thing but I quite like it and it doesn't require that many changes to comply.The main benefits for us are that it checks that url references and url definitions match. I also wanted this to check for links to headings
#getFile-id
, which often include function signatures in our docs, and the heading anchor changes if the signature changes. There's a plugin that does that but it slugifies slightly differently from hexo so I haven't added it yet.This uses a new internal package
remark-lint-uppy
so all the remark dependencies are grouped and we have a place to document it if we ever need to.I wasn't sure what to name the folder—I put it in
private/remark-lint-uppy
for now, but we could also just stick it inpackages/remark-lint-uppy
, lerna won't publish it anyway if we keep the"private": true
in package.json. Thoughts/preferences?