Skip to content

Commit

Permalink
fix(lint): errors occur
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveVanOpstal committed Sep 13, 2017
1 parent fe062c6 commit ad6f702
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 19 deletions.
6 changes: 3 additions & 3 deletions e2e/champions.component.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('ChampionComponent', () => {
element(by.css('lb-champions lb-filters input[value=\'Tank\']')).click();
element(by.css('lb-champions lb-filters input[value=\'Mage\']')).click();
element(by.css('lb-champions lb-filters input[value=\'attack\']')).click();
let championCount: Promise<Number> = element.all(by.css('lb-champions .champion')).count();
const championCount = element.all(by.css('lb-champions .champion')).count();
championCount
.then((count) => {
expect(count).toEqual(1);
Expand All @@ -38,7 +38,7 @@ describe('ChampionComponent', () => {

it('should find Velkoz', () => {
element(by.css('lb-champions lb-filters input[type=\'text\']')).sendKeys('Velkoz');
let championCount = element.all(by.css('lb-champions .champion')).count();
const championCount = element.all(by.css('lb-champions .champion')).count();
championCount
.then((count) => {
expect(count).toEqual(1);
Expand All @@ -50,7 +50,7 @@ describe('ChampionComponent', () => {

it('should find Marksmen', () => {
element(by.css('lb-champions lb-filters input[value=\'Marksman\']')).click();
let championCount = element.all(by.css('lb-champions .champion')).count();
const championCount = element.all(by.css('lb-champions .champion')).count();
championCount
.then((count) => {
expect(count).not.toBeLessThan(1);
Expand Down
2 changes: 1 addition & 1 deletion src/client/about/about.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import {Http} from '@angular/http';
})

export class AboutComponent {
ready: boolean = false;
ready = false;
contributors: any;

constructor(private http: Http) {
Expand Down
3 changes: 2 additions & 1 deletion src/client/assets/icon-eye.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {Component} from '@angular/core';
template: `
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-eye" width="24" height="24" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>
<path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76
0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>
</svg>`
})

Expand Down
3 changes: 2 additions & 1 deletion src/client/assets/icon-refresh.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {Component} from '@angular/core';
selector: 'lb-icon-refresh',
template: `
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-refresh" width="32" height="32" viewBox="0 0 24 24">
<path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/>
<path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65
4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>`
})
Expand Down
2 changes: 1 addition & 1 deletion src/client/build/graph/axes/level.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('LevelAxisText', () => {
});

it('should update', () => {
let samples: Samples = {xp: [0, 1, 2], gold: [0, 1, 2]};
const samples: Samples = {xp: [0, 1, 2], gold: [0, 1, 2]};
component.create(new LevelScale([0, 380]));
component.update(samples);
expect(component.axis.tickValues()).toBeDefined();
Expand Down
4 changes: 2 additions & 2 deletions src/client/build/graph/axes/level.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export class LevelAxisText implements Axis {
}

update(samples: Samples): void {
let lastXpMark = samples.xp[samples.xp.length - 1];
const lastXpMark = samples.xp[samples.xp.length - 1];

let values: Array<number> = [];
const values: Array<number> = [];
config.levelXp.forEach((v: number, i: number, a: Array<number>) => {
values[i] = v + (((a[i + 1] ? a[i + 1] : lastXpMark) - v) / 2);
});
Expand Down
4 changes: 2 additions & 2 deletions src/client/build/graph/axes/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export class TimeAxis implements Axis {
}

createTimeMarks() {
let timeMarks: Array<number> = [];
let i: number = 0;
const timeMarks: Array<number> = [];
let i = 0;
while (i <= settings.gameTime) {
timeMarks.push(i);
i += config.timeInterval;
Expand Down
2 changes: 1 addition & 1 deletion src/client/build/graph/scales/level.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('LevelScale', () => {
});

it('should update', () => {
let samples: Samples = {xp: [0, 1, 2], gold: [0, 1, 2]};
const samples: Samples = {xp: [0, 1, 2], gold: [0, 1, 2]};
component.create();
component.update(samples);
expect(component.scale.domain()).toHaveEqualContent([0, 2]);
Expand Down
2 changes: 1 addition & 1 deletion src/client/build/graph/scales/level.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class LevelScale implements Scale {
}

update(samples: Samples) {
let lastXpMark = samples.xp[samples.xp.length - 1];
const lastXpMark = samples.xp[samples.xp.length - 1];
this.scale.domain([0, lastXpMark]);
}
}
2 changes: 1 addition & 1 deletion src/client/build/items/items.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export class ItemsComponent implements OnInit {
if (!baseItem.from || !baseItem.from.length || !this.allItems) {
return [];
}
let items: Array<Item> = baseItem.from.map((id: string) => {
const items: Array<Item> = baseItem.from.map((id: string) => {
return this.allItems[id];
});
let arr = Array<string>();
Expand Down
4 changes: 2 additions & 2 deletions src/client/build/shop/shop.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ xdescribe('ShopComponent', () => {
});

// let pickedItem1 = {id: 1, group: 'PinkWards'};
let pickedItem2 = {id: 2, group: 'PinkWards'};
const pickedItem2 = {id: 2, group: 'PinkWards'};
// let pickedItem3 = {};
// let pickedItem4 = {id: 4, group: 'DoransItems'};
let items = {
const items = {
groups: [{MaxGroupOwnable: 2, key: 'PinkWards'}, {MaxGroupOwnable: -1, key: 'DoransItems'}]
};

Expand Down
3 changes: 2 additions & 1 deletion src/client/shared/ddragon.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {LolApiService} from '../services';

export let defaultImage: string = 'data:image/svg+xml,' + encodeURIComponent(`
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-hourglass" width="24" height="24" viewBox="0 0 24 24">
<path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"/>
<path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4
4zm-4-5l-4-4V4h8v3.5l-4 4z"/>
<path d="M0 0h24v24H0V0z" fill="none"/>
</svg>`);

Expand Down
4 changes: 2 additions & 2 deletions src/client/testing/router.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {UrlSegment} from '@angular/router';
import {Observable, Observer} from 'rxjs';
import {Observable, Observer} from 'rxjs/Rx';

export class MockRouter {
routerState: any = {};
region: string = 'euw';
region = 'euw';

constructor() {
this.routerState = this.routerState_();
Expand Down

0 comments on commit ad6f702

Please sign in to comment.