{"record":{"id":"9eb1b0780d8fe936","repo":"oxc-project/oxc","slug":"comments-should-not-begin-with-article-wrong-ca","errorCode":null,"errorMessage":"Comments should not begin with {article} {wrong_case} letter","messagePattern":"Comments should not begin with (.+?) (.+?) letter","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/eslint/capitalized_comments.rs","lineNumber":36,"sourceCode":"    \"oxlint-disable\",\n    \"oxlint-enable\",\n    \"jshint\",\n    \"jscs\",\n    \"istanbul\",\n    \"global \",\n    \"globals \",\n    \"exported\",\n    \"prettier-ignore\",\n    \"oxfmt-ignore\",\n];\n\nfn capitalized_comments_diagnostic(\n    span: Span,\n    wrong_case: &str,\n    correct_case: &str,\n) -> OxcDiagnostic {\n    let article = if wrong_case == \"uppercase\" { \"an\" } else { \"a\" };\n    OxcDiagnostic::warn(format!(\"Comments should not begin with {article} {wrong_case} letter\"))\n        .with_help(format!(\"Change the first letter of the comment to {correct_case}\"))\n        .with_label(span)\n}\n\n/// Configuration for either line or block comments\n#[derive(Debug, Clone, Default)]\n#[expect(clippy::struct_field_names)]\nstruct CommentConfig {\n    ignore_pattern: Option<Regex>,\n    ignore_inline_comments: bool,\n    ignore_consecutive_comments: bool,\n}\n\n/// Internal configuration structure (boxed for size optimization)\n#[derive(Debug, Clone, Default)]\npub struct CapitalizedCommentsConfig {\n    capitalize: AlwaysNever,\n    line_config: CommentConfig,","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/eslint/capitalized_comments.rs#L18-L54","documentation":"Lint diagnostic from eslint/capitalized-comments: a comment's first letter case does not match the configured convention (uppercase by default, lowercase with the 'lowercase' option; the article an/a is chosen accordingly). Directives like oxlint-disable, jshint, and prettier-ignore are exempted before this check.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/eslint/capitalized_comments.rs:36 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Capitalize (or lowercase, per config) the first letter of the comment","Add an ignore pattern for words or comment styles that must keep their case"],"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"}