Skip to content

Commit

Permalink
Fix linting problems
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Jan 3, 2019
1 parent d73eb25 commit 3545b63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/api/core/src/util/electron-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function findElectronDep(dep: string): boolean {
return electronPackageNames.includes(dep);
}

export function getElectronVersion (packageJSON: any) {
export function getElectronVersion(packageJSON: any) {
if (!packageJSON.devDependencies) {
throw new Error('package.json for app does not have any devDependencies'.red);
}
Expand All @@ -21,7 +21,7 @@ export function getElectronVersion (packageJSON: any) {
throw new Error('Could not find any Electron packages in devDependencies');
}
return packageJSON.devDependencies[packageName];
};
}

export function updateElectronDependency(packageJSON: any, dev: string[], exact: string[]): [string[], string[]] {
if (Object.keys(packageJSON.devDependencies).find(findElectronDep)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/api/core/test/fast/electron-version_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe.only('updateElectronDependency', () => {
});
it('moves an Electron dependency from dependencies to devDependencies', () => {
const packageJSON = {
dependencies: { electron: '0.37.0'},
dependencies: { electron: '0.37.0' },
devDependencies: { },
};
const [dev, exact] = updateElectronDependency(packageJSON, devDeps, exactDevDeps);
Expand Down Expand Up @@ -54,7 +54,7 @@ describe('getElectronVersion', () => {

it('works with electron', () => {
const packageJSON = {
devDependencies: { 'electron': '1.0.0' },
devDependencies: { electron: '1.0.0' },
};
expect(getElectronVersion(packageJSON)).to.be.equal('1.0.0');
});
Expand Down

0 comments on commit 3545b63

Please sign in to comment.