Skip to content

Commit 89e63bc

Browse files
authored
Merge branch 'production' into 2484-improvements-in-negative-containers
2 parents 64767e3 + c69623c commit 89e63bc

5 files changed

Lines changed: 329 additions & 391 deletions

File tree

.github/workflows/tokens-lint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Token Format Validation
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- production
8+
paths:
9+
- "tokens/*.json"
10+
11+
jobs:
12+
lint-tokens:
13+
runs-on: ubuntu-latest
14+
15+
defaults:
16+
run:
17+
working-directory: tokens/linter
18+
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Run token format validation
32+
run: npm run lint:tokens:format

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)