Skip to content

feat(lint): remove MDN URLs duplicated from ancestor#29242

Merged
caugner merged 12 commits intomainfrom
remove-mdn-urls-duplicated-from-ancestor
Mar 26, 2026
Merged

feat(lint): remove MDN URLs duplicated from ancestor#29242
caugner merged 12 commits intomainfrom
remove-mdn-urls-duplicated-from-ancestor

Conversation

@caugner
Copy link
Copy Markdown
Contributor

@caugner caugner commented Mar 12, 2026

Summary

Extends the linter, removing MDN URLs duplicate from ancestor.

Test results and supporting details

This avoids cases where nested subfeatures have exactly the same MDN URL as an ancestor. In these cases, the MDN URL is most definitely not specifically about the subfeature.

Related issues

@github-actions github-actions Bot added infra Infrastructure issues (npm, GitHub Actions, releases) of this project data:http Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP 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 data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML linter Issues or pull requests regarding the tests / linter of the JSON files. data:svg Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG data:mathml Compat data for MathML features. https://developer.mozilla.org/docs/Web/MathML data:wasm Compat data for Web Assembly features. https://developer.mozilla.org/en-US/docs/WebAssembly data:manifests size:l [PR only] 101-1000 LoC changed labels Mar 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 12, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions Bot added merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. and removed merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. labels Mar 13, 2026
@caugner caugner force-pushed the remove-mdn-urls-duplicated-from-ancestor branch from f87791d to de80947 Compare March 18, 2026 10:16
caugner added 6 commits March 18, 2026 12:55
Prepares for adding ancestor mdn_url inheritance checks,
which requires access to the full hierarchy.
Move slugs, slugByPath, and redirects computation from test-mdn-urls.js
into utils/mdn-content-inventory.js. The wrapper exports a mutable
inventory object, making it possible to inject mock data in tests.
Add tests for mdn_url_redirect, mdn_url_casing, mdn_url_404,
mdn_url_other_page, mdn_url_casing_hash, and mdn_url_new_page using
the mutable inventory wrapper for mock injection. Update existing
duplicate_ancestor tests to use mocked inventory as well.
@caugner caugner force-pushed the remove-mdn-urls-duplicated-from-ancestor branch from de80947 to c760506 Compare March 18, 2026 14:09
@caugner caugner marked this pull request as ready for review March 19, 2026 18:33
@caugner caugner requested a review from a team as a code owner March 19, 2026 18:33
@caugner caugner requested a review from LeoMcA March 19, 2026 18:33
Copy link
Copy Markdown
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

Code looks fine aside from one duplicated test, but I think the data changes need further review from a BCD maintainer

Comment thread lint/linter/test-mdn-urls.test.js Outdated
@caugner caugner enabled auto-merge (squash) March 26, 2026 15:55
@caugner caugner disabled auto-merge March 26, 2026 15:55
@caugner caugner enabled auto-merge (squash) March 26, 2026 15:55
@caugner caugner merged commit cccb905 into main Mar 26, 2026
15 checks passed
@caugner caugner deleted the remove-mdn-urls-duplicated-from-ancestor branch March 26, 2026 15:56
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:http Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript data:manifests data:mathml Compat data for MathML features. https://developer.mozilla.org/docs/Web/MathML data:svg Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG data:wasm Compat data for Web Assembly features. https://developer.mozilla.org/en-US/docs/WebAssembly 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. size:l [PR only] 101-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants