Skip to content

Commit 7a8a4dd

Browse files
committed
chore: format all files
1 parent 29d5e4e commit 7a8a4dd

File tree

8 files changed

+15
-16
lines changed

8 files changed

+15
-16
lines changed

e2e/protractor.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ exports.config = {
1515
jasmineNodeOpts: {
1616
showColors: true,
1717
defaultTimeoutInterval: 30000,
18-
print: function() {},
18+
print: function () {},
1919
},
2020
onPrepare() {
2121
require('ts-node').register({

src/app/app-routing.module.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ export const routes: Routes = [
77
{ path: '', redirectTo: '/books', pathMatch: 'full' },
88
{
99
path: 'books',
10-
loadChildren: () => import('./books/books.module').then(m => m.BooksModule),
10+
loadChildren: () =>
11+
import('./books/books.module').then((m) => m.BooksModule),
1112
canActivate: [AuthGuard],
1213
},
1314
{ path: '**', component: NotFoundPageComponent },

src/app/auth/services/auth-guard.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class AuthGuard implements CanActivate {
1313

1414
canActivate(): Observable<boolean> {
1515
return this.store.select(AuthStatusState.getLoggedIn).pipe(
16-
map(authed => {
16+
map((authed) => {
1717
if (!authed) {
1818
this.store.dispatch(new LoginRedirect());
1919
return false;

src/app/books/containers/view-book-page.component.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,15 @@ import { Select } from '../store';
2020
@Component({
2121
selector: 'bc-view-book-page',
2222
changeDetection: ChangeDetectionStrategy.OnPush,
23-
template: `
24-
<bc-selected-book-page></bc-selected-book-page>
25-
`,
23+
template: ` <bc-selected-book-page></bc-selected-book-page> `,
2624
})
2725
export class ViewBookPageComponent implements OnDestroy {
2826
actionsSubscription: Subscription;
2927

3028
constructor(store: Store, route: ActivatedRoute) {
3129
this.actionsSubscription = route.params
3230
.pipe(
33-
map(params => new Select(params.id)),
31+
map((params) => new Select(params.id)),
3432
tap((action: Select) => store.dispatch(action))
3533
)
3634
.subscribe();

src/app/books/guards/book-exists.guard.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class BookExistsGuard implements CanActivate {
3636
*/
3737
hasBookInStore(id: string): Observable<boolean> {
3838
return this.store.select(BooksState.getEntities).pipe(
39-
map(entities => entities && !!entities[id]),
39+
map((entities) => entities && !!entities[id]),
4040
take(1)
4141
);
4242
}
@@ -47,9 +47,9 @@ export class BookExistsGuard implements CanActivate {
4747
*/
4848
hasBookInApi(id: string): Observable<boolean> {
4949
return this.googleBooks.retrieveBook(id).pipe(
50-
map(bookEntity => new Load(bookEntity)),
50+
map((bookEntity) => new Load(bookEntity)),
5151
tap((action: Load) => this.store.dispatch(action)),
52-
map(book => !!book),
52+
map((book) => !!book),
5353
catchError(() => {
5454
this.router.navigate(['/404']);
5555
return of(false);
@@ -64,7 +64,7 @@ export class BookExistsGuard implements CanActivate {
6464
*/
6565
hasBook(id: string): Observable<boolean> {
6666
return this.hasBookInStore(id).pipe(
67-
switchMap(inStore => {
67+
switchMap((inStore) => {
6868
if (inStore) {
6969
return of(inStore);
7070
}

src/app/core/containers/app.component.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Logout, AuthStatusState } from '../../auth/store';
1414
<bc-sidenav [open]="showSidenav$ | async">
1515
<bc-nav-item
1616
(navigate)="closeSidenav()"
17-
*ngIf="(loggedIn$ | async)"
17+
*ngIf="loggedIn$ | async"
1818
routerLink="/"
1919
icon="book"
2020
hint="View your book collection"
@@ -23,7 +23,7 @@ import { Logout, AuthStatusState } from '../../auth/store';
2323
</bc-nav-item>
2424
<bc-nav-item
2525
(navigate)="closeSidenav()"
26-
*ngIf="(loggedIn$ | async)"
26+
*ngIf="loggedIn$ | async"
2727
routerLink="/books/find"
2828
icon="search"
2929
hint="Find your next book!"
@@ -33,7 +33,7 @@ import { Logout, AuthStatusState } from '../../auth/store';
3333
<bc-nav-item (navigate)="closeSidenav()" *ngIf="!(loggedIn$ | async)">
3434
Sign In
3535
</bc-nav-item>
36-
<bc-nav-item (navigate)="logout()" *ngIf="(loggedIn$ | async)">
36+
<bc-nav-item (navigate)="logout()" *ngIf="loggedIn$ | async">
3737
Sign Out
3838
</bc-nav-item>
3939
</bc-sidenav>

src/app/core/services/google-books.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class GoogleBooksService {
1414
searchBooks(queryTitle: string): Observable<Book[]> {
1515
return this.http
1616
.get<{ items: Book[] }>(`${this.API_PATH}?q=${queryTitle}`)
17-
.pipe(map(books => books.items || []));
17+
.pipe(map((books) => books.items || []));
1818
}
1919

2020
retrieveBook(volumeId: string): Observable<Book> {

src/karma.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Karma configuration file, see link for more information
22
// https://karma-runner.github.io/1.0/config/configuration-file.html
33

4-
module.exports = function(config) {
4+
module.exports = function (config) {
55
config.set({
66
basePath: '',
77
frameworks: ['jasmine', '@angular-devkit/build-angular'],

0 commit comments

Comments
 (0)