@zedtech/zedkit-quality 0.4.0 → 0.5.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/README.md +2 -1
- package/package.json +1 -1
- package/src/eslint.mjs +11 -1
package/README.md
CHANGED
|
@@ -53,7 +53,8 @@ subagents, commands) see `@zedtech/zedkit-ai` instead.
|
|
|
53
53
|
## API
|
|
54
54
|
|
|
55
55
|
- `uiPreset({ entryPoint })` — flat-config blocks for `.tsx`/`.jsx`:
|
|
56
|
-
jsx-a11y recommended, Tailwind hygiene, tokens-only classes
|
|
56
|
+
jsx-a11y recommended, Tailwind hygiene, tokens-only classes (no
|
|
57
|
+
`w-[13px]` / `gap-[0.75rem]`; Radix `w-[var(--radix-*)]` stays), no `style`
|
|
57
58
|
attributes, no `forwardRef` (ref is a prop; see `packages/ui/src/button.tsx`),
|
|
58
59
|
no explicit `any`, files ≤ 300 lines and functions ≤ 60, no raw `try`/`catch`.
|
|
59
60
|
`entryPoint` (your Tailwind CSS entry) is required: it is the one thing
|
package/package.json
CHANGED
package/src/eslint.mjs
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
// - jsx-a11y recommended (labels, keyboard, focus, ARIA)
|
|
6
6
|
// - Tailwind class hygiene (order, no duplicates, no conflicts, no unknown)
|
|
7
7
|
// - Tokens only: no raw palette colors (bg-red-500), no arbitrary hex/rgb
|
|
8
|
-
// colors, no raw px font sizes
|
|
8
|
+
// colors, no raw px font sizes, no arbitrary px/rem in className
|
|
9
|
+
// (w-[13px], gap-[0.75rem]) — use the semantic theme tokens
|
|
9
10
|
// - No `style` attributes; no forwardRef (ref is a prop); no explicit `any`;
|
|
10
11
|
// files ≤ 300 lines, functions ≤ 60; no raw try/catch (use a tryCatch wrapper)
|
|
11
12
|
//
|
|
@@ -72,6 +73,15 @@ export function uiPreset({ entryPoint }) {
|
|
|
72
73
|
message:
|
|
73
74
|
"tokens-style: raw px font sizes are banned. Use the type scale (text-xs … text-2xl).",
|
|
74
75
|
},
|
|
76
|
+
// Radix CSS variables (w-[var(--radix-popover-trigger-width)])
|
|
77
|
+
// are not matched: they are not a px/rem literal. Overlays
|
|
78
|
+
// must follow the trigger size. Hardcoded colours are already
|
|
79
|
+
// tokens-color (palette + hex/rgb/hsl).
|
|
80
|
+
{
|
|
81
|
+
pattern: "\\[[0-9.]+(?:px|rem)\\]",
|
|
82
|
+
message:
|
|
83
|
+
"tokens-arbitrary: raw px/rem in className (w-[13px], gap-[0.75rem]) are banned — use the spacing scale (w-4, gap-3) or the type scale (text-sm).",
|
|
84
|
+
},
|
|
75
85
|
],
|
|
76
86
|
},
|
|
77
87
|
],
|