Skip to content

New Rule: no-space-after-hash-on-atx-style-heading #370

Closed
@SwetaTanwar

Description

@SwetaTanwar

Rule details

This rule will warn when spaces are missing after the hash characters in an atx style heading:

What type of rule is this?

Warns about a potential problem

Example code

Incorrect Code

#Heading 1

##Heading 2

Correct Code

# Heading 1

## Heading 2

Participation

  • I am willing to submit a pull request to implement this rule.

Additional comments

Prior At: Rule

Activity

Pixel998

Pixel998 commented on May 10, 2025

@Pixel998
Contributor

@lumirlumir I think this is the rule you wanted to work on?

lumirlumir

lumirlumir commented on May 10, 2025

@lumirlumir
Member

Thanks for mentioning me, @Pixel998. I mentioned this rule in another comment, but I didn’t raise an issue about it—so I’m fine with whoever decides to take it on.

It’s a good rule to implement, especially since it’s already covered in markdownlint.

That said, please keep in mind that this rule could be tricky to implement due to potential edge cases, since ##heading is recognized as a normal text node (Maybe it could be another node too).

I’m in favor of creating this rule, but I’d like to hear what the rest of the team thinks before moving forward. @eslint/eslint-team


Also, the name of this rule should be shortened, it's a bit too long to be practical as a rule name.

I recommend to use no-missing-space-atx or similar. This name was used in markdownlint.

Image

moved this from Needs Triage to Triaging in Triageon May 10, 2025
SwetaTanwar

SwetaTanwar commented on May 10, 2025

@SwetaTanwar
ContributorAuthor

I will pick this up and submit a PR

snitin315

snitin315 commented on May 11, 2025

@snitin315
Contributor

👍🏻 for no-missing-space-atx, I think we should also have this as a recommendation.

moved this from Triaging to Ready for Dev Team in Triageon May 11, 2025
moved this from Ready for Dev Team to Ready to Implement in Triageon May 11, 2025
moved this from Ready to Implement to Complete in Triageon May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @SwetaTanwar@snitin315@lumirlumir@Pixel998

    Issue actions

      New Rule: no-space-after-hash-on-atx-style-heading · Issue #370 · eslint/markdown