Skip to content

Commit 395e5ec

Browse files
committed
Allow format check in linter
1 parent 601d043 commit 395e5ec

2 files changed

Lines changed: 203 additions & 343 deletions

File tree

tokens/linter/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ You'll be prompted to select which JSON file to validate.
2525
#### Option B: Pass a filename
2626

2727
```
28-
npm run linter my-tokens.json
28+
npm run linter my-tokens.json format
29+
npm run linter my-tokens.json contrast
2930
```
3031

31-
This runs the validation directly on a specific file inside tokens/.
32+
- format mode: checks description ↔ palette reference matches and invalid palette references, without skipping colors with alpha (rgba).
33+
- contrast mode: checks foreground/background pairs for WCAG contrast compliance, skipping gradients and alpha colors. Description mismatches are not shown.
3234

3335
#### Option C: Validate contrast for a specific token
3436

0 commit comments

Comments
 (0)