Open foolip opened 2 years ago
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.
Another case of this is shared workers:
https://github.com/mdn/browser-compat-data/blob/ebb58c142ff3f1dcade8857de96d16fb8e2f80f1/api/SharedWorker.json#L155-L161
That should fail the lint because Safari 15 isn't supported by the parent feature:
https://github.com/mdn/browser-compat-data/blob/ebb58c142ff3f1dcade8857de96d16fb8e2f80f1/api/SharedWorker.json#L93-L101
I stumbled on this in https://github.com/web-platform-dx/web-features/pull/1294.
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.