Skip to content

Commit

Permalink
fix(no-if): use correct syntax for placeholder substitution in message
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed May 17, 2020
1 parent f249ee7 commit 6d1eda8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
16 changes: 0 additions & 16 deletions src/rules/__tests__/no-if.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,22 +552,6 @@ ruleTester.run('if statements', rule, {
},
],
invalid: [
{
code: `
it('foo', () => {
switch (true) {
case true: {
}
}
})
`,
errors: [
{
data: { condition: 'if' },
messageId: 'noConditionalExpect',
},
],
},
{
code: `it('foo', () => {
if('bar') {}
Expand Down
3 changes: 2 additions & 1 deletion src/rules/no-if.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export default createRule({
recommended: false,
},
messages: {
noConditionalExpect: 'Test should not contain { condition } statements.',
noConditionalExpect:
'Test should not contain {{ condition }} statements.',
},
schema: [],
type: 'suggestion',
Expand Down

0 comments on commit 6d1eda8

Please sign in to comment.