Skip to content

feat: add no-missing-atx-heading-space rule #371

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 21 commits into from
May 23, 2025

Conversation

SwetaTanwar
Copy link
Contributor

@SwetaTanwar SwetaTanwar commented May 11, 2025

Prerequisites checklist

What is the purpose of this pull request?

This PR adds a new rule no-missing-atx-heading-space to ensure there is a space after hash on ATX style headings in Markdown

What changes did you make? (Give an overview)

Added the no-missing-atx-heading-space rule, along with documentation and tests.

Related Issues

fixes #370

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

Screenshots

Screenshot 2025-05-18 at 2 37 37 PM

@SwetaTanwar SwetaTanwar marked this pull request as ready for review May 12, 2025 09:42
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage May 12, 2025
@lumirlumir lumirlumir moved this from Needs Triage to Implementing in Triage May 12, 2025
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.

Could you please take a look at the CI failures?

I think there might be some edge cases that were missed.

@SwetaTanwar
Copy link
Contributor Author

Could you please take a look at the CI failures?

I think there might be some edge cases that were missed.

Fixed the edge case for markdown lint 0a7f1ec

@SwetaTanwar SwetaTanwar requested a review from lumirlumir May 12, 2025 11:20
@SwetaTanwar SwetaTanwar requested a review from snitin315 May 12, 2025 13:16
@nzakas
Copy link
Member

nzakas commented May 12, 2025

How about no-missing-atx-header-space? I think reads a bit clearer.

@SwetaTanwar
Copy link
Contributor Author

How about no-missing-atx-header-space? I think reads a bit clearer.

Agreed, updating the rule name to no-missing-atx-header-space

@lumirlumir
Copy link
Member

Would it be better to use no-missing-atx-heading-space?

CommonMark Spec and Mdast use heading.

image
image

@nzakas nzakas changed the title feat: add no-missing-space-atx rule feat: add no-missing-atx-header-space rule May 13, 2025
@nzakas nzakas changed the title feat: add no-missing-atx-header-space rule feat: add no-missing-atx-heading-space rule May 13, 2025
@nzakas
Copy link
Member

nzakas commented May 13, 2025

@lumirlumir yes, good call. We should use "heading" instead of "header".

By the way, you don't have to set assignees on PRs. it's assumed the author is the assignee.

@SwetaTanwar SwetaTanwar force-pushed the feat/no-missing-space-atx branch from 37c31f5 to 73001bb Compare May 18, 2025 09:05
@SwetaTanwar
Copy link
Contributor Author

@lumirlumir I have addressed your feedback, PTAL

@SwetaTanwar SwetaTanwar requested a review from lumirlumir May 18, 2025 12:58
@SwetaTanwar SwetaTanwar force-pushed the feat/no-missing-space-atx branch 2 times, most recently from 5c4dca9 to 41124d0 Compare May 19, 2025 12:12
@SwetaTanwar SwetaTanwar force-pushed the feat/no-missing-space-atx branch from 41124d0 to f1f8aaf Compare May 19, 2025 12:16
@SwetaTanwar SwetaTanwar requested a review from lumirlumir May 20, 2025 06:53
@SwetaTanwar SwetaTanwar requested a review from lumirlumir May 20, 2025 17:53
@lumirlumir
Copy link
Member

@SwetaTanwar

I apologize if my review comments came across as a bit aggressive. My English is still a work in progress, so there may have been some unintended tone. I’ll make sure to use kinder wording next time.

I’ll review it in a few days — thank you in advance for your patience!

@SwetaTanwar
Copy link
Contributor Author

@lumirlumir, No worries at all — I didn’t find the tone off in any way. Really appreciate your comments, they helped catch some important cases I missed.

Looking forward to your next round of feedback when you get a chance! 😊

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! Thanks for your hard work and patience on this PR.

Would like to ask @snitin315 and @nzakas to re-verify 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, thank you for contributing ⭐

@snitin315 snitin315 merged commit 84c87c4 into eslint:main May 23, 2025
17 checks passed
@github-project-automation github-project-automation bot moved this from Second Review Needed to Complete in Triage May 23, 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: no-space-after-hash-on-atx-style-heading
4 participants