Skip to content

Commit

Permalink
chore: Merge pull request #48 from eventOneHQ/develop
Browse files Browse the repository at this point in the history
1.4.2
  • Loading branch information
nprail committed Aug 5, 2020
2 parents e966911 + d7a9e7a commit ce40b71
Show file tree
Hide file tree
Showing 4 changed files with 2,144 additions and 1,244 deletions.
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid"
}
16 changes: 4 additions & 12 deletions lib/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,13 @@ const severityMap = {
}

const generateTemplate = async (data, template) => {
try {
const htmlTemplate = await fs.readFile(template, 'utf8')
return Handlebars.compile(htmlTemplate)(data)
} catch (err) {
throw err
}
const htmlTemplate = await fs.readFile(template, 'utf8')
return Handlebars.compile(htmlTemplate)(data)
}

const writeReport = async (report, output) => {
try {
await fs.ensureFile(output)
await fs.writeFile(output, report)
} catch (err) {
throw err
}
await fs.ensureFile(output)
await fs.writeFile(output, report)
}

const modifyData = async data => {
Expand Down
Loading

0 comments on commit ce40b71

Please sign in to comment.