Skip to content

Change Request: Refactor rules to use ultrahtml for HTML parsing #496

@TKDev7

Description

@TKDev7

Environment

ESLint version:
@eslint/markdown version:
Node version:
npm version:
Operating System:

What problem do you want to solve?

We need to refactor rules with HTML logic. Currently, these rules rely on regular expressions for parsing HTML, which leads to frequent bugs (false positives/negatives), security risks like ReDoS, and a high maintenance burden. As decided in issue #483, we'll replace this approach with a more robust solution using the ultrahtml parsing library. This change will make HTML linting more accurate, consistent, and secure.

What do you think is the correct solution?

The solution is to refactor the following rules to use ultrahtml instead of regex:

  • no-bare-urls
  • no-empty-definitions
  • no-html
  • no-missing-link-fragments
  • no-multiple-h1
  • require-alt-text

Participation

  • I am willing to submit a pull request for this change.

Additional comments

This is currently blocked on #489.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Feedback Needed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions