function checkCommentOpen(comment, requireNewline) {
      const { value, openDecoration, open } = comment
      if (!value) {
        return
      }
      const beforeToken = openDecoration || open

      if (requireNewline) {
        if (beforeToken.loc.end.line < value.loc.start.line) {
          // Is valid
          return
        }
        context.report({
          loc: {
            start: beforeToken.loc.end,
            end: value.loc.start
          },
          messageId: openDecoration
            ? 'expectedAfterExceptionBlock'
            : 'expectedAfterHTMLCommentOpen',
          fix: openDecoration
            ? undefined
            : (fixer) => fixer.insertTextAfter(beforeToken, '\n')
        })
      } else {
        if (beforeToken.loc.end.line === value.loc.start.line) {
          // Is valid
          return
        }
        context.report({
          loc: {
            start: beforeToken.loc.end,
            end: value.loc.start
          },
          messageId: 'unexpectedAfterHTMLCommentOpen',
          fix: (fixer) =>
            fixer.replaceTextRange([beforeToken.range[1], value.range[0]], ' ')
        })
      }
    }
Reports the newline before the contents of a given comment if it's invalid.
@param {ParsedHTMLComment} comment - comment data.
@param {boolean} requireNewline - `true` if line breaks are required.
@returns {void}