Skip to content

Commit 6d0f038

Browse files
authored
refactor: don't return the result of void functions (#1895)
1 parent a8f5f33 commit 6d0f038

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/rules/utils/padding.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,13 +268,15 @@ const testPadding = (
268268
nodeMatchesType(prevNode, prevType, paddingContext) &&
269269
nodeMatchesType(nextNode, nextType, paddingContext)
270270
) {
271-
return testType(paddingType);
271+
testType(paddingType);
272+
273+
return;
272274
}
273275
}
274276

275277
// There were no matching padding rules for the prevNode, nextNode,
276278
// paddingType combination... so we'll use PaddingType.Any which is always ok
277-
return testType(PaddingType.Any);
279+
testType(PaddingType.Any);
278280
};
279281

280282
/**

src/rules/valid-describe-callback.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ export default createRule({
4646
}
4747

4848
if (node.arguments.length < 1) {
49-
return context.report({
49+
context.report({
5050
messageId: 'nameAndCallback',
5151
loc: node.loc,
5252
});
53+
54+
return;
5355
}
5456

5557
const [, callback] = node.arguments;

0 commit comments

Comments
 (0)