remarkjs / remark-lint

plugins to check (lint) markdown code style
https://remark.js.org
MIT License
928 stars 131 forks source link

Add rule to suggest using references (`[x][y]`) or resources (`[x](y)`) #266

Open wooorm opened 3 years ago

wooorm commented 3 years ago

Subject of the feature

Ban either all or multiple-use resources and suggest using references instead.

Problem

I prefer using references. Some people prefer the inverse.

Expected behavior

remark-lint-link-style, remark-lint-no-resource-image.

I often prefer using references, so this rule could ban all resources. Some people prefer the inverse. This rule could be somewhat smart, when preferring references, by allowing resources if they occur once. This would only ban them if URLs are used more than once (including definitions): I often add a list of related projects to readmes, which probably won’t occur in the rest of the document. Overtime though, I might add a link again, and miss that it could either be defined already, or used twice.

Alternatives

I considered a specific rule for banning multi-use urls only, but I think this is better solved in a more generic way

wooorm commented 3 years ago

Q: What about autolinks (<https://>)

github-actions[bot] commented 2 years ago

Hi! This was marked as ready to be worked on! Note that while this is ready to be worked on, nothing is said about priority: it may take a while for this to be solved.

Is this something you can and want to work on?

Team: please use the area/* (to describe the scope of the change), platform/* (if this is related to a specific one), and semver/* and type/* labels to annotate this. If this is first-timers friendly, add good first issue and if this could use help, add help wanted.