Skip to content

Commit

Permalink
refactor: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Mar 16, 2023
1 parent 6e38452 commit d02ad37
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions tests/lib/rules/no-useless-return.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,21 +536,11 @@ ruleTester.run("no-useless-return", rule, {
{
code: "function foo() { return; return; }",
output: "function foo() { return; }",
errors: [
{
messageId: "unnecessaryReturn",
type: "ReturnStatement",
column: 18
}
]
errors: [{
messageId: "unnecessaryReturn",
type: "ReturnStatement",
column: 18
}]
}
].map(invalidCase =>
Object.assign(
{
errors: [
{ messageId: "unnecessaryReturn", type: "ReturnStatement" }
]
},
invalidCase
))
].map(invalidCase => Object.assign({ errors: [{ messageId: "unnecessaryReturn", type: "ReturnStatement" }] }, invalidCase))
});

0 comments on commit d02ad37

Please sign in to comment.