Skip to content

feat: add no-missing-link-fragments rule #380

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

Merged
merged 30 commits into from
Jun 10, 2025

Conversation

SwetaTanwar
Copy link
Contributor

@SwetaTanwar SwetaTanwar commented May 19, 2025

Prerequisites checklist

What is the purpose of this pull request?

This PR adds a new rule no-missing-link-fragments to ensure there is no missing link fragment in the markdown

What changes did you make? (Give an overview)

Added the no-missing-link-fragments rule, along with documentation and tests.

Related Issues

fixes #369

Is there anything you'd like reviewers to focus on?

@SwetaTanwar SwetaTanwar marked this pull request as ready for review May 19, 2025 02:20
Copy link
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking this up. This looks like a good start. I have added a few suggestions on documentation & few false postives. I think there are few more cases we should cover that MD051 handles as well:

  1. HTML ids:

    <a id="bookmark"></a>
    
    [Link](#bookmark) // valid
  2. #top: HTML links to #top scroll to the top of a document.

    [Link](#top)
  3. Custom fragment syntax used by GitHub to highlight specific content in a document.

    [Link](#L20) // Valid
    
    [Link](#L19C5-L21C11) // Valid

@SwetaTanwar SwetaTanwar force-pushed the feat/no-missing-link-fragments branch from 67f7cc1 to b051c1a Compare May 19, 2025 07:26
@fasttime fasttime added this to Triage May 19, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage May 19, 2025
@snitin315 snitin315 moved this from Needs Triage to Implementing in Triage May 19, 2025
@SwetaTanwar SwetaTanwar force-pushed the feat/no-missing-link-fragments branch from 1301dba to a36b406 Compare May 25, 2025 12:03
@SwetaTanwar SwetaTanwar requested a review from lumirlumir May 26, 2025 04:00
nzakas
nzakas previously approved these changes May 28, 2025
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Would like @lumirlumir to review before merging.

snitin315
snitin315 previously approved these changes May 28, 2025
Copy link
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@SwetaTanwar SwetaTanwar dismissed stale reviews from snitin315 and nzakas via b7d1ee3 May 29, 2025 06:57
@SwetaTanwar SwetaTanwar requested a review from lumirlumir May 29, 2025 08:38
@SwetaTanwar
Copy link
Contributor Author

@lumirlumir Can you please review the PR

@nzakas
Copy link
Member

nzakas commented Jun 5, 2025

@lumirlumir please re-review this when you can.

@lumirlumir
Copy link
Member

lumirlumir commented Jun 6, 2025

@nzakas Sure, but I think my reviews haven’t been addressed yet. It seems like a bit more time might be needed.

@SwetaTanwar If you don’t mind, and if you’re still working on it, could you mark this PR as a draft while you continue making progress?

@lumirlumir
Copy link
Member

Could you take a look at the CI failure? Please ping me when the ongoing tasks are done :)

@SwetaTanwar
Copy link
Contributor Author

SwetaTanwar commented Jun 9, 2025

@lumirlumir The checks are passing now, fixed the CI failure due to Duplicate identifier 'MarkdownNode.

Also, I have addressed all the feedbacks you gave above

Copy link
Member

@lumirlumir lumirlumir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Would like @snitin315 and @nzakas to verify the changes before merging.

Copy link
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice job, and thanks for being so patient with all the back and forth.

@snitin315 snitin315 merged commit 70e7dac into eslint:main Jun 10, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

New Rule: link-fragments-should-be-valid
4 participants