@moderneinc/biome-plugins 7.4.1-next.b09733 → 7.5.0-next.44ef69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moderneinc/biome-plugins",
3
- "version": "7.4.1-next.b09733",
3
+ "version": "7.5.0-next.44ef69",
4
4
  "description": "Biome GritQL lint plugins for Moderne design token enforcement",
5
5
  "type": "module",
6
6
  "files": [
@@ -0,0 +1,15 @@
1
+ `$prop: $val` where {
2
+ $prop <: or {
3
+ `color`, `backgroundColor`, `borderColor`,
4
+ `outlineColor`, `fill`, `stroke`
5
+ },
6
+ $val <: or {
7
+ r"['\x22]\s*(?:rgb|rgba|hsl|hsla)\([^'\x22]*['\x22]",
8
+ r"['\x22](?:red|blue|green|black|white|grey|gray|yellow|orange|purple|pink|brown|cyan|magenta|silver|gold|navy|teal|olive|maroon|lime|aqua|fuchsia)['\x22]"
9
+ },
10
+ register_diagnostic(
11
+ span = $val,
12
+ message = "Non-hex colour literal. Use semanticColors.* or colors.* from @moderneinc/design-system-tokens. (transparent/inherit/currentColor/none are fine.)",
13
+ severity = "error"
14
+ )
15
+ }
@@ -0,0 +1,20 @@
1
+ `$prop: $val` where {
2
+ $prop <: or {
3
+ `padding`, `paddingTop`, `paddingRight`, `paddingBottom`, `paddingLeft`,
4
+ `paddingInline`, `paddingBlock`, `paddingInlineStart`, `paddingInlineEnd`,
5
+ `margin`, `marginTop`, `marginRight`, `marginBottom`, `marginLeft`,
6
+ `marginInline`, `marginBlock`, `marginInlineStart`, `marginInlineEnd`,
7
+ `gap`, `rowGap`, `columnGap`,
8
+ `top`, `right`, `bottom`, `left`,
9
+ `borderRadius`,
10
+ `borderTopLeftRadius`, `borderTopRightRadius`,
11
+ `borderBottomLeftRadius`, `borderBottomRightRadius`,
12
+ `fontSize`
13
+ },
14
+ $val <: r"['\x22][^'\x22]*[0-9]+px[^'\x22]*['\x22]",
15
+ register_diagnostic(
16
+ span = $val,
17
+ message = "Hardcoded dimension string. Use a design token: theme.spacing()/`${spacing.*}px` for spacing, borderRadius.* for radii, theme.typography.pxToRem() for fontSize.",
18
+ severity = "error"
19
+ )
20
+ }