Skip to content

Lint that a child feature's version range is inside its parent's range#30002

Draft
caugner wants to merge 2 commits into
mdn:mainfrom
caugner:29958-lint-child-support-range-inside-parent
Draft

Lint that a child feature's version range is inside its parent's range#30002
caugner wants to merge 2 commits into
mdn:mainfrom
caugner:29958-lint-child-support-range-inside-parent

Conversation

@caugner

@caugner caugner commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a subfeature_outside_parent_range check to the Consistency linter that flags a sub-feature declaring current or preview support under the canonical feature name while the parent's canonical-name support exists but is no longer current (entirely version_removed, or only available behind a flag). Prefixed and alternative-name statements are intentionally ignored, since BCD does not consistently propagate those to sub-features.

This catches inconsistencies the scalar version_added checks miss — such as a child in preview under a parent whose only unprefixed support was removed (the case from #29904 that motivated the issue).

Also fixes the 24 pre-existing data inconsistencies the new check surfaces:

  • api.GeolocationCoordinates [opera]: drop the stray Coordinates alternative name so the parent matches opera_android and its own members.
  • javascript.builtins.Temporal [safari]: drop the stale useTemporal flag; the namespace is exposed unflagged in preview alongside its members.
  • api.WebTransport parameter sub-features [deno]: add the --unstable-net flag carried by the interface and its methods.
  • api.Navigator.activeVRDisplays.secure_context_required [firefox]: track the parent's removal at 98 and flag-gated support thereafter.
  • css.properties.resize values [firefox_android]: replace mirror with the parent's "recognized, but has no effect" removal at 79.

Test results and supporting details

  • Added 14 unit tests in lint/linter/test-consistency.test.js (positive cases incl. the issue's own example, plus negative guards for /true/mirror/prefixed/flagged children).
  • npm test passes; npm run lint -- --fail-on-warnings passes with zero findings across the dataset.

Related issues

Fixes #29958.

caugner added 2 commits July 8, 2026 12:24
Correct sub-features that declared current or `preview` support while their
parent's canonical-name support had been removed or was only available behind
a flag:

- `api.GeolocationCoordinates` [opera]: drop the stray `Coordinates`
  alternative name so the parent matches `opera_android` and its own members.
- `javascript.builtins.Temporal` [safari]: drop the stale `useTemporal` flag;
  the namespace is exposed unflagged in preview alongside its members.
- `api.WebTransport` parameter sub-features [deno]: add the `--unstable-net`
  flag carried by the interface and its methods.
- `api.Navigator.activeVRDisplays.secure_context_required` [firefox]: track the
  parent's removal at 98 and flag-gated support thereafter.
- `css.properties.resize` values [firefox_android]: replace `mirror` with the
  parent's "recognized, but has no effect" removal at 79.
Add a `subfeature_outside_parent_range` check to the `Consistency` linter that
flags a sub-feature declaring current or `preview` support under the canonical
feature name while the parent's canonical-name support exists but is no longer
current (entirely `version_removed`, or only available behind a flag).

This catches inconsistencies the scalar `version_added` checks miss, such as a
child in `preview` under a parent whose only unprefixed support was removed.
Prefixed and alternative-name statements are intentionally ignored, since BCD
does not consistently propagate those to sub-features.
@github-actions github-actions Bot added infra Infrastructure issues (npm, GitHub Actions, releases) of this project 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:l [PR only] 101-1000 LoC changed labels Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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

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:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript 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.

Lint that child version range is inside parent version range

1 participant