diff --git a/apps/oxlint/src/snapshots/fixtures__issue_10394_-c .oxlintrc.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__issue_10394_-c .oxlintrc.json@oxlint.snap index 0d59c92f05309..c2cbd4fbcc365 100644 --- a/apps/oxlint/src/snapshots/fixtures__issue_10394_-c .oxlintrc.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__issue_10394_-c .oxlintrc.json@oxlint.snap @@ -6,13 +6,13 @@ arguments: -c .oxlintrc.json working directory: fixtures/issue_10394 ---------- - ! ]8;;https://oxc.rs/docs/guide/usage/linter/rules/jest/valid-title.html\eslint-plugin-jest(valid-title)]8;;\: "Should not have an empty title" + ! ]8;;https://oxc.rs/docs/guide/usage/linter/rules/jest/valid-title.html\eslint-plugin-jest(valid-title)]8;;\: Should not have an empty title ,-[foo.test.ts:1:10] 1 | describe("", () => { : ^^ 2 | // `---- - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test Found 1 warning and 0 errors. Finished in ms on 1 file with 90 rules using 1 threads. diff --git a/apps/oxlint/src/snapshots/fixtures__overrides_with_plugin_-c .oxlintrc.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__overrides_with_plugin_-c .oxlintrc.json@oxlint.snap index 9081d0e8d7caf..572366f604562 100644 --- a/apps/oxlint/src/snapshots/fixtures__overrides_with_plugin_-c .oxlintrc.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__overrides_with_plugin_-c .oxlintrc.json@oxlint.snap @@ -6,13 +6,13 @@ arguments: -c .oxlintrc.json working directory: fixtures/overrides_with_plugin ---------- - x ]8;;https://oxc.rs/docs/guide/usage/linter/rules/jest/valid-title.html\eslint-plugin-jest(valid-title)]8;;\: "Should not have an empty title" + x ]8;;https://oxc.rs/docs/guide/usage/linter/rules/jest/valid-title.html\eslint-plugin-jest(valid-title)]8;;\: Should not have an empty title ,-[index.test.ts:1:10] 1 | describe("", () => { : ^^ 2 | // ^ jest/no-valid-title error as explicitly set in the `.test.ts` override `---- - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test ! ]8;;https://oxc.rs/docs/guide/usage/linter/rules/jest/expect-expect.html\eslint-plugin-jest(expect-expect)]8;;\: Test has no assertions ,-[index.test.ts:4:3] @@ -23,14 +23,14 @@ working directory: fixtures/overrides_with_plugin `---- help: Add assertion(s) in this Test - x ]8;;https://oxc.rs/docs/guide/usage/linter/rules/jest/valid-title.html\eslint-plugin-jest(valid-title)]8;;\: "Should not have an empty title" + x ]8;;https://oxc.rs/docs/guide/usage/linter/rules/jest/valid-title.html\eslint-plugin-jest(valid-title)]8;;\: Should not have an empty title ,-[index.test.ts:4:6] 3 | 4 | it("", () => {}); : ^^ 5 | // ^ jest/no-valid-title error as explicitly set in the `.test.ts` override `---- - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test ! ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Variable 'foo' is declared but never used. Unused variables should start with a '_'. ,-[index.ts:1:7] diff --git a/crates/oxc_linter/src/rules/jest/valid_title.rs b/crates/oxc_linter/src/rules/jest/valid_title.rs index 986f4e3bdde16..8bca51aa0333b 100644 --- a/crates/oxc_linter/src/rules/jest/valid_title.rs +++ b/crates/oxc_linter/src/rules/jest/valid_title.rs @@ -17,9 +17,45 @@ use crate::{ utils::{JestFnKind, JestGeneralFnKind, PossibleJestNode, parse_general_jest_fn_call}, }; -fn valid_title_diagnostic(error_message: &str, help_text: &str, span: Span) -> OxcDiagnostic { - OxcDiagnostic::warn(format!("{error_message:?}")) - .with_help(format!("{help_text:?}")) +fn title_must_be_string_diagnostic(span: Span) -> OxcDiagnostic { + OxcDiagnostic::warn("Title must be a string") + .with_help("Replace your title with a string") + .with_label(span) +} + +fn empty_title_diagnostic(span: Span) -> OxcDiagnostic { + OxcDiagnostic::warn("Should not have an empty title") + .with_help("Write a meaningful title for your test") + .with_label(span) +} + +fn duplicate_prefix_diagnostic(span: Span) -> OxcDiagnostic { + OxcDiagnostic::warn("Should not have duplicate prefix") + .with_help("The function name already has the prefix, try to remove the duplicate prefix") + .with_label(span) +} + +fn accidental_space_diagnostic(span: Span) -> OxcDiagnostic { + OxcDiagnostic::warn("Should not have leading or trailing spaces") + .with_help("Remove the leading or trailing spaces") + .with_label(span) +} + +fn disallowed_word_diagnostic(word: &str, span: Span) -> OxcDiagnostic { + OxcDiagnostic::warn(format!("{word} is not allowed in test title")) + .with_help("It is included in the `disallowedWords` of your config file, try to remove it from your title") + .with_label(span) +} + +fn must_match_diagnostic(message: &str, span: Span) -> OxcDiagnostic { + OxcDiagnostic::warn(message.to_string()) + .with_help("Make sure the title matches the `mustMatch` of your config file") + .with_label(span) +} + +fn must_not_match_diagnostic(message: &str, span: Span) -> OxcDiagnostic { + OxcDiagnostic::warn(message.to_string()) + .with_help("Make sure the title does not match the `mustNotMatch` of your config file") .with_label(span) } @@ -226,12 +262,12 @@ impl ValidTitle { return; } if need_report_name { - Message::TitleMustBeString.diagnostic(ctx, arg.span()); + ctx.diagnostic(title_must_be_string_diagnostic(arg.span())); } } _ => { if need_report_name { - Message::TitleMustBeString.diagnostic(ctx, arg.span()); + ctx.diagnostic(title_must_be_string_diagnostic(arg.span())); } } } @@ -360,7 +396,7 @@ fn validate_title( ctx: &LintContext, ) { if title.is_empty() { - Message::EmptyTitle.diagnostic(ctx, span); + ctx.diagnostic(empty_title_diagnostic(span)); return; } @@ -373,20 +409,14 @@ fn validate_title( }; if let Some(matched) = disallowed_words_reg.find(title) { - let error = format!("{} is not allowed in test title", matched.as_str()); - ctx.diagnostic(valid_title_diagnostic( - &error, - "It is included in the `disallowedWords` of your config file, try to remove it from your title", - span, - )); + ctx.diagnostic(disallowed_word_diagnostic(matched.as_str(), span)); } return; } let trimmed_title = title.trim(); if !valid_title.ignore_space && trimmed_title != title { - let (error, help) = Message::AccidentalSpace.detail(); - ctx.diagnostic_with_fix(valid_title_diagnostic(error, help, span), |fixer| { + ctx.diagnostic_with_fix(accidental_space_diagnostic(span), |fixer| { let inner_span = span.shrink(1); let raw_text = fixer.source_range(inner_span); let trimmed_raw = raw_text.trim().to_string(); @@ -400,8 +430,7 @@ fn validate_title( }; if first_word == un_prefixed_name { - let (error, help) = Message::DuplicatePrefix.detail(); - ctx.diagnostic_with_fix(valid_title_diagnostic(error, help, span), |fixer| { + ctx.diagnostic_with_fix(duplicate_prefix_diagnostic(span), |fixer| { // Use raw source text to preserve escape sequences let inner_span = span.shrink(1); let raw_text = fixer.source_range(inner_span); @@ -426,11 +455,7 @@ fn validate_title( Some(message) => message.as_str(), None => &format!("{un_prefixed_name} should match {raw_pattern}"), }; - ctx.diagnostic(valid_title_diagnostic( - message, - "Make sure the title matches the `mustMatch` of your config file", - span, - )); + ctx.diagnostic(must_match_diagnostic(message, span)); } if let Some((regex, message)) = valid_title.must_not_match_patterns.get(&jest_fn_name) @@ -442,11 +467,7 @@ fn validate_title( None => &format!("{un_prefixed_name} should not match {raw_pattern}"), }; - ctx.diagnostic(valid_title_diagnostic( - message, - "Make sure the title not matches the `mustNotMatch` of your config file", - span, - )); + ctx.diagnostic(must_not_match_diagnostic(message, span)); } } @@ -461,39 +482,6 @@ fn does_binary_expression_contain_string_node(expr: &BinaryExpression) -> bool { } } -enum Message { - TitleMustBeString, - EmptyTitle, - DuplicatePrefix, - AccidentalSpace, -} - -impl Message { - fn detail(&self) -> (&'static str, &'static str) { - match self { - Self::TitleMustBeString => { - ("Title must be a string", "Replace your title with a string") - } - Self::EmptyTitle => { - ("Should not have an empty title", "Write a meaningful title for your test") - } - Self::DuplicatePrefix => ( - "Should not have duplicate prefix", - "The function name has already contains the prefix, try remove the duplicate prefix", - ), - Self::AccidentalSpace => ( - "Should not have leading or trailing spaces", - "Remove the leading or trailing spaces", - ), - } - } - - fn diagnostic(&self, ctx: &LintContext, span: Span) { - let (error, help) = self.detail(); - ctx.diagnostic(valid_title_diagnostic(error, help, span)); - } -} - #[test] fn test() { use crate::tester::Tester; diff --git a/crates/oxc_linter/src/snapshots/jest_valid_title.snap b/crates/oxc_linter/src/snapshots/jest_valid_title.snap index e752f233f61ff..8320deb160fee 100644 --- a/crates/oxc_linter/src/snapshots/jest_valid_title.snap +++ b/crates/oxc_linter/src/snapshots/jest_valid_title.snap @@ -1,583 +1,583 @@ --- source: crates/oxc_linter/src/tester.rs --- - ⚠ eslint-plugin-jest(valid-title): "correct is not allowed in test title" + ⚠ eslint-plugin-jest(valid-title): correct is not allowed in test title ╭─[valid_title.tsx:1:6] 1 │ test('the correct way to properly handle all things', () => {}); · ─────────────────────────────────────────────── ╰──── - help: "It is included in the `disallowedWords` of your config file, try to remove it from your title" + help: It is included in the `disallowedWords` of your config file, try to remove it from your title - ⚠ eslint-plugin-jest(valid-title): "correct is not allowed in test title" + ⚠ eslint-plugin-jest(valid-title): correct is not allowed in test title ╭─[valid_title.tsx:1:10] 1 │ describe('the correct way to do things', function () {}) · ────────────────────────────── ╰──── - help: "It is included in the `disallowedWords` of your config file, try to remove it from your title" + help: It is included in the `disallowedWords` of your config file, try to remove it from your title - ⚠ eslint-plugin-jest(valid-title): "ALL is not allowed in test title" + ⚠ eslint-plugin-jest(valid-title): ALL is not allowed in test title ╭─[valid_title.tsx:1:4] 1 │ it('has ALL the things', () => {}) · ──────────────────── ╰──── - help: "It is included in the `disallowedWords` of your config file, try to remove it from your title" + help: It is included in the `disallowedWords` of your config file, try to remove it from your title - ⚠ eslint-plugin-jest(valid-title): "every is not allowed in test title" + ⚠ eslint-plugin-jest(valid-title): every is not allowed in test title ╭─[valid_title.tsx:1:11] 1 │ xdescribe('every single one of them', function () {}) · ────────────────────────── ╰──── - help: "It is included in the `disallowedWords` of your config file, try to remove it from your title" + help: It is included in the `disallowedWords` of your config file, try to remove it from your title - ⚠ eslint-plugin-jest(valid-title): "Descriptive is not allowed in test title" + ⚠ eslint-plugin-jest(valid-title): Descriptive is not allowed in test title ╭─[valid_title.tsx:1:10] 1 │ describe('Very Descriptive Title Goes Here', function () {}) · ────────────────────────────────── ╰──── - help: "It is included in the `disallowedWords` of your config file, try to remove it from your title" + help: It is included in the `disallowedWords` of your config file, try to remove it from your title - ⚠ eslint-plugin-jest(valid-title): "properly is not allowed in test title" + ⚠ eslint-plugin-jest(valid-title): properly is not allowed in test title ╭─[valid_title.tsx:1:6] 1 │ test(`that the value is set properly`, function () {}) · ──────────────────────────────── ╰──── - help: "It is included in the `disallowedWords` of your config file, try to remove it from your title" + help: It is included in the `disallowedWords` of your config file, try to remove it from your title - ⚠ eslint-plugin-jest(valid-title): "test should match (?u)#(?:unit|integration|e2e)" + ⚠ eslint-plugin-jest(valid-title): test should match (?u)#(?:unit|integration|e2e) ╭─[valid_title.tsx:1:6] 1 │ test('the correct way to properly handle all things', () => {}); · ─────────────────────────────────────────────── ╰──── - help: "Make sure the title matches the `mustMatch` of your config file" + help: Make sure the title matches the `mustMatch` of your config file - ⚠ eslint-plugin-jest(valid-title): "describe should match (?u)#(?:unit|integration|e2e)" + ⚠ eslint-plugin-jest(valid-title): describe should match (?u)#(?:unit|integration|e2e) ╭─[valid_title.tsx:1:10] 1 │ describe('the test', () => {}); · ────────── ╰──── - help: "Make sure the title matches the `mustMatch` of your config file" + help: Make sure the title matches the `mustMatch` of your config file - ⚠ eslint-plugin-jest(valid-title): "describe should match (?u)#(?:unit|integration|e2e)" + ⚠ eslint-plugin-jest(valid-title): describe should match (?u)#(?:unit|integration|e2e) ╭─[valid_title.tsx:1:11] 1 │ xdescribe('the test', () => {}); · ────────── ╰──── - help: "Make sure the title matches the `mustMatch` of your config file" + help: Make sure the title matches the `mustMatch` of your config file - ⚠ eslint-plugin-jest(valid-title): "describe should match (?u)#(?:unit|integration|e2e)" + ⚠ eslint-plugin-jest(valid-title): describe should match (?u)#(?:unit|integration|e2e) ╭─[valid_title.tsx:1:15] 1 │ describe.skip('the test', () => {}); · ────────── ╰──── - help: "Make sure the title matches the `mustMatch` of your config file" + help: Make sure the title matches the `mustMatch` of your config file - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:13] 1 │ it.each([])(1, () => {}); · ─ ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:18] 1 │ it.skip.each([])(1, () => {}); · ─ ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:16] 1 │ it.skip.each``(1, () => {}); · ─ ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:4] 1 │ it(123, () => {}); · ─── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:15] 1 │ it.concurrent(123, () => {}); · ─── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:4] 1 │ it(1 + 2 + 3, () => {}); · ───────── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:15] 1 │ it.concurrent(1 + 2 + 3, () => {}); · ───────── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:11] 1 │ test.skip(123, () => {}); · ─── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:10] 1 │ describe(String(/.+/), () => {}); · ──────────── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:10] 1 │ describe(myFunction, () => 1); · ────────── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:10] 1 │ describe(myFunction, () => {}); · ────────── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:11] 1 │ xdescribe(myFunction, () => {}); · ────────── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:10] 1 │ describe(6, function () {}) · ─ ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:15] 1 │ describe.skip(123, () => {}); · ─── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Should not have an empty title" + ⚠ eslint-plugin-jest(valid-title): Should not have an empty title ╭─[valid_title.tsx:1:10] 1 │ describe('', function () {}) · ── ╰──── - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test - ⚠ eslint-plugin-jest(valid-title): "Should not have an empty title" + ⚠ eslint-plugin-jest(valid-title): Should not have an empty title ╭─[valid_title.tsx:3:24] 2 │ describe('foo', () => { 3 │ it('', () => {}); · ── 4 │ }); ╰──── - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test - ⚠ eslint-plugin-jest(valid-title): "Should not have an empty title" + ⚠ eslint-plugin-jest(valid-title): Should not have an empty title ╭─[valid_title.tsx:1:4] 1 │ it('', function () {}) · ── ╰──── - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test - ⚠ eslint-plugin-jest(valid-title): "Should not have an empty title" + ⚠ eslint-plugin-jest(valid-title): Should not have an empty title ╭─[valid_title.tsx:1:15] 1 │ it.concurrent('', function () {}) · ── ╰──── - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test - ⚠ eslint-plugin-jest(valid-title): "Should not have an empty title" + ⚠ eslint-plugin-jest(valid-title): Should not have an empty title ╭─[valid_title.tsx:1:6] 1 │ test('', function () {}) · ── ╰──── - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test - ⚠ eslint-plugin-jest(valid-title): "Should not have an empty title" + ⚠ eslint-plugin-jest(valid-title): Should not have an empty title ╭─[valid_title.tsx:1:17] 1 │ test.concurrent('', function () {}) · ── ╰──── - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test - ⚠ eslint-plugin-jest(valid-title): "Should not have an empty title" + ⚠ eslint-plugin-jest(valid-title): Should not have an empty title ╭─[valid_title.tsx:1:6] 1 │ test(``, function () {}) · ── ╰──── - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test - ⚠ eslint-plugin-jest(valid-title): "Should not have an empty title" + ⚠ eslint-plugin-jest(valid-title): Should not have an empty title ╭─[valid_title.tsx:1:17] 1 │ test.concurrent(``, function () {}) · ── ╰──── - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test - ⚠ eslint-plugin-jest(valid-title): "Should not have an empty title" + ⚠ eslint-plugin-jest(valid-title): Should not have an empty title ╭─[valid_title.tsx:1:11] 1 │ xdescribe('', () => {}) · ── ╰──── - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test - ⚠ eslint-plugin-jest(valid-title): "Should not have an empty title" + ⚠ eslint-plugin-jest(valid-title): Should not have an empty title ╭─[valid_title.tsx:1:5] 1 │ xit('', () => {}) · ── ╰──── - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test - ⚠ eslint-plugin-jest(valid-title): "Should not have an empty title" + ⚠ eslint-plugin-jest(valid-title): Should not have an empty title ╭─[valid_title.tsx:1:7] 1 │ xtest('', () => {}) · ── ╰──── - help: "Write a meaningful title for your test" + help: Write a meaningful title for your test - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:10] 1 │ describe(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:17] 1 │ describe.each()(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:22] 1 │ describe.only.each()(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:10] 1 │ describe(' foo foe fum', function () {}) · ────────────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:10] 1 │ describe('foo foe fum ', function () {}) · ────────────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:11] 1 │ fdescribe(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:11] 1 │ fdescribe(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:11] 1 │ xdescribe(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:4] 1 │ it(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:15] 1 │ it.concurrent(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:5] 1 │ fit(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:9] 1 │ it.skip(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:5] 1 │ fit('foo ', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:9] 1 │ it.skip('foo ', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:4:26] 3 │ 4 │ testThat('foo works ', () => {}); · ──────────── 5 │ ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:5] 1 │ xit(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:6] 1 │ test(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:17] 1 │ test.concurrent(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:6] 1 │ test(` foo`, function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:17] 1 │ test.concurrent(` foo`, function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:6] 1 │ test(` foo bar bang`, function () {}) · ─────────────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:17] 1 │ test.concurrent(` foo bar bang`, function () {}) · ─────────────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:6] 1 │ test(` foo bar bang `, function () {}) · ───────────────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:17] 1 │ test.concurrent(` foo bar bang `, function () {}) · ───────────────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:7] 1 │ xtest(' foo', function () {}) · ────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:1:7] 1 │ xtest(' foo ', function () {}) · ──────── ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:2:26] 1 │ 2 │ describe(' foo', () => { · ────── 3 │ it('bar', () => {}) ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have leading or trailing spaces" + ⚠ eslint-plugin-jest(valid-title): Should not have leading or trailing spaces ╭─[valid_title.tsx:3:24] 2 │ describe('foo', () => { 3 │ it(' bar', () => {}) · ────── 4 │ }) ╰──── - help: "Remove the leading or trailing spaces" + help: Remove the leading or trailing spaces - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:10] 1 │ describe('describe foo', function () {}) · ────────────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:11] 1 │ fdescribe('describe foo', function () {}) · ────────────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:11] 1 │ xdescribe('describe foo', function () {}) · ────────────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:10] 1 │ describe('describe foo', function () {}) · ────────────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:11] 1 │ fdescribe(`describe foo`, function () {}) · ────────────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:6] 1 │ test('test foo', function () {}) · ────────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:7] 1 │ xtest('test foo', function () {}) · ────────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:6] 1 │ test(`test foo`, function () {}) · ────────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:6] 1 │ test(`test foo test`, function () {}) · ─────────────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:4] 1 │ it('it foo', function () {}) · ──────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:5] 1 │ fit('it foo', function () {}) · ──────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:5] 1 │ xit('it foo', function () {}) · ──────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:1:4] 1 │ it('it foos it correctly', function () {}) · ────────────────────── ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:2:26] 1 │ 2 │ describe('describe foo', () => { · ────────────── 3 │ it('bar', () => {}) ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:2:26] 1 │ 2 │ describe('describe foo', () => { · ────────────── 3 │ it('describes things correctly', () => {}) ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Should not have duplicate prefix" + ⚠ eslint-plugin-jest(valid-title): Should not have duplicate prefix ╭─[valid_title.tsx:3:24] 2 │ describe('foo', () => { 3 │ it('it bar', () => {}) · ──────── 4 │ }) ╰──── - help: "The function name has already contains the prefix, try remove the duplicate prefix" + help: The function name already has the prefix, try to remove the duplicate prefix - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:4] 1 │ it(abc, function () {}) · ─── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string - ⚠ eslint-plugin-jest(valid-title): "Title must be a string" + ⚠ eslint-plugin-jest(valid-title): Title must be a string ╭─[valid_title.tsx:1:6] 1 │ test(bar, () => {}); · ─── ╰──── - help: "Replace your title with a string" + help: Replace your title with a string