authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-22 12:22:12-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-22 12:22:12-07:00
logbbd5cc03231b8b831b44bdbd6e62bf736391cb1f
tree9df947a86350756bda7eca0ecbbf5ed53a1a5f50
parented856946c63e51861a8153d264856db0dbb677a4
signature Signed by PGP key B5690EEEBB952194

chore(lint): exempt CollapsibleTrigger from no-restyle (#13024)

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,7 +8,7 @@ import * as NodeURL from "node:url";
8// components/ui exports are migrated to variants (see vite.config.ts). This gate keeps the8// 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 you9// 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.10// migrate a file, and delete this script when the rule becomes an error.
11export const RESTYLE_CEILING = 1143;11export const RESTYLE_CEILING = 1074;
1212
13const RULE = "shadcn(no-restyle)";13const RULE = "shadcn(no-restyle)";
1414
vite.config.ts+15-1
...@@ -178,7 +178,21 @@ export default defineConfig({...@@ -178,7 +178,21 @@ export default defineConfig({
178 files: ["apps/web/src/**"],178 files: ["apps/web/src/**"],
179 excludeFiles: ["apps/web/src/components/ui/**"],179 excludeFiles: ["apps/web/src/components/ui/**"],
180 rules: {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 {