{"record":{"id":"6be6e6546743cfea","repo":"oxc-project/oxc","slug":"the-use-of-todo-is-not-recommended","errorCode":null,"errorMessage":"The use of `.todo` is not recommended.","messagePattern":"The use of `\\.todo` is not recommended\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/vitest/warn_todo.rs","lineNumber":16,"sourceCode":"use oxc_ast::AstKind;\nuse oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\n\nuse crate::{\n    context::LintContext,\n    rule::Rule,\n    utils::{\n        JestFnKind, JestGeneralFnKind, PossibleJestNode, is_type_of_jest_fn_call,\n        parse_general_jest_fn_call,\n    },\n};\n\nfn warn_todo_diagnostic(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"The use of `.todo` is not recommended.\")\n        .with_help(\"Write an actual test and remove the `.todo` modifier before pushing/merging your changes.\")\n        .with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct WarnTodo;\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// This rule warns about usage of `.todo` in `describe`, `it`, or `test` functions.\n    ///\n    /// ### Why is this bad?\n    ///\n    /// The tests you push should be complete. Any pending/`TODO` code should not be committed.\n    ///\n    /// ### Examples\n    ///","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/vitest/warn_todo.rs#L1-L34","documentation":"Fires when the warn-todo rule detects a .todo() modifier on a test declaration during run. It is a style guard discouraging placeholder tests that are skipped silently and can hide unfinished work before merge.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/vitest/warn_todo.rs:16 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Implement the test body and remove the .todo modifier","Delete the placeholder test if the behavior is no longer planned"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}