Skip to content

Commit

Permalink
build(deps): update standard linter (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Dec 31, 2020
1 parent 90949fa commit 0858af5
Show file tree
Hide file tree
Showing 6 changed files with 857 additions and 549 deletions.
2 changes: 1 addition & 1 deletion lib/parse-args.js
Expand Up @@ -126,7 +126,7 @@ function buildYargs (withCommands = false) {
}

function hideInstrumenterArgs (yargv) {
var argv = process.argv.slice(1)
let argv = process.argv.slice(1)
argv = argv.slice(argv.indexOf(yargv._[0]))
if (argv[0][0] === '-') {
argv.unshift(process.execPath)
Expand Down
16 changes: 8 additions & 8 deletions lib/report.js
Expand Up @@ -53,7 +53,7 @@ class Report {
}

async run () {
var context = libReport.createContext({
const context = libReport.createContext({
dir: this.reportsDirectory,
watermarks: this.watermarks,
coverageMap: await this.getCoverageMapFromAllCoverageFiles()
Expand Down Expand Up @@ -225,18 +225,18 @@ class Report {
* @private
*/
_loadReports () {
const files = readdirSync(this.tempDirectory)

return files.map((f) => {
const reports = []
for (const file of readdirSync(this.tempDirectory)) {
try {
return JSON.parse(readFileSync(
resolve(this.tempDirectory, f),
reports.push(JSON.parse(readFileSync(
resolve(this.tempDirectory, file),
'utf8'
))
)))
} catch (err) {
console.warn(`${err.stack}`)
}
})
}
return reports
}

/**
Expand Down

0 comments on commit 0858af5

Please sign in to comment.