Skip to content

Commit

Permalink
Fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Jul 15, 2019
1 parent 567e79f commit 700c573
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/api/core/test/slow/api_spec_slow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe(`electron-forge API (with installer=${nodeInstaller})`, () => {
expect(await fs.pathExists(path.resolve(dir, subPath)), `the ${subPath} ${pathType} should exist`).to.equal(exists);
};

const expectProjectPathNotExists = async (subPath: string, pathType: string, exists = true) => {
const expectProjectPathNotExists = async (subPath: string, pathType: string) => {
expectProjectPathExists(subPath, pathType, false);
};

Expand Down
10 changes: 7 additions & 3 deletions packages/template/webpack/src/WebpackTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ const currentVersion = require('../package').version;
const copyTemplateFile = async (destDir: string, basename: string) => {
const templateDir = path.resolve(__dirname, '..', 'tmpl');
await fs.copy(path.join(templateDir, basename), path.resolve(destDir, basename));
}
};

const updateFileByLine = async (inputPath: string, lineHandler: (line: string) => string, outputPath: string | undefined = undefined) => {
const updateFileByLine = async (
inputPath: string,
lineHandler: (line: string) => string,
outputPath: string | undefined = undefined,
) => {
const fileContents = (await fs.readFile(inputPath, 'utf8')).split('\n').map(lineHandler).join('\n');
await fs.writeFile(outputPath || inputPath, fileContents);
if (outputPath !== undefined) {
await fs.remove(inputPath);
}
}
};

class WebpackTemplate implements ForgeTemplate {
public devDependencies = [
Expand Down

0 comments on commit 700c573

Please sign in to comment.