eslint / eslint/markdown

New Rule: no-emphasis-as-heading

Open
#683 4 comments 0 reactions 1 assignee Claimed by @lumirlumir View on GitHub
accepted feature
Dominant language
JavaScript
Stars
581
Forks
92
Avg merge
1d 4h
Merged PRs (30d)
11

Description

### Rule details

Prevent emphasized (i.e. bold or italic) text used to separate sections, where a heading should be used instead

### What type of rule is this?

Warns about a potential problem

### Example code

Bad:

```markdown
**My document**

Lorem ipsum dolor sit amet...

_Another section_

Consectetur adipiscing elit, sed do eiusmod.
```

Good:

```markdown
# My document

Lorem ipsum dolor sit amet...

## Another section

Consectetur adipiscing elit, sed do eiusmod.
```

### Prior Art

Markdownlint rule `MD036` (`no-emphasis-as-heading`): https://github.com/DavidAnson/markdownlint/blob/main/doc/md036.md

### Participation

- [ ] I am willing to submit a pull request to implement this rule.

### AI acknowledgment

- [x] I did not use AI to generate this issue report.
- [ ] (If the above is not checked) I have reviewed the AI-generated content before submitting.

### Additional comments

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.