Skip to content

🚀 Feature: Lint for missing relative links in Markdown files #814

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
3 tasks done
JoshuaKGoldberg opened this issue Sep 7, 2023 · 2 comments
Open
3 tasks done
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Sep 7, 2023

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

I just discovered the hard way that the README.md contains an incorrect path for a relative link 😱:

- [Migrating an existing repository](./docs/Migrate.md): adding this template's tooling on top of an existing repository

(the file name is Migration.md, not Migrate.md)

That kind of typo should have been caught in CI. Surely there's some lint rule somewhere that could do this?

Additional Info

I did a quick Google and found https://github.com/theoludwig/markdownlint-rule-relative-links. Maybe that's usable?

If we end up switching to eslint-plugin-mdx or some such (#567), we'd want a lint rule from that config/plugin.

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: accepting prs Please, send a pull request to resolve this! labels Sep 7, 2023
@Paulie-Aditya
Copy link

why don't we just change the docs to say ./docs/Migration.md ?

@JoshuaKGoldberg
Copy link
Owner Author

Not sure what you mean there. This issue is for adding tooling that will automatically find incorrect links, not about any specific incorrect link that exists today.

@JoshuaKGoldberg JoshuaKGoldberg added this to the Long-Desired Features milestone Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

No branches or pull requests

2 participants