Skip to content

Commit

Permalink
chore: add why is this bad
Browse files Browse the repository at this point in the history
  • Loading branch information
shulaoda committed Aug 31, 2024
1 parent 7b8094b commit 41382fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/oxc_linter/src/rules/vitest/prefer_to_be_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ declare_oxc_lint!(
///
/// This rule enforce using `toBeObject()` when expect typeof `Object`.
///
/// ### Why is this bad?
///
/// Using other methods such as `toBeInstanceOf(Object)` or `instanceof Object` can be less clear and potentially misleading. Enforcing the use of `toBeObject()` provides more explicit and readable code, making your intentions clear and improving the overall maintainability and readability of your tests.
///
/// ### Examples
///
/// Examples of **incorrect** code for this rule:
Expand Down

0 comments on commit 41382fd

Please sign in to comment.