Skip to content

Commit

Permalink
fix/ Fix npm run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime GRIS committed Jun 8, 2017
1 parent 7e71add commit db7972a
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 76 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-electron",
"version": "1.4.3",
"version": "1.4.4",
"description": "Angular 4 with Electron (Typescript + SASS + Hot Reload)",
"homepage": "https://github.com/maximegris/angular-electron",
"author": {
Expand Down Expand Up @@ -53,7 +53,7 @@
"@types/jasmine": "2.5.41",
"@types/node": "7.0.18",
"autoprefixer": "6.7.7",
"codelyzer": "2.1.1",
"codelyzer": "3.0.1",
"copyfiles": "1.2.0",
"cross-env": "4.0.0",
"css-loader": "0.26.1",
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ElectronService } from './providers/electron.service';
export class AppComponent {
constructor(public electronService: ElectronService) {

if(electronService.isElectron()) {
if (electronService.isElectron()) {
console.log('Mode electron');
// Check if electron is correctly injected (see externals in webpack.config.js)
console.log('c', electronService.ipcRenderer);
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/home/home.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ describe('HomeComponent', () => {
});

it(`should have as title 'App works !'`, async(() => {
const fixture = TestBed.createComponent(HomeComponent);
fixture = TestBed.createComponent(HomeComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('App works !');
}));

it('should render title in a h1 tag', async(() => {
const fixture = TestBed.createComponent(HomeComponent);
fixture = TestBed.createComponent(HomeComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('App works !');
Expand Down
2 changes: 1 addition & 1 deletion src/app/providers/electron.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class ElectronService {
childProcess: typeof childProcess;

constructor() {
//Conditional imports
// Conditional imports
if (this.isElectron()) {
this.ipcRenderer = window.require('electron').ipcRenderer;
this.childProcess = window.require('child_process');
Expand Down
4 changes: 2 additions & 2 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
} from '@angular/platform-browser-dynamic/testing';

// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
declare var __karma__: any;
declare var require: any;
declare const __karma__: any;
declare const require: any;

// Prevent Karma from running prematurely.
__karma__.loaded = function () {};
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
]
},
"types": [
"node"
"node",
"jasmine"
],
"typeRoots": [
"node_modules/@types"
Expand Down
Loading

0 comments on commit db7972a

Please sign in to comment.