{"record":{"id":"a9c8b013de116071","repo":"oxc-project/oxc","slug":"mixing-of-access-with-public-private","errorCode":null,"errorMessage":"Mixing of `@access` with `@public`, `@private`, `@protected`, or `@package` on the same doc block.","messagePattern":"Mixing of `@access` with `@public`, `@private`, `@protected`, or `@package` on the same doc block\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/jsdoc/check_access.rs","lineNumber":15,"sourceCode":"use oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\nuse rustc_hash::FxHashSet;\n\nuse crate::{context::LintContext, rule::Rule, utils::should_ignore_as_internal};\n\nfn invalid_access_level(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Invalid access level is specified or missing.\")\n        .with_help(\"Valid access levels are `package`, `private`, `protected`, and `public`.\")\n        .with_label(span)\n}\n\nfn redundant_access_tags(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\n        \"Mixing of `@access` with `@public`, `@private`, `@protected`, or `@package` on the same doc block.\",\n    )\n    .with_help(\"There should be only one instance of access tag in a JSDoc comment.\")\n    .with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct CheckAccess;\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// Checks that `@access` tags use one of the following values:\n    /// - \"package\", \"private\", \"protected\", \"public\"\n    ///\n    /// Also reports:\n    /// - Mixing of `@access` with `@public`, `@private`, `@protected`, or `@package` on the same doc block.\n    /// - Use of multiple instances of `@access` (or the `@public`, etc) on the same doc block.","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/jsdoc/check_access.rs#L1-L33","documentation":"Fires from jsdoc/check-access when a JSDoc block contains both the general @access tag and one of the specific visibility tags (@public, @private, @protected, @package). The redundant_access_tags helper flags the duplication since @access already conveys the level.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/jsdoc/check_access.rs:15 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Keep only the @access tag and remove the redundant visibility tag","Or keep the specific tag (@private etc.) and drop @access"],"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"}