src/language-js/print/decorators.js/printDecorators
function printDecorators(path, options, print) {
  const node = path.getValue();
  const { decorators } = node;

  if (
    !isNonEmptyArray(decorators) ||
    // If the parent node is an export declaration and the decorator
    // was written before the export, the export will be responsible
    // for printing the decorators.
    hasDecoratorsBeforeExport(path.getParentNode())
  ) {
    return;
  }

  const shouldBreak =
    node.type === "ClassExpression" ||
    node.type === "ClassDeclaration" ||
    hasNewlineBetweenOrAfterDecorators(node, options);

  return [
    getParentExportDeclaration(path)
      ? hardline
      : shouldBreak
      ? breakParent
      : "",
    join(line, path.map(print, "decorators")),
    line,
  ];
}