Skip to content

Commit 6d1eda8

Browse files
committed
fix(no-if): use correct syntax for placeholder substitution in message
1 parent f249ee7 commit 6d1eda8

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

src/rules/__tests__/no-if.test.ts

-16
Original file line numberDiff line numberDiff line change
@@ -552,22 +552,6 @@ ruleTester.run('if statements', rule, {
552552
},
553553
],
554554
invalid: [
555-
{
556-
code: `
557-
it('foo', () => {
558-
switch (true) {
559-
case true: {
560-
}
561-
}
562-
})
563-
`,
564-
errors: [
565-
{
566-
data: { condition: 'if' },
567-
messageId: 'noConditionalExpect',
568-
},
569-
],
570-
},
571555
{
572556
code: `it('foo', () => {
573557
if('bar') {}

src/rules/no-if.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ export default createRule({
4343
recommended: false,
4444
},
4545
messages: {
46-
noConditionalExpect: 'Test should not contain { condition } statements.',
46+
noConditionalExpect:
47+
'Test should not contain {{ condition }} statements.',
4748
},
4849
schema: [],
4950
type: 'suggestion',

0 commit comments

Comments
 (0)