[code-infra] Add HTML validation to broken links checker#1241
Merged
[code-infra] Add HTML validation to broken links checker#1241
Conversation
Janpot
added a commit
to Janpot/material-ui
that referenced
this pull request
Mar 24, 2026
Update @mui/internal-code-infra to preview version from mui/mui-public#1241 and enable htmlValidate: true. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4638e80 to
8d7f40e
Compare
Janpot
added a commit
to Janpot/material-ui
that referenced
this pull request
Mar 30, 2026
Update @mui/internal-code-infra to preview version from mui/mui-public#1241 and enable htmlValidate: true. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Janpot
added a commit
to Janpot/material-ui
that referenced
this pull request
Mar 30, 2026
Update @mui/internal-code-infra to preview version from mui/mui-public#1241 and enable htmlValidate: true. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add an `htmlValidate` option to the crawl config that validates HTML content of crawled pages using the html-validate library. The option accepts `true` (uses recommended rules), or a config object supporting `extends: ['mui:recommended']` for the default preset. Config is always static (never loaded from disk). Reports are printed per page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace manual string replacement of mui:recommended in extends with html-validate's staticResolver API, which properly registers the preset so html-validate's own config resolution handles it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move fetch, parse, link/target extraction, and HTML validation into a single crawlWorker per URL. The main thread now only handles queue management, deduplication, and post-crawl analysis. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merge broken link and HTML validation issues into a single `issues` array on CrawlResult, using a discriminated union (`BrokenLinkIssue | HtmlValidateIssue`). This removes the separate `htmlValidateResults` field and simplifies consumers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5dab8b0 to
83f4fec
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Janpot
added a commit
to Janpot/material-ui
that referenced
this pull request
Mar 30, 2026
Update @mui/internal-code-infra to preview version from mui/mui-public#1241 and enable htmlValidate: true. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deploy previewhttps://deploy-preview-1241--mui-internal.netlify.app/ Bundle size
PerformanceTotal duration: 24.40 ms 🔺+8.27 ms(+51.2%) | Renders: 4 (+0) | Paint: 109.92 ms 🔺+40.94 ms(+59.3%)
Check out the code infra dashboard for more information about this PR. |
Janpot
added a commit
to Janpot/material-ui
that referenced
this pull request
Apr 15, 2026
Update @mui/internal-code-infra to preview version from mui/mui-public#1241 and enable htmlValidate: true. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
brijeshb42
approved these changes
Apr 15, 2026
Member
There was a problem hiding this comment.
Cool stuff, e.g. would catch mui/mui-x#12285 early.
I will be curious to see how https://html-validate.org/ performs compared. to https://validator.w3.org/.
Member
Author
Yeah, it just integrates very easily, but it has sharp edges. The maintainer is very responsive though. We can always swap it out for something else or drop it altogether. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
htmlValidateoption (true,false, or a custom config object)mui:recommendedpreset that extendshtml-validate:standard,html-validate:document, andhtml-validate:browsercrawlWorker.mjsworker thread — one worker per URLCrawlWorkerInput/CrawlWorkerOutputcontracts between parent and workerissuesarray onCrawlResultusing a discriminated union (BrokenLinkIssue | HtmlValidateIssue), removing the separatehtmlValidateResultsfield