Skip to content

Conversation

@caugner
Copy link
Contributor

@caugner caugner commented Apr 22, 2025

Summary

Adds a lint that checks the hash of mdn_urls to ensure they're lowercase.

Fixes all errors, and removes some no-longer existing anchors.

Also adds a check-mdn-url-anchors script that fetches all MDN urls with a fragment, and checks whether the page contains the anchor.

Test results and supporting details

Related issues

Fixes #26597.

@github-actions github-actions bot added infra Infrastructure issues (npm, GitHub Actions, releases) of this project data:webext Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript linter Issues or pull requests regarding the tests / linter of the JSON files. size:m [PR only] 25-100 LoC changed labels Apr 22, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 23, 2025

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@caugner caugner force-pushed the fix-mdn-url-hash-case branch from 7f9c4e6 to 1109f58 Compare April 23, 2025 12:47
@github-actions github-actions bot added data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML data:svg Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG dependencies Pull requests that update a dependency package or file. scripts Issues or pull requests regarding the scripts in scripts/. size:l [PR only] 101-1000 LoC changed and removed size:m [PR only] 25-100 LoC changed labels Apr 23, 2025
caugner added 5 commits April 23, 2025 14:54
Ran `npx tsx scripts/check-mdn-url-anchors.ts`, then manually
checked each link to see if the anchor has changed, or if the
page no longer has a matching anchor for the referenced feature.
@caugner caugner force-pushed the fix-mdn-url-hash-case branch from 1109f58 to 8d25080 Compare April 23, 2025 12:54
@github-actions github-actions bot removed data:svg Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG dependencies Pull requests that update a dependency package or file. labels Apr 23, 2025
@caugner caugner requested a review from Elchi3 April 24, 2025 09:02
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you! 👍

@Elchi3 Elchi3 merged commit 94d14b1 into main Apr 25, 2025
11 checks passed
@Elchi3 Elchi3 deleted the fix-mdn-url-hash-case branch April 25, 2025 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript data:webext Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions infra Infrastructure issues (npm, GitHub Actions, releases) of this project linter Issues or pull requests regarding the tests / linter of the JSON files. scripts Issues or pull requests regarding the scripts in scripts/. size:l [PR only] 101-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some MDN urls point to wrong anchors

2 participants