Skip to content

Commit b6d61bc

Browse files
committed
chore: fix inline returns to follow the styleguide
1 parent 2ec8d70 commit b6d61bc

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

contributingGuides/review/RULES.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,18 @@ Bad:
4747
- **Reasoning**: Expensive operations can be any long-running synchronous tasks (like complex calculations) and should be avoided when simple property checks can eliminate items early. This reduces unnecessary computation and improves iteration performance, especially on large datasets.
4848

4949
Good:
50-
```tsx
50+
```ts
5151
const areAllTransactionsValid = transactions.every((transaction) => {
52-
if (!transaction.rawData || transaction.amount <= 0) return false;
52+
if (!transaction.rawData || transaction.amount <= 0) {
53+
return false;
54+
}
5355
const validation = validateTransaction(transaction);
5456
return validation.isValid;
5557
});
5658
```
5759

5860
Bad:
59-
```tsx
61+
```ts
6062
const areAllTransactionsValid = transactions.every((transaction) => {
6163
const validation = validateTransaction(transaction);
6264
return validation.isValid;

0 commit comments

Comments
 (0)