mdn / mdn/browser-compat-data

Consistency linter: needs to compare version_removed version, not just truthiness

Open
#12,982 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

linter
Dominant language
JSON
Stars
5.8k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
186

Description

The lint already disallows declaring a sub-feature supported when the parent feature is set to false, or declaring a sub-feature shipped earlier than a parent feature. However, it doesn't catch cases with ranges. This is the case where I noticed it:

Parent feature:
https://github.com/mdn/browser-compat-data/blob/ea482a5bb65cc914e5a8c4cefdfffc792d77a745/api/Touch.json#L17-L26

Sub-feature:
https://github.com/mdn/browser-compat-data/blob/ea482a5bb65cc914e5a8c4cefdfffc792d77a745/api/Touch.json#L73-L75

This should fail the lint, because in Firefox 46 the parent feature wasn't enabled.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the parent and sub-feature records linked in api/Touch.json, especially the Firefox 46 range. Trace the consistency linter that checks parent and sub-feature support, then verify that this case is rejected because the parent was not enabled in Firefox 46.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.