Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ npm run format # Auto-fix formatting issues

- **Never use `any` or `unknown` as an escape hatch.** Define proper interfaces/types or use type guards.
- Use strict null checks and handle `undefined`/`null` explicitly.
- **Prefer falsy checks over explicit boolean comparisons:** Use `!something` instead of `something === false` unless you explicitly need to distinguish between `false` and other falsy values like `undefined` or `null`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To make this guideline more comprehensive, consider expanding it to also discourage === true and promote general truthy/falsy checks. This would provide a more complete rule for boolean comparisons.

Suggested change
- **Prefer falsy checks over explicit boolean comparisons:** Use `!something` instead of `something === false` unless you explicitly need to distinguish between `false` and other falsy values like `undefined` or `null`.
- **Prefer truthy/falsy checks over explicit boolean comparisons:** Use `if (something)` and `if (!something)` instead of `if (something === true)` and `if (something === false)`. An explicit comparison to `false` is only necessary when you need to distinguish it from other falsy values (like `null` or `undefined`).


### Testing

Expand Down
Loading