Skip to content

Commit

Permalink
feat(linter): add eslint-plugin-jest/no-conditional-expect rule (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
mysteryven committed Sep 2, 2023
1 parent 6ae6532 commit fa1d7da
Show file tree
Hide file tree
Showing 5 changed files with 1,247 additions and 23 deletions.
2 changes: 2 additions & 0 deletions crates/oxc_linter/src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ mod jest {
pub mod expect_expect;
pub mod no_alias_methods;
pub mod no_commented_out_tests;
pub mod no_conditional_expect;
pub mod no_disabled_tests;
pub mod no_focused_tests;
pub mod no_test_prefixes;
Expand Down Expand Up @@ -188,5 +189,6 @@ oxc_macros::declare_all_lint_rules! {
jest::no_commented_out_tests,
jest::expect_expect,
jest::no_alias_methods,
jest::no_conditional_expect,
unicorn::no_instanceof_array,
}
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/rules/jest/no_commented_out_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use regex::Regex;
use crate::{context::LintContext, rule::Rule};

#[derive(Debug, Error, Diagnostic)]
#[error("Some tests seem to be commented")]
#[error("eslint(jest/no-commented-out-tests): Some tests seem to be commented")]
#[diagnostic(severity(warning), help("Remove or uncomment this comment"))]
struct NoCommentedOutTestsDiagnostic(#[label] pub Span);

Expand Down
Loading

0 comments on commit fa1d7da

Please sign in to comment.