{"record":{"id":"1a75665e3220c6c9","repo":"oxc-project/oxc","slug":"array-destructuring-may-not-contain-consecutive-ig","errorCode":null,"errorMessage":"Array destructuring may not contain consecutive ignored values.","messagePattern":"Array destructuring may not contain consecutive ignored values\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/unicorn/no_unreadable_array_destructuring.rs","lineNumber":10,"sourceCode":"use oxc_allocator::ArenaVec;\nuse oxc_ast::AstKind;\nuse oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\n\nuse crate::{AstNode, context::LintContext, rule::Rule};\n\nfn no_unreadable_array_destructuring_diagnostic(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Array destructuring may not contain consecutive ignored values.\")\n        .with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct NoUnreadableArrayDestructuring;\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// Disallows destructuring values from an array in ways that are difficult to read.\n    ///\n    /// ### Why is this bad?\n    ///\n    /// Destructuring can be very useful, but it can also make some code harder to read.\n    /// This rule prevents ignoring consecutive values (e.g. `let [,,foo] = array`)\n    /// when destructuring from an array.\n    ///\n    /// ### Examples","sourceCodeStart":1,"sourceCodeEnd":28,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/unicorn/no_unreadable_array_destructuring.rs#L1-L28","documentation":"Raised by unicorn/no-unreadable-array-destructuring when a destructuring pattern contains two or more consecutive holes/elisions (`, ,`) or a spread followed by ignored holes, making the positional intent hard to read. The faulting input is the holey destructuring pattern at the labeled span.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/unicorn/no_unreadable_array_destructuring.rs:10 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Name the skipped elements (use descriptive identifiers instead of holes)","Insert a comment placeholder element to document the skipped slot","Restructure to index-based access or object destructuring when many positions are skipped"],"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-14T05:17:10.506Z"}