Skip to content

Markdownlint: disable the MD033 (no-inline-html) rule project-wide - #81213

Open
oandregal wants to merge 1 commit into
trunkfrom
update/markdownlint-disable-md033
Open

Markdownlint: disable the MD033 (no-inline-html) rule project-wide#81213
oandregal wants to merge 1 commit into
trunkfrom
update/markdownlint-disable-md033

Conversation

@oandregal

@oandregal oandregal commented Aug 5, 2026

Copy link
Copy Markdown
Member

What?

See #81168 (comment)

Disables the MD033 (no-inline-html) markdownlint rule for this repository, in the root .markdownlint.json.

Why?

The docs and package READMEs already rely on inline HTML in hundreds of places — npm run lint:md:docs currently reports 564 MD033 violations across the repository (kbd, br, div, details/summary, img, code, and more). Some of it is unavoidable: for example, a pipe character inside a code span in a markdown table cannot be expressed portably across renderers with backticks, so autogenerated reference docs (e.g. theme-json-living.md, and the view config reference from #81168, where this was discussed) emit <code>…&#124;…</code> instead.

With that volume of pre-existing, largely intentional inline HTML, the rule's warnings drown out the rest of the linter's output without providing actionable signal. The rule is also not enforced in CI — no workflow runs lint:md:docs — so these warnings only surface in local runs.

How?

Adds "MD033": false to the root .markdownlint.json. This only affects the Gutenberg repository: the shared @wordpress/scripts config (packages/scripts/config/.markdownlint.json) is untouched, so downstream consumers of wp-scripts lint-md-docs keep the rule.

An alternative would be keeping the rule with an allowed_elements list (e.g. code, kbd, br, …), if reviewers prefer partial enforcement over disabling it.

Testing Instructions

  1. Run npm run lint:md:docs 2>&1 | grep -c MD033.
  2. On trunk it reports 564 violations; with this PR it reports 0.
  3. Other rules still run: npm run lint:md:docs still reports the pre-existing MD034/MD041 warnings.

Use of AI Tools

This PR was authored with the assistance of Claude Code (investigation of the rule's origin and violation counts, and the config change itself). The change was reviewed and is owned by the PR author.

The docs already rely on inline HTML in hundreds of places (kbd, br,
div, details, and code tags among others), so the rule produces over
560 warnings that drown out the rest of the linter output. It is not
enforced in CI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings August 5, 2026 09:41
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: oandregal <oandregal@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Disables MD033 project-wide to prevent intentional inline HTML from overwhelming local Markdown lint output.

Changes:

  • Overrides the shared Markdownlint configuration with "MD033": false.

@oandregal oandregal added the [Type] Build Tooling Issues or PRs related to build tooling label Aug 5, 2026
@oandregal
oandregal requested a review from mcsf August 5, 2026 09:42
Comment thread .markdownlint.json
@@ -1,3 +1,4 @@
{
"extends": "packages/scripts/config/.markdownlint.json"
"extends": "packages/scripts/config/.markdownlint.json",

@oandregal oandregal Aug 5, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Alternative, the fix could have been changing the scripts package itself, but that has downstream consequences (all consumers would be affected). This is collocated to what we aim for.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Flaky tests detected in a760a54.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/30994296724
📝 Reported issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants