Skip to content

Commit 3c103f7

Browse files
committed
style(tslint): Enforce tslint rules and apply relevant fixes
1 parent a2d210f commit 3c103f7

File tree

5 files changed

+23
-5
lines changed

5 files changed

+23
-5
lines changed

src/lib/components/ng-http-loader.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class NgHttpLoaderComponent implements OnInit {
4848
.pipe(switchMap(() => showSpinner$.pipe(debounce(() => timer(this.debounceDelay))))),
4949
showSpinner$
5050
.pipe(switchMap(() => hideSpinner$.pipe(debounce(() => this.getVisibilityTimer$())))),
51-
this.spinnerVisibility.visibility$,
51+
this.spinnerVisibility.visibility$
5252
).pipe(
5353
distinctUntilChanged(),
5454
tap(h => this.updateExpirationDelay(h))

src/lib/ng-http-loader.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ import { SPINKIT_COMPONENTS } from './spinkits';
2424
exports: [
2525
NgHttpLoaderComponent,
2626
...SPINKIT_COMPONENTS,
27-
],
27+
]
2828
})
2929
export class NgHttpLoaderModule {
3030
public static forRoot(): ModuleWithProviders<NgHttpLoaderModule> {
3131
return {
3232
ngModule: NgHttpLoaderModule,
3333
providers: [
3434
PendingRequestsInterceptorProvider,
35-
],
35+
]
3636
};
3737
}
3838
}

src/lib/spinkits.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const Spinkit = {
2424
skSpinnerPulse: 'sk-spinner-pulse',
2525
skThreeBounce: 'sk-three-bounce',
2626
skWanderingCubes: 'sk-wandering-cubes',
27-
skWave: 'sk-wave',
27+
skWave: 'sk-wave'
2828
};
2929

3030
export const SPINKIT_COMPONENTS = [

src/test/components/ng-http-loader.component.outlet.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('NgHttpLoaderComponentOutlet', () => {
2020

2121
beforeEach(async(() => {
2222
TestBed.configureTestingModule({
23-
declarations: [NgHttpLoaderComponent, ...SPINKIT_COMPONENTS],
23+
declarations: [NgHttpLoaderComponent, ...SPINKIT_COMPONENTS]
2424
})
2525
.compileComponents();
2626
}));

tslint.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
null,
3232
"kebab-case"
3333
],
34+
"eofline": true,
3435
"import-blacklist": [
3536
true,
3637
"rxjs/Rx"
@@ -83,6 +84,7 @@
8384
true,
8485
"single"
8586
],
87+
"prefer-template": true,
8688
"semicolon": {
8789
"options": [
8890
"always"
@@ -97,6 +99,22 @@
9799
"named": "never"
98100
}
99101
},
102+
"trailing-comma": [
103+
true,
104+
{
105+
"multiline": {
106+
"objects": "never",
107+
"arrays": "always",
108+
"functions": "never",
109+
"typeLiterals": "never"
110+
}
111+
}
112+
],
113+
"typedef": [
114+
true,
115+
"call-signature",
116+
"parameter"
117+
],
100118
"typedef-whitespace": {
101119
"options": [
102120
{

0 commit comments

Comments
 (0)