chore(lint): include lint in build process

This commit is contained in:
Antoine CARON 2019-02-05 16:50:05 +01:00 committed by Traefiker Bot
parent f19c497621
commit 54ca0ce34f
2 changed files with 5 additions and 6 deletions

View file

@ -12,3 +12,5 @@ RUN yarn install
COPY . $WEBUI_DIR/ COPY . $WEBUI_DIR/
EXPOSE 8080 EXPOSE 8080
RUN yarn lint

View file

@ -1,14 +1,11 @@
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http'; import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import 'rxjs/add/observable/empty';
import 'rxjs/add/observable/of'; import 'rxjs/add/observable/of';
import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map'; import 'rxjs/add/operator/map';
import 'rxjs/add/operator/retry'; import 'rxjs/add/operator/retry';
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs/Observable';
import { empty } from 'rxjs'; import { EMPTY } from 'rxjs/internal/observable/empty';
import {catchError, retry} from "rxjs/internal/operators";
export interface ProviderType { export interface ProviderType {
[provider: string]: { [provider: string]: {
@ -32,7 +29,7 @@ export class ApiService {
.retry(4) .retry(4)
.catch((err: HttpErrorResponse) => { .catch((err: HttpErrorResponse) => {
console.error(`[version] returned code ${err.status}, body was: ${err.error}`); console.error(`[version] returned code ${err.status}, body was: ${err.error}`);
return Observable.empty(); return EMPTY;
}); });
} }
@ -41,7 +38,7 @@ export class ApiService {
.retry(2) .retry(2)
.catch((err: HttpErrorResponse) => { .catch((err: HttpErrorResponse) => {
console.error(`[health] returned code ${err.status}, body was: ${err.error}`); console.error(`[health] returned code ${err.status}, body was: ${err.error}`);
return Observable.empty(); return EMPTY;
}); });
} }