Linter: check consistency of dependent features
Nobody has claimed this yet.
- Dominant language
- JSON
- Stars
- 5.8k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 186
Description
We currently have a 'subfeature_earlier_implementation' check, which would if for example the data claims that api.Document.title (document.title) was introduced before api.Document (document) itself.
This is an instance of one feature depending on another, but there are many more like this:
- APIs that were introduced together, where shipping just one of them would make no sense, for example
fetch()without aResponseinterface (however incomplete) would make no sense. - An interface that inherits from another, for example
VTTCueinherits fromTextTrackCue. api.VTTCue without api.TextTrackCue support is almost certainly an error. - An attribute of a certain type requires that type to exist. For example
element.classListrequiresDOMTokenList.
More generalized, we have:
- Implication: an entry/feature A that depends on another B, i.e., A ⇒ B and !B ⇒ !A (extremely common)
- Equivalence: entries that must have matching support data, i.e., A ⇔ B (fairly rare)
A lot of this could be derived from Web IDL definitions. The lint for this could have a set of version dependencies, something like this:
[
["api.VTTCue", ">=", "api.TextTrackCue"],
["api.WindowOrWorkerGlobalScope.fetch", "==", "api.Response"]
]
This was inspired by https://github.com/mdn/browser-compat-data/pull/6564.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the existing subfeature_earlier_implementation check and the Web IDL-derived data it validates; done means defining and implementing a dependency representation that covers implication and equivalence cases, with validation for the examples described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- data, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100