Skip to content

Commit db2af72

Browse files
Maksym LanovyyPatrickJS
Maksym Lanovyy
authored andcommitted
Fixes to TSLint errors. Excluded src/*.d.ts from TSLint checks.
1 parent 0bc4a3d commit db2af72

File tree

7 files changed

+27
-22
lines changed

7 files changed

+27
-22
lines changed

src/app/+barrel/+child-barrel/child-barrel.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ console.log('`ChildBarrel` component loaded asynchronously');
1313
@Component({
1414
selector: 'child-barrel',
1515
template: `
16-
<h1>Hello from Child Barrel</h1>
16+
<h1>Hello from Child Barrel</h1>
1717
`,
1818
})
1919
export class ChildBarrelComponent implements OnInit {

src/app/+detail/+child-detail/child-detail.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ console.log('`ChildDetail` component loaded asynchronously');
1313
@Component({
1414
selector: 'child-detail',
1515
template: `
16-
<h1>Hello from Child Detail</h1>
16+
<h1>Hello from Child Detail</h1>
1717
`,
1818
})
1919
export class ChildDetailComponent implements OnInit {

src/app/app.e2e.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ describe('App', () => {
88
});
99

1010
it('should have a title', async () => {
11-
let subject = await browser.getTitle();
12-
let result = 'Angular Starter by @gdi2290 from @TipeIO';
11+
const subject = await browser.getTitle();
12+
const result = 'Angular Starter by @gdi2290 from @TipeIO';
1313
expect(subject).toEqual(result);
1414
});
1515

1616
it('should have header', async () => {
17-
let subject = await element(by.css('h1')).isPresent();
18-
let result = true;
17+
const subject = await element(by.css('h1')).isPresent();
18+
const result = true;
1919
expect(subject).toEqual(result);
2020
});
2121

2222
it('should have <home>', async () => {
23-
let subject = await element(by.css('app home')).isPresent();
24-
let result = true;
23+
const subject = await element(by.css('app home')).isPresent();
24+
const result = true;
2525
expect(subject).toEqual(result);
2626
});
2727

2828
it('should have buttons', async () => {
29-
let subject = await element(by.css('button')).getText();
30-
let result = 'Submit Value';
29+
const subject = await element(by.css('button')).getText();
30+
const result = 'Submit Value';
3131
expect(subject).toEqual(result);
3232
});
3333

src/app/app.module.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ const APP_PROVIDERS = [
2929
AppState
3030
];
3131

32-
type StoreType = {
33-
state: InternalStateType,
34-
restoreInputValues: () => void,
35-
disposeOldHosts: () => void
36-
};
32+
interface StoreType {
33+
state: InternalStateType;
34+
restoreInputValues: () => void;
35+
disposeOldHosts: () => void;
36+
}
3737

3838
/**
3939
* `AppModule` is the main entry point into Angular2's bootstraping process

src/app/app.service.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Injectable } from '@angular/core';
22

3-
export type InternalStateType = {
4-
[key: string]: any
5-
};
3+
export interface InternalStateType {
4+
[key: string]: any;
5+
}
66

77
@Injectable()
88
export class AppState {

src/app/home/home.e2e.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ describe('Home', () => {
1111
});
1212

1313
it('should have a title', async () => {
14-
let subject = await browser.getTitle();
15-
let result = 'Angular Starter by @gdi2290 from @TipeIO';
14+
const subject = await browser.getTitle();
15+
const result = 'Angular Starter by @gdi2290 from @TipeIO';
1616
expect(subject).toEqual(result);
1717
});
1818

1919
it('should have `your content here` x-large', async () => {
20-
let subject = await element(by.css('[x-large]')).getText();
21-
let result = 'Your Content Here';
20+
const subject = await element(by.css('[x-large]')).getText();
21+
const result = 'Your Content Here';
2222
expect(subject).toEqual(result);
2323
});
2424

tslint.json

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
"extends": [
33
"tslint:recommended"
44
],
5+
"linterOptions": {
6+
"exclude": [
7+
"src/*.d.ts"
8+
]
9+
},
510
"rulesDirectory": [
611
"node_modules/codelyzer"
712
],

0 commit comments

Comments
 (0)