mirror of
https://github.com/antebudimir/eslint-plugin-vanilla-extract.git
synced 2025-12-31 08:53:33 +00:00
feat 🥁: add prefer-theme-tokens rule
- Enforce theme tokens over hard-coded values in vanilla-extract styles (colors, spacing, font sizes, border radius/widths, shadows, z-index, opacity, font weights, transitions) - Provide token suggestions from configured theme contracts; optional auto-fix for unambiguous replacements
This commit is contained in:
parent
d5eae5dfc8
commit
1d88c12e3d
16 changed files with 3201 additions and 21 deletions
|
|
@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
|
||||
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.15.0] - 2025-11-14
|
||||
|
||||
- Add new rule `prefer-theme-tokens`that requires theme tokens instead of hard-coded values in vanilla-extract styles
|
||||
- Detects hard-coded values across colors, spacing, font sizes, border radius/widths, shadows, z-index, opacity, font weights, and transitions
|
||||
- Provides suggestions from configured theme contracts; optional auto-fix for unambiguous replacements
|
||||
- Supports nested objects, media queries, selectors, and (optionally) template literals/helper calls
|
||||
- Configurable via `themeContracts`, category toggles, `allowedValues`, `allowedProperties`, `autoFix`, `remBase`, `checkHelperFunctions` (see README for details)
|
||||
|
||||
## [1.14.0] - 2025-11-09
|
||||
|
||||
- Add new rule `prefer-logical-properties` that enforces logical CSS properties over physical directional properties
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue