Compare commits

..

1 commit

Author SHA1 Message Date
3989d1183c feat 🥁: add no-unitless-values rule
- Disallow unitless numeric values for CSS properties that require units (e.g., width: 100 should be width: 100px)
- Allow zero values and unitless-valid properties (opacity, zIndex, lineHeight)
- Support both numeric literals and string literals with unitless numbers
- Configurable allowlist via 'allow' option
2025-12-01 18:54:10 +02:00

View file

@ -7,7 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [1.16.0] - 2025-12-01 ## [1.16.0] - 2025-12-01
- Add new rule `no-unitless-values` that disallows unitless numeric values for CSS properties that require units ([issue #6](https://github.com/antebudimir/eslint-plugin-vanilla-extract/issues/6)) - Add new rule `no-unitless-values` that disallows unitless numeric values for CSS properties that require units
- Flags both numeric literals (e.g., `width: 100`) and string literals with unitless numbers (e.g., `width: '100'`) - Flags both numeric literals (e.g., `width: 100`) and string literals with unitless numbers (e.g., `width: '100'`)
- Allows zero values without units (valid CSS) and properties that accept unitless values (opacity, zIndex, lineHeight, etc.) - Allows zero values without units (valid CSS) and properties that accept unitless values (opacity, zIndex, lineHeight, etc.)
- Configurable allowlist via `allow` option to exclude specific properties from checking - Configurable allowlist via `allow` option to exclude specific properties from checking