{"record":{"id":"ce1eb19acef83f09","repo":"denoland/deno","slug":"multiple-selector-arguments-not-supported-here","errorCode":null,"errorMessage":"Multiple selector arguments not supported here","messagePattern":"Multiple selector arguments not supported here","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/js/40_lint_selector.js","lineNumber":729,"sourceCode":"        case \"not\": {\n          lex.next();\n          lex.expect(Token.BraceOpen);\n          lex.next();\n\n          current.push({\n            type: PSEUDO_NOT,\n            selectors: [],\n          });\n          stack.push([]);\n\n          continue;\n        }\n        default:\n          throw new Error(`Unknown pseudo selector: '${lex.value}'`);\n      }\n    } else if (lex.token === Token.Comma) {\n      if (throwOnComma) {\n        throw new Error(`Multiple selector arguments not supported here`);\n      }\n\n      lex.next();\n      if (lex.token === Token.Space) {\n        lex.next();\n      }\n\n      popSelector(result, stack);\n      stack.push([]);\n      continue;\n    } else if (lex.token === Token.BraceClose) {\n      throwOnComma = false;\n      popSelector(result, stack);\n    } else if (lex.token === Token.Op) {\n      current.push({\n        type: RELATION_NODE,\n        op: getAttrOp(lex.value),\n      });","sourceCodeStart":711,"sourceCodeEnd":747,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/cli/js/40_lint_selector.js#L711-L747","documentation":"Thrown by the selector parser (cli/js/40_lint_selector.js) when a comma appears while throwOnComma is set — i.e. inside the 'of <selector>' argument of :nth-child(). After 'N of S' begins, the argument is a single selector; a comma-separated list is not accepted there, unlike :has()/:is()/:not() which do accept lists.","triggerScenarios":"A selector like \":nth-child(1 of VariableDeclarator, CallExpression)\" — the comma after the 'of' selector triggers the throw.throwOnComma path.","commonSituations":"Trying to count the nth occurrence across several node types at once; porting a CSS/Eslint selector that combined :nth-child with a selector list.","solutions":["Wrap the list in :is(): :nth-child(1 of :is(A, B))","Or register one :nth-child selector per node type and merge the logic in the visitor"],"exampleFix":"// before\n\":nth-child(1 of VariableDeclarator, CallExpression)\"(node) {},\n\n// after\n\":nth-child(1 of :is(VariableDeclarator, CallExpression))\"(node) {},","handlingStrategy":"validation","validationCode":"function nthChildOfIsSingle(sel) {\n  const m = sel.match(/:nth-child\\(\\s*\\d+\\s+of\\s+([^()]*)\\)/);\n  if (m && m[1].includes(\",\")) {\n    throw new Error(\"wrap the 'of' list in :is(): \" + sel);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Inside :nth-child(N of ...), pass exactly one selector — wrap lists with :is(A, B)","Remember only :has/:is/:not accept comma-separated argument lists"],"tags":["lint","selector","nth-child","esquery","parser"],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}