| author | |
| committer | |
| log | bbd5cc03231b8b831b44bdbd6e62bf736391cb1f |
| tree | 9df947a86350756bda7eca0ecbbf5ed53a1a5f50 |
| parent | ed856946c63e51861a8153d264856db0dbb677a4 |
| signature | Signed by PGP key B5690EEEBB952194 |
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>2 files changed, 16 insertions(+), 2 deletions(-)
scripts/lint-restyle-ceiling.ts+1-1| ... | ... | @@ -8,7 +8,7 @@ import * as NodeURL from "node:url"; |
| 8 | 8 | // components/ui exports are migrated to variants (see vite.config.ts). This gate keeps the |
| 9 | 9 | // count from growing: CI fails when findings exceed the ceiling. Lower the ceiling when you |
| 10 | 10 | // migrate a file, and delete this script when the rule becomes an error. |
| 11 | export const RESTYLE_CEILING = 1143; | |
| 11 | export const RESTYLE_CEILING = 1074; | |
| 12 | 12 | |
| 13 | 13 | const RULE = "shadcn(no-restyle)"; |
| 14 | 14 |
vite.config.ts+15-1| ... | ... | @@ -178,7 +178,21 @@ export default defineConfig({ |
| 178 | 178 | files: ["apps/web/src/**"], |
| 179 | 179 | excludeFiles: ["apps/web/src/components/ui/**"], |
| 180 | 180 | rules: { |
| 181 | "shadcn/no-restyle": ["warn", { allow: ["layout"] }], | |
| 181 | "shadcn/no-restyle": [ | |
| 182 | "warn", | |
| 183 | { | |
| 184 | allow: ["layout"], | |
| 185 | contracts: [ | |
| 186 | { | |
| 187 | // CollapsibleTrigger is a bare button with no styled counterpart | |
| 188 | // (a disclosure row is not a Button), so its className is the API. | |
| 189 | // Every other trigger has one: style them with render={<Button …/>}. | |
| 190 | pattern: "^CollapsibleTrigger$", | |
| 191 | allow: ["layout", "color", "typography", "spacing", "shape", "effects", "motion"], | |
| 192 | }, | |
| 193 | ], | |
| 194 | }, | |
| 195 | ], | |
| 182 | 196 | }, |
| 183 | 197 | }, |
| 184 | 198 | { |