const nodemailer = require("nodemailer")
const heilo = require("heilo")

const mailTransport = nodemailer.createTransport({ direct: true, debug: true })

// NOTE: Please change to valid email addresses
const from = process.env.FROM_EMAIL || 'aaa'
const to = process.env.TO_EMAIL || 'bbb'
const hostname = process.env.HOSTNAME || 'https://localhost'

const reportError = (error) => {
  const {
    hostname, statusCode, message,
    type, errorType, originalError,
    timestamp
  } = error;
  console.log('Server Down, sending notification...')
  mailTransport.sendMail({
    from,
    to,
    subject: 'Server Down!',
    text: `${hostname} is down with status code ${statusCode} and error message - ${message}`,
    html: `<p>${hostname} is down with status code ${statusCode} and error message - ${message}</p>`
  })
}

heilo(hostname, {
  interval: '5m',
  report: reportError,
  debug: true
})

@@ -20,17 +20,17 @@
 require(
-%22
+'
 nodemail
@@ -31,17 +31,17 @@
 demailer
-%22
+'
 )%0Aconst 
@@ -60,15 +60,15 @@
 ire(
-%22
+'
 heilo
-%22
+'
 )%0A%0Ac
@@ -380,116 +380,8 @@
 %3E %7B%0A
-  const %7B%0A    hostname, statusCode, message,%0A    type, errorType, originalError,%0A    timestamp%0A  %7D = error;%0A
   co
@@ -517,16 +517,22 @@
 ext: %60$%7B
+error.
 hostname
@@ -552,32 +552,38 @@
 h status code $%7B
+error.
 statusCode%7D and 
@@ -592,32 +592,38 @@
 ror message - $%7B
+error.
 message%7D%60,%0A    h
@@ -633,16 +633,22 @@
 : %60%3Cp%3E$%7B
+error.
 hostname
@@ -676,16 +676,22 @@
  code $%7B
+error.
 statusCo
@@ -716,16 +716,22 @@
 age - $%7B
+error.
 message%7D

Fix eslint errors