Skip to content

Commit 6aa8acb

Browse files
committed
Revert "test cases for arrow function"
This reverts commit 9586a77.
1 parent a196ccc commit 6aa8acb

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

test/rules/prefer-show.test.ts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -45,51 +45,5 @@ export const cases = run("prefer-show", rule, {
4545
);
4646
}`,
4747
},
48-
{
49-
code: `
50-
function Component(props) {
51-
return (
52-
<For each={props.someList}>
53-
{(listItem) => listItem.cond && <span>Content</span>}
54-
</For>
55-
);
56-
}`,
57-
errors: [{ messageId: "preferShowAnd" }],
58-
output: `
59-
function Component(props: any) {
60-
return (
61-
<For each={props.someList}>
62-
{(listItem) => <Show when={listItem.cond}><span>Content</span></Show>}
63-
</For>
64-
);
65-
}`,
66-
},
67-
{
68-
code: `
69-
function Component(props) {
70-
return (
71-
<For each={props.someList}>
72-
{(listItem) => (listItem.cond ? (
73-
<span>Content</span>
74-
) : (
75-
<span>Fallback</span>
76-
))}
77-
</For>
78-
);
79-
}`,
80-
errors: [{ messageId: "preferShowTernary" }],
81-
output: `
82-
function Component(props) {
83-
return (
84-
<For each={props.someList}>
85-
{(listItem) => (
86-
<Show when={listItem.cond} fallback={<span>Fallback</span>}>
87-
<span>Content</span>
88-
</Show>
89-
)}
90-
</For>
91-
);
92-
}`,
93-
},
9448
],
9549
});

0 commit comments

Comments
 (0)