Skip to content

Commit 65e29d5

Browse files
committed
test(no-unlocalized-strings): add complex ternary in styling property
1 parent be08b8f commit 65e29d5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/rules/no-unlocalized-strings.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ ruleTester.run("no-unlocalized-strings", noUnlocalizedStrings, {
102102
{ code: '<div className={classnames("a", "b", "c")} />', filename: "test.tsx" },
103103
{ code: '<div className={twMerge("px-4", "px-8")} />', filename: "test.tsx" },
104104
{ code: '<div className={condition ? "class-a" : "class-b"} />', filename: "test.tsx" },
105+
// Complex ternary in styling property
106+
{
107+
code: `<DatePicker
108+
buttonClassName={
109+
errors.date
110+
? "border-red-500 focus-visible:ring-red-500 w-full"
111+
: "w-full dark:bg-slate-800"
112+
}
113+
/>`,
114+
filename: "test.tsx"
115+
},
105116
{
106117
code: '<div className={cn("base", variant === "primary" ? "bg-blue-500" : "bg-gray-500")} />',
107118
filename: "test.tsx"

0 commit comments

Comments
 (0)