Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Commit

Permalink
linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronpowell committed Jul 22, 2019
1 parent d6c4037 commit 37d470e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/test/coverage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ import * as path from 'path';

const REPO_ROOT = path.resolve(__dirname, '../..');

function ensureDir(dirname: string): void {
if (fs.existsSync(dirname)) {
return;
}
ensureDir(path.dirname(dirname));
fs.mkdirSync(dirname);
}

function safeWriteFile(filePath: string, contents: Buffer | string): void {
ensureDir(path.dirname(filePath));
Expand All @@ -19,14 +26,6 @@ function copyFile(inputPath: string, outputPath: string): void {
safeWriteFile(outputPath, fs.readFileSync(inputPath));
}

function ensureDir(dirname: string): void {
if (fs.existsSync(dirname)) {
return;
}
ensureDir(path.dirname(dirname));
fs.mkdirSync(dirname);
}

function _rreaddir(dirname: string, relativeTo: string, result: string[]): void {
const entries = fs.readdirSync(dirname);
for (let i = 0; i < entries.length; i++) {
Expand Down

0 comments on commit 37d470e

Please # to comment.