src/language-js/print/class.js/printList
function printList(path, options, print, listName) {
  const n = path.getValue();
  if (!n[listName] || n[listName].length === 0) {
    return "";
  }

  const printedLeadingComments = printDanglingComments(
    path,
    options,
    /* sameIndent */ true,
    ({ marker }) => marker === listName
  );
  return concat([
    shouldIndentOnlyHeritageClauses(n)
      ? ifBreak(" ", line, {
          groupId: getTypeParametersGroupId(n.typeParameters),
        })
      : line,
    printedLeadingComments,
    printedLeadingComments && hardline,
    listName,
    group(
      indent(
        concat([line, join(concat([",", line]), path.map(print, listName))])
      )
    ),
  ]);
}