diff --git a/scripts/lint-restyle-ceiling.ts b/scripts/lint-restyle-ceiling.ts index 9a6737a5baee..c6642f50bf95 100644 --- a/scripts/lint-restyle-ceiling.ts +++ b/scripts/lint-restyle-ceiling.ts @@ -8,7 +8,7 @@ import * as NodeURL from "node:url"; // components/ui exports are migrated to variants (see vite.config.ts). This gate keeps the // count from growing: CI fails when findings exceed the ceiling. Lower the ceiling when you // migrate a file, and delete this script when the rule becomes an error. -export const RESTYLE_CEILING = 911; +export const RESTYLE_CEILING = 842; const RULE = "shadcn(no-restyle)"; diff --git a/vite.config.ts b/vite.config.ts index 038116709942..6119c6f38bc9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -178,7 +178,21 @@ export default defineConfig({ files: ["apps/web/src/**"], excludeFiles: ["apps/web/src/components/ui/**"], rules: { - "shadcn/no-restyle": ["warn", { allow: ["layout"] }], + "shadcn/no-restyle": [ + "warn", + { + allow: ["layout"], + contracts: [ + { + // CollapsibleTrigger is a bare button with no styled counterpart + // (a disclosure row is not a Button), so its className is the API. + // Every other trigger has one: style them with render={