Skip to content

Commit 5ed6073

Browse files
authored
fix: improve use-baseline types regex (eslint#137)
fix types regex
1 parent 2e37df7 commit 5ed6073

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

src/data/baseline-data.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -565,15 +565,14 @@ export const types = new Map([
565565
["sign", "0:"],
566566
["anchor", "0:"],
567567
["anchor-size", "0:"],
568-
["inset", "10:2020"],
568+
["color", "5:2023"],
569569
["attr", "10:2015"],
570570
["calc", "10:2015"],
571571
["calc-size", "0:"],
572572
["rect", "0:"],
573-
["color", "5:2024"],
574573
["color-mix", "5:2023"],
575-
["conic-gradient", "5:2025"],
576-
["repeating-conic-gradient", "5:2025"],
574+
["conic-gradient", "10:2020"],
575+
["repeating-conic-gradient", "10:2020"],
577576
["counter", "10:2015"],
578577
["counters", "10:2015"],
579578
["cross-fade", "0:"],
@@ -595,35 +594,36 @@ export const types = new Map([
595594
["opacity", "10:2016"],
596595
["saturate", "10:2016"],
597596
["sepia", "10:2016"],
598-
["linear-gradient", "5:2025"],
599-
["radial-gradient", "5:2025"],
600-
["repeating-linear-gradient", "5:2025"],
601-
["repeating-radial-gradient", "5:2025"],
597+
["linear-gradient", "10:2015"],
598+
["radial-gradient", "10:2015"],
599+
["repeating-linear-gradient", "10:2015"],
600+
["repeating-radial-gradient", "10:2015"],
602601
["image", "10:2015"],
603-
["hsl", "5:2024"],
604-
["hwb", "5:2024"],
602+
["hsl", "10:2015"],
603+
["hwb", "10:2022"],
605604
["image-set", "5:2023"],
606-
["lab", "5:2024"],
607-
["lch", "5:2024"],
605+
["lab", "5:2023"],
606+
["lch", "5:2023"],
608607
["light-dark", "5:2024"],
609608
["clamp", "10:2020"],
610609
["max", "10:2020"],
611610
["min", "10:2020"],
612611
["ray", "5:2024"],
613-
["oklab", "5:2024"],
614-
["oklch", "5:2024"],
612+
["oklab", "5:2023"],
613+
["oklch", "5:2023"],
615614
["paint", "0:"],
616-
["path", "0:"],
617-
["rgb", "10:2015"],
615+
["path", "10:2020"],
618616
["rem", "5:2024"],
617+
["rgb", "10:2015"],
619618
["mod", "5:2024"],
620619
["round", "5:2024"],
621620
["env", "10:2020"],
622621
["circle", "10:2020"],
623622
["ellipse", "10:2020"],
623+
["inset", "10:2020"],
624624
["polygon", "10:2020"],
625625
["xywh", "0:"],
626-
["steps", "10:2020"],
626+
["steps", "10:2015"],
627627
["matrix", "10:2015"],
628628
["rotate", "10:2015"],
629629
["scale", "10:2015"],
@@ -636,7 +636,7 @@ export const types = new Map([
636636
["translateX", "10:2015"],
637637
["translateY", "10:2015"],
638638
["matrix3d", "10:2015"],
639-
["perspective", "10:2022"],
639+
["perspective", "10:2015"],
640640
["rotate3d", "10:2015"],
641641
["rotateX", "10:2015"],
642642
["rotateY", "10:2015"],

tools/generate-baseline.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ function extractCSSFeatures(features) {
102102
const cssAtRulePattern = /^css\.at-rules\.(?<atRule>[a-zA-Z$\d-]+)$/u;
103103
const cssMediaConditionPattern =
104104
/^css\.at-rules\.media\.(?<condition>[a-zA-Z$\d-]+)$/u;
105-
const cssTypePattern =
106-
/^css\.types\.(?:.*?\.)?(?<type>[a-zA-Z\d-]+)(?:\.[^.]*$|[^.]*$)/u;
105+
const cssTypePattern = /^css\.types\.(?:.*?\.)?(?<type>[a-zA-Z\d-]+)$/u;
107106
const cssSelectorPattern = /^css\.selectors\.(?<selector>[a-zA-Z$\d-]+)$/u;
108107

109108
const properties = {};

0 commit comments

Comments
 (0)