Let linting exit with a nonzero status

This commit is contained in:
courtneypattison
2017-11-29 14:08:11 -08:00
parent b906fb2ef1
commit 7083503ccd
7 changed files with 10 additions and 15 deletions

View File

@@ -64,7 +64,7 @@
"test:watch": "karma start --no-single-run --auto-watch", "test:watch": "karma start --no-single-run --auto-watch",
"webdriver:start": "node node_modules/protractor/bin/webdriver-manager start --seleniumPort 4444", "webdriver:start": "node node_modules/protractor/bin/webdriver-manager start --seleniumPort 4444",
"webdriver:update": "node node_modules/protractor/bin/webdriver-manager update --standalone", "webdriver:update": "node node_modules/protractor/bin/webdriver-manager update --standalone",
"lint": "tslint \"src/**/*.ts\" || true && tslint \"e2e/**/*.ts\" || true", "lint": "tslint \"src/**/*.ts\" && tslint \"e2e/**/*.ts\"",
"docs": "typedoc --options typedoc.json ./src/", "docs": "typedoc --options typedoc.json ./src/",
"coverage": "http-server -c-1 -o -p 9875 ./coverage" "coverage": "http-server -c-1 -o -p 9875 ./coverage"
}, },

View File

@@ -41,7 +41,7 @@ describe('SearchFacetFilterComponent', () => {
} }
]; ];
let filterService; let filterService;
let page = Observable.of(0) const page = Observable.of(0)
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, FormsModule], imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, FormsModule],
@@ -147,8 +147,8 @@ describe('SearchFacetFilterComponent', () => {
it('should return the correct number of items shown (this equals the page count x page size)', () => { it('should return the correct number of items shown (this equals the page count x page size)', () => {
const sub = count.subscribe((c) => { const sub = count.subscribe((c) => {
const subsub = comp.currentPage.subscribe((page) => { const subsub = comp.currentPage.subscribe((currentPage) => {
expect(c).toBe(page * mockFilterConfig.pageSize); expect(c).toBe(currentPage * mockFilterConfig.pageSize);
}); });
subsub.unsubscribe() subsub.unsubscribe()
}); });
@@ -188,4 +188,4 @@ describe('SearchFacetFilterComponent', () => {
expect(filterService.getPage).toHaveBeenCalledWith(mockFilterConfig.name) expect(filterService.getPage).toHaveBeenCalledWith(mockFilterConfig.name)
}); });
}); });
}); });

View File

@@ -166,6 +166,4 @@ describe('SearchFilterComponent', () => {
sub.unsubscribe(); sub.unsubscribe();
}); });
}); });
}); });

View File

@@ -109,10 +109,10 @@ describe('SearchPageComponent', () => {
}); });
describe('when update search results is called', () => { describe('when update search results is called', () => {
let pagination; let paginationUpdate;
let sort; let sortUpdate;
beforeEach(() => { beforeEach(() => {
pagination = Object.assign( paginationUpdate = Object.assign(
{}, {},
new PaginationComponentOptions(), new PaginationComponentOptions(),
{ {
@@ -120,7 +120,7 @@ describe('SearchPageComponent', () => {
pageSize: 15 pageSize: 15
} }
); );
sort = Object.assign({}, sortUpdate = Object.assign({},
new SortOptions(), new SortOptions(),
{ {
direction: SortDirection.Ascending, direction: SortDirection.Ascending,

View File

@@ -15,6 +15,4 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
export class SearchSidebarComponent { export class SearchSidebarComponent {
@Input() resultCount; @Input() resultCount;
@Output() toggleSidebar = new EventEmitter<boolean>(); @Output() toggleSidebar = new EventEmitter<boolean>();
constructor() {
}
} }

View File

@@ -10,7 +10,6 @@ import { HeaderComponent } from './header.component';
import { HeaderState } from './header.reducer'; import { HeaderState } from './header.reducer';
import { HeaderToggleAction } from './header.actions'; import { HeaderToggleAction } from './header.actions';
let comp: HeaderComponent; let comp: HeaderComponent;
let fixture: ComponentFixture<HeaderComponent>; let fixture: ComponentFixture<HeaderComponent>;
let store: Store<HeaderState>; let store: Store<HeaderState>;

View File

@@ -18,7 +18,7 @@ export class RouteService {
} }
hasQueryParam(paramName: string): Observable<boolean> { hasQueryParam(paramName: string): Observable<boolean> {
return this.route.queryParamMap.map((map) => {return map.has(paramName);}); return this.route.queryParamMap.map((map) => map.has(paramName));
} }
hasQueryParamWithValue(paramName: string, paramValue: string): Observable<boolean> { hasQueryParamWithValue(paramName: string, paramValue: string): Observable<boolean> {