chore(lint): exempt CollapsibleTrigger from no-restyle (#13024)
Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
ed856946c6
commit
bbd5cc0323
2 files changed
+16
-2
No files matched your search
@@ -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 = 1143;
|
||||
export const RESTYLE_CEILING = 1074;
|
||||
|
||||
const RULE = "shadcn(no-restyle)";
|
||||
|
||||
|
||||
+15
-1
@@ -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"],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user