stylelint-plugin-rhythmguard 1.6.1 → 1.8.0

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/CHANGELOG.md CHANGED
@@ -6,6 +6,25 @@ The format follows Keep a Changelog principles and semantic versioning.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.8.0] - 2026-05-23
10
+
11
+ ### Added
12
+
13
+ - Added `.rhythmguardrc.json` audit config loading with `--config` and `--no-config`.
14
+ - Added external audit token sources with `--token-source`, `--token-source-format`, and `--token-kind`.
15
+ - Added token source parsing for CSS custom properties, Tailwind v4 `@theme`, flat JSON, Style Dictionary JSON, and DTCG JSON.
16
+ - Expanded audit token-contract reporting with loaded source metadata, raw values that match known tokens, and conflicting token values.
17
+
18
+ ## [1.7.0] - 2026-05-23
19
+
20
+ ### Added
21
+
22
+ - Added audit baseline workflows with `--write-baseline`, `--since-baseline`, and `--fail-on-new-drift` for legacy-safe CI adoption.
23
+ - Added changed-only audit scopes with `--staged` and `--since <git-ref>`.
24
+ - Added CI threshold gates with `--max-findings` and `--min-cleanliness`.
25
+ - Added `.rhythmguardignore` / `--ignore-path` support for reusable root-relative scan pruning.
26
+ - Added token contract reporting for spacing tokens used but missing, tokens defined but unused, and repeated raw value candidates.
27
+
9
28
  ## [1.6.1] - 2026-05-23
10
29
 
11
30
  ### Fixed
package/README.md CHANGED
@@ -90,9 +90,14 @@ npx rhythmguard audit ./src
90
90
  npx rhythmguard audit ./src --format markdown
91
91
  npx rhythmguard audit ./src --json
92
92
  npx rhythmguard audit . --ignore "apps/legacy/**" --ignore "vendor/**"
93
+ npx rhythmguard audit ./src --write-baseline
94
+ npx rhythmguard audit ./src --since-baseline --fail-on-new-drift
95
+ npx rhythmguard audit ./src --staged --max-findings 0
96
+ npx rhythmguard audit ./src --token-source ./tokens.json
97
+ npx rhythmguard audit ./src --token-source ./theme.css --token-source-format css
93
98
  ```
94
99
 
95
- The report covers authored CSS declarations and Tailwind arbitrary spacing values in common template/source files. Scan paths are scoped to the directory argument, and `--ignore` accepts repeatable, root-relative glob patterns for large generated or legacy subtrees. Markdown output is PR-ready for UX developers, UX designers, and design-system owners:
100
+ The report covers authored CSS declarations, Tailwind arbitrary spacing values in common template/source files, and token-contract drift such as missing spacing tokens, unused spacing tokens, repeated raw values that deserve token review, raw values that match known tokens, and conflicting token values. Scan paths are scoped to the directory argument. Use `--ignore`, `.rhythmguardignore`, or `--ignore-path` for generated or legacy subtrees, then add baselines and CI thresholds when you are ready to gate new drift. Markdown output is PR-ready for UX developers, UX designers, and design-system owners:
96
101
 
97
102
  ```md
98
103
  # Rhythmguard Design-System Audit
@@ -104,8 +109,30 @@ The report covers authored CSS declarations and Tailwind arbitrary spacing value
104
109
  | Files with issues | 12 |
105
110
  | Total findings | 52 |
106
111
  | Scale cleanliness | 91% |
112
+ | New findings | 3 |
107
113
  ```
108
114
 
115
+ ### Audit config and external token sources
116
+
117
+ For large codebases, put shared audit settings in `.rhythmguardrc.json`:
118
+
119
+ ```json
120
+ {
121
+ "audit": {
122
+ "ignore": ["legacy/**", "generated/**"],
123
+ "tokenSources": [
124
+ "./tokens.json",
125
+ { "path": "./src/theme.css", "format": "css" }
126
+ ],
127
+ "tokenKind": "spacing",
128
+ "tokenCandidateMinCount": 2,
129
+ "minCleanliness": 90
130
+ }
131
+ }
132
+ ```
133
+
134
+ `rhythmguard audit` loads `.rhythmguardrc.json` automatically when present. Use `--config <file>` for another config, `--no-config` to skip config discovery, and `--token-source <file>` for extra canonical token files. Token source paths in config files resolve from the config file directory; CLI token source paths resolve from the current working directory. Supported source formats are CSS custom properties and Tailwind v4 `@theme`, flat JSON maps, Style Dictionary JSON, and DTCG JSON.
135
+
109
136
  ## Installation
110
137
 
111
138
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stylelint-plugin-rhythmguard",
3
- "version": "1.6.1",
3
+ "version": "1.8.0",
4
4
  "description": "Token governance for CSS and Tailwind — enforce spacing scales, require design tokens, catch arbitrary values",
5
5
  "bin": {
6
6
  "rhythmguard": "src/cli/index.js"