Skip to content
Prev Previous commit
Next Next commit
fix: ci error
  • Loading branch information
eryue0220 committed Jul 4, 2024
commit ecd474806eb58430fa54d4f0d08e267f9f834ed9
12 changes: 11 additions & 1 deletion crates/oxc_linter/src/rules/jest/prefer_hooks_in_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn reorder_hooks(x0: &str, x1: &str, x2: &str, span0: Span) -> OxcDiagnostic {
"{x0}(prefer-hooks-in-order): Prefer having hooks in a consistent order.",
))
.with_help(format!("`{x1:?}` hooks should be before any `{x2:?}` hooks"))
.with_labels([span0.into()])
.with_label(span0)
}

#[derive(Debug, Default, Clone)]
Expand Down Expand Up @@ -127,6 +127,16 @@ declare_oxc_lint!(
/// });
/// ```
///
///
/// This rule is compatible with [eslint-plugin-vitest](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer_hooks_in_order.md),
/// to use it, add the following configuration to your `.eslintrc.json`:
///
/// ```json
/// {
/// "rules": {
/// "vitest/prefer_hooks_in_order": "error"
/// }
/// }
PreferHooksInOrder,
style,
);
Expand Down