The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 23:00 UTC
chore(lint): exempt CollapsibleTrigger from no-restyle (#13024)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Julius Marminge committed
Sep 22, 2026 at 12:22 UTC
bbd5cc03231b8b831b44bdbd6e62bf736391cb1f
2 files changed
+16
-2
scripts/lint-restyle-ceiling.ts
+1
-1
@@ -8,7 +8,7 @@ import * as NodeURL from "node:url";
8
// components/ui exports are migrated to variants (see vite.config.ts). This gate keeps the
9
// count from growing: CI fails when findings exceed the ceiling. Lower the ceiling when you
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
13
const RULE = "shadcn(no-restyle)";
14
vite.config.ts
+15
-1
@@ -178,7 +178,21 @@ export default defineConfig({
178
files: ["apps/web/src/**"],
179
excludeFiles: ["apps/web/src/components/ui/**"],
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
+ ],
196
},
197
},
198
{