diff --git a/crates/oxc_linter/src/rules/vitest/prefer_to_be_object.rs b/crates/oxc_linter/src/rules/vitest/prefer_to_be_object.rs index e7d0d4884fa6c..cfd966d51512e 100644 --- a/crates/oxc_linter/src/rules/vitest/prefer_to_be_object.rs +++ b/crates/oxc_linter/src/rules/vitest/prefer_to_be_object.rs @@ -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: