Skip to content
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 rule to suggest using references ([x][y]) or resources ([x](y)) #266

Open
wooorm opened this issue Jun 5, 2021 · 2 comments
Open

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

wooorm opened this issue Jun 5, 2021 · 2 comments
Labels
👍 phase/yes Post is accepted and can be worked on 🦋 type/enhancement This is great to have 🙆 yes/confirmed This is confirmed and ready to be worked on

Comments

@wooorm
Copy link
Member

wooorm commented Jun 5, 2021

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
Copy link
Member Author

wooorm commented Jun 6, 2021

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

@wooorm wooorm added 🙉 open/needs-info This needs some more info and removed 🔍 status/open labels Aug 5, 2021
@wooorm wooorm added 👍 phase/yes Post is accepted and can be worked on 🙆 yes/confirmed This is confirmed and ready to be worked on and removed 🙉 open/needs-info This needs some more info labels Aug 21, 2021
@github-actions
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👍 phase/yes Post is accepted and can be worked on 🦋 type/enhancement This is great to have 🙆 yes/confirmed This is confirmed and ready to be worked on
Development

No branches or pull requests

1 participant