create-typescript-app icon indicating copy to clipboard operation
create-typescript-app copied to clipboard

🚀 Feature: Lint for missing relative links in Markdown files

Open JoshuaKGoldberg opened this issue 1 year ago • 2 comments

Bug Report Checklist

  • [X] I have tried restarting my IDE and the issue persists.
  • [X] I have pulled the latest main branch of the repository.
  • [X] 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 😱:

https://github.com/JoshuaKGoldberg/create-typescript-app/blob/30ea110a303193c783f50aa232e06bdca25ec04e/README.md#L48

(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 avatar Sep 07 '23 05:09 JoshuaKGoldberg

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

Paulie-Aditya avatar Oct 25 '23 15:10 Paulie-Aditya

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 avatar Oct 25 '23 17:10 JoshuaKGoldberg