Markdownlint: disable the MD033 (no-inline-html) rule project-wide - #81213
Markdownlint: disable the MD033 (no-inline-html) rule project-wide#81213oandregal wants to merge 1 commit into
Conversation
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>
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| @@ -1,3 +1,4 @@ | |||
| { | |||
| "extends": "packages/scripts/config/.markdownlint.json" | |||
| "extends": "packages/scripts/config/.markdownlint.json", | |||
There was a problem hiding this comment.
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.
|
Flaky tests detected in a760a54. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/30994296724
|
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:docscurrently 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>…|…</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": falseto the root.markdownlint.json. This only affects the Gutenberg repository: the shared@wordpress/scriptsconfig (packages/scripts/config/.markdownlint.json) is untouched, so downstream consumers ofwp-scripts lint-md-docskeep the rule.An alternative would be keeping the rule with an
allowed_elementslist (e.g.code,kbd,br, …), if reviewers prefer partial enforcement over disabling it.Testing Instructions
npm run lint:md:docs 2>&1 | grep -c MD033.npm run lint:md:docsstill 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.