Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
feat: update
  • Loading branch information
eryue0220 committed Jul 12, 2024
commit a0c190d78fe4eccc05731de4162050bb9de2dc11
4 changes: 2 additions & 2 deletions crates/oxc_linter/src/rules/jest/valid_describe_callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ use crate::{
rule::Rule,
utils::{
collect_possible_jest_call_node, get_test_plugin_name, parse_general_jest_fn_call,
JestFnKind, JestGeneralFnKind, PossibleJestNode,
JestFnKind, JestGeneralFnKind, PossibleJestNode, TestPluginName,
},
};

fn valid_describe_callback_diagnostic(x0: &str, x1: &str, x2: &str, span3: Span) -> OxcDiagnostic {
fn valid_describe_callback_diagnostic(x0: TestPluginName, x1: &str, x2: &str, span3: Span) -> OxcDiagnostic {
OxcDiagnostic::warn(format!("{x0}(valid-describe-callback): {x1:?}"))
.with_help(format!("{x2:?}"))
.with_label(span3)
Expand Down
5 changes: 3 additions & 2 deletions crates/oxc_linter/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ pub use self::{
/// Many Vitest rule are essentially ports of Jest plugin rules with minor modifications.
/// For these rules, we use the corresponding jest rules with some adjustments for compatibility.
pub fn is_jest_rule_adapted_to_vitest(rule_name: &str) -> bool {
let jest_rules: [&str; 4] = [
"consistent_test_it",
let jest_rules: &[&str] = &[
"consistent-test-it",
"no-disabled-tests",
"no-focused-tests",
"prefer-hooks-in-order",
"valid-describe-callback",
];
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.