Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/lint-restyle-ceiling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)";

Expand Down
16 changes: 15 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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={<Button …/>}.
pattern: "^CollapsibleTrigger$",
allow: ["layout", "color", "typography", "spacing", "shape", "effects", "motion"],
},
],
},
],
},
},
{
Expand Down
Loading