rhythmguard 3.8.0 → 3.14.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.
Files changed (2) hide show
  1. package/README.md +40 -9
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,23 +1,54 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/petrilahdelma/stylelint-plugin-rhythmguard/main/assets/rhythmguard-banner.png?v=14" width="100%" alt="Rhythmguard: stable local evidence for design system drift" />
3
+ </p>
4
+
1
5
  # rhythmguard
2
6
 
7
+ Nobody chose 13px. `rhythmguard` measures off-scale spacing in your CSS, SCSS and Tailwind class strings against the scale your project already defines, and tells you the nearest steps.
8
+
9
+ [![npm version](https://img.shields.io/npm/v/rhythmguard?label=npm&color=1f6feb)](https://www.npmjs.com/package/rhythmguard)
10
+ [![npm downloads](https://img.shields.io/npm/dm/rhythmguard.svg)](https://www.npmjs.com/package/rhythmguard)
11
+ [![License: MIT](https://img.shields.io/badge/license-MIT-white.svg)](https://github.com/PetriLahdelma/stylelint-plugin-rhythmguard/blob/main/LICENSE)
12
+
13
+ ## Start here
14
+
3
15
  ```bash
4
16
  npx rhythmguard
5
17
  ```
6
18
 
7
- No install, no config. It detects your stack and token files, infers your spacing scale from your own tokens, audits the current directory, and prints the exact `.stylelintrc.json` to paste. Then:
19
+ No install, no config. It detects your stack and token files, infers your spacing scale from your own tokens, audits the current directory, and prints the exact `.stylelintrc.json` (and ESLint snippet for Tailwind) to paste. This is the whole run on Bootstrap's `v6-dev` branch, unedited:
20
+
21
+ <p align="center">
22
+ <img src="https://raw.githubusercontent.com/petrilahdelma/stylelint-plugin-rhythmguard/main/assets/quickstart.gif?v=1" width="100%" alt="Terminal recording: npx stylelint-plugin-rhythmguard, the same command, on Bootstrap v6-dev detects the stack, infers the 13-step spacing scale from scss/_config.scss, reports 20 off-scale values in CSS and prints a .stylelintrc.json to paste" />
23
+ </p>
24
+
25
+ ## Commands
8
26
 
9
27
  ```bash
10
- npx rhythmguard audit ./src --format markdown
11
- npx rhythmguard audit ./src --write-baseline
12
- npx rhythmguard audit ./src --since-baseline --fail-on-new-drift
13
- npx rhythmguard init
14
- npx rhythmguard doctor
28
+ npx rhythmguard audit ./src --format markdown # a report to share in a pull request
29
+ npx rhythmguard audit ./src --write-baseline # record today's drift
30
+ npx rhythmguard audit ./src --since-baseline --fail-on-new-drift # in CI: fail only on new drift
31
+ npx rhythmguard audit ./src --format github # inline annotations in GitHub Actions
32
+ npx rhythmguard audit ./src --plan # propose a decision for every off-scale value
33
+ npx rhythmguard fix ./src --value 10px --to "var(--space-sm)" # one decision as one reviewable change
34
+ npx rhythmguard init # starter config for your stack
35
+ npx rhythmguard doctor # check the setup
15
36
  ```
16
37
 
17
- This package is the command name only. It depends on [stylelint-plugin-rhythmguard](https://www.npmjs.com/package/stylelint-plugin-rhythmguard) and runs its CLI; the Stylelint rules, the ESLint companion and the audit all live there. Once the plugin is a dev dependency, `npx rhythmguard` resolves to the same command without this package.
38
+ Reports come as text, Markdown, JSON, HTML, GitHub annotations or a README badge. Full reference: [docs/AUDIT.md](https://github.com/PetriLahdelma/stylelint-plugin-rhythmguard/blob/main/docs/AUDIT.md). In GitHub Actions, [`PetriLahdelma/rhythmguard-action`](https://github.com/PetriLahdelma/rhythmguard-action) runs the audit, comments on the pull request and fails on new drift in one step.
39
+
40
+ ## Where the scale comes from
41
+
42
+ Your own tokens, in this order: token files you name, spacing custom properties and Tailwind v4 `@theme` in your stylesheets, Sass variables and maps, and installed design-token packages (Bootstrap, Carbon, Primer, PatternFly, Radix, Mantine and others). The report says which source it used. When nothing is found it falls back to a 4px scale and says so.
43
+
44
+ ## What this package is
45
+
46
+ The command name. It depends on [stylelint-plugin-rhythmguard](https://www.npmjs.com/package/stylelint-plugin-rhythmguard) and runs its CLI; the Stylelint rules, the audit and the ESLint companion ([eslint-plugin-rhythmguard](https://www.npmjs.com/package/eslint-plugin-rhythmguard)) live there. Once the plugin is a dev dependency of your project, `npx rhythmguard` resolves to the same command without this package.
47
+
48
+ ## Compatibility
18
49
 
19
- Full reference: [docs/AUDIT.md](https://github.com/PetriLahdelma/stylelint-plugin-rhythmguard/blob/main/docs/AUDIT.md).
50
+ Node 20.19 or newer. Reads CSS, SCSS (with `postcss-scss` installed) and class strings in JS, TS, JSX, TSX, Vue, Svelte and Astro files. Makes no network requests.
20
51
 
21
52
  ## License
22
53
 
23
- MIT.
54
+ MIT. Issues and contributions: [github.com/PetriLahdelma/stylelint-plugin-rhythmguard](https://github.com/PetriLahdelma/stylelint-plugin-rhythmguard).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rhythmguard",
3
- "version": "3.8.0",
3
+ "version": "3.14.0",
4
4
  "description": "The rhythmguard command: zero-config spacing-scale audit for CSS, SCSS and Tailwind. `npx rhythmguard` runs the CLI of stylelint-plugin-rhythmguard.",
5
5
  "license": "MIT",
6
6
  "author": "Petri Lahdelma",
@@ -25,7 +25,7 @@
25
25
  "cli"
26
26
  ],
27
27
  "dependencies": {
28
- "stylelint-plugin-rhythmguard": "^3.8.0"
28
+ "stylelint-plugin-rhythmguard": "^3.14.0"
29
29
  },
30
30
  "engines": {
31
31
  "node": ">=20.19.0"