{"record":{"id":"fcffde37c8fb4a7e","repo":"denoland/deno","slug":"multiple-selectors-not-allowed-here","errorCode":null,"errorMessage":"Multiple selectors not allowed here","messagePattern":"Multiple selectors not allowed here","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/js/40_lint_selector.js","lineNumber":789,"sourceCode":"    const prev = /** @type {Selector} */ (stack.at(-1));\n    if (prev.length === 0) {\n      throw new Error(`Empty selector`);\n    }\n\n    const node = prev.at(-1);\n    if (node === undefined) {\n      throw new Error(`Empty node`);\n    }\n\n    if (node.type === PSEUDO_NTH_CHILD) {\n      node.of = sel;\n    } else if (\n      node.type === PSEUDO_HAS || node.type === PSEUDO_IS ||\n      node.type === PSEUDO_NOT\n    ) {\n      node.selectors.push(sel);\n    } else {\n      throw new Error(`Multiple selectors not allowed here`);\n    }\n  }\n}\n\nconst TRUE_FN = () => {\n  return true;\n};\n\n/**\n * @param {Selector} selector\n * @returns {MatcherFn}\n */\nexport function compileSelector(selector) {\n  /** @type {MatcherFn} */\n  let fn = TRUE_FN;\n\n  for (let i = 0; i < selector.length; i++) {\n    const node = selector[i];","sourceCodeStart":771,"sourceCodeEnd":807,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/js/40_lint_selector.js#L771-L807","documentation":"When popSelector (cli/js/40_lint_selector.js) finishes a selector group, the parent node it attaches to must be one that accepts selector arguments: :nth-child (its `of` clause), :has(), :is() or :not(). If the parent's last node is any other node type, `Multiple selectors not allowed here` is thrown — the parser refuses to attach a second selector to a node that takes exactly one. In practice this is an invariant guard; the reachable ways to finish a group all close one of the supported pseudo forms.","triggerScenarios":"Malformed or degenerate selector keys where a selector group closes against a plain node or combinator instead of a :has()/:is()/:not()/:nth-child node — typically after unusual nesting, stray closing parentheses, or :nth-child forms that desynchronize the parser's group stack.","commonSituations":"Experimental selector syntax; keys built by string concatenation; unlikely with hand-written well-formed keys.","solutions":["Simplify the key: ensure every selector list is explicitly wrapped in :is()/:has()/:not(), e.g. \"A B:has(C), A B:has(D)\" instead of implicit groupings.","Split the rule into multiple visitor keys, each with one plain compound selector.","If the key appears valid, minimize it and report it to the Deno repository as a parser edge case."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Wrap every selector list explicitly in :is()/:has()/:not().","Prefer several simple visitor keys over one long compound selector.","Move complex structural matching into JavaScript inside the visitor callback."],"tags":["deno","deno-lint","lint-plugin","selector","parse-error","invariant"],"backgroundTag":"invalid-selector-syntax","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}