Skip to content

Commit ae9dbcf

Browse files
author
Fabian Wiles
committed
feat(build): use linting
1 parent 735dbf3 commit ae9dbcf

32 files changed

+76
-81
lines changed

Diff for: e2e/app.po.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { browser, element, by } from 'protractor';
22

33
export class Ng2RealApp {
44
navigateTo() {
5-
return browser.get('/')
5+
return browser.get('/');
66
}
77

88
getParagraphText() {

Diff for: src/app/app.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<layout-header></layout-header>
1+
<app-layout-header></app-layout-header>
22

33
<router-outlet></router-outlet>
44

5-
<layout-footer></layout-footer>
5+
<app-layout-footer></app-layout-footer>

Diff for: src/app/article/article-comment.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component, EventEmitter, Input, Output, OnInit } from '@angular/core';
33
import { Comment, User, UserService } from '../shared';
44

55
@Component({
6-
selector: 'article-comment',
6+
selector: 'app-article-comment',
77
templateUrl: './article-comment.component.html'
88
})
99
export class ArticleCommentComponent implements OnInit {

Diff for: src/app/article/article.component.html

+19-19
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="container">
55
<h1>{{ article.title }}</h1>
66

7-
<article-meta [article]="article">
7+
<app-article-meta [article]="article">
88

99
<span [hidden]="!canModify">
1010
<a class="btn btn-sm btn-outline-secondary"
@@ -20,19 +20,19 @@ <h1>{{ article.title }}</h1>
2020
</span>
2121

2222
<span [hidden]="canModify">
23-
<follow-button
23+
<app-follow-button
2424
[profile]="article.author"
25-
(onToggle)="onToggleFollowing($event)">
26-
</follow-button>
25+
(toggle)="onToggleFollowing($event)">
26+
</app-follow-button>
2727

28-
<favorite-button
28+
<app-favorite-button
2929
[article]="article"
30-
(onToggle)="onToggleFavorite($event)">
30+
(toggle)="onToggleFavorite($event)">
3131
{{ article.favorited ? 'Unfavorite' : 'Favorite' }} Article <span class="counter">({{ article.favoritesCount }})</span>
32-
</favorite-button>
32+
</app-favorite-button>
3333
</span>
3434

35-
</article-meta>
35+
</app-article-meta>
3636
</div>
3737
</div>
3838

@@ -56,7 +56,7 @@ <h1>{{ article.title }}</h1>
5656
<hr />
5757

5858
<div class="article-actions">
59-
<article-meta [article]="article">
59+
<app-article-meta [article]="article">
6060

6161
<span [hidden]="!canModify">
6262
<a class="btn btn-sm btn-outline-secondary"
@@ -72,26 +72,26 @@ <h1>{{ article.title }}</h1>
7272
</span>
7373

7474
<span [hidden]="canModify">
75-
<follow-button
75+
<app-follow-button
7676
[profile]="article.author"
77-
(onToggle)="onToggleFollowing($event)">
78-
</follow-button>
77+
(toggle)="onToggleFollowing($event)">
78+
</app-follow-button>
7979

80-
<favorite-button
80+
<app-favorite-button
8181
[article]="article"
82-
(onToggle)="onToggleFavorite($event)">
82+
(toggle)="onToggleFavorite($event)">
8383
{{ article.favorited ? 'Unfavorite' : 'Favorite' }} Article <span class="counter">({{ article.favoritesCount }})</span>
84-
</favorite-button>
84+
</app-favorite-button>
8585
</span>
8686

87-
</article-meta>
87+
</app-article-meta>
8888
</div>
8989

9090
<div class="row">
9191
<div class="col-xs-12 col-md-8 offset-md-2">
9292

9393
<div *showAuthed="true">
94-
<list-errors [errors]="commentFormErrors"></list-errors>
94+
<app-list-errors [errors]="commentFormErrors"></app-list-errors>
9595
<form class="card comment-form" (ngSubmit)="addComment()">
9696
<fieldset [disabled]="isSubmitting">
9797
<div class="card-block">
@@ -115,11 +115,11 @@ <h1>{{ article.title }}</h1>
115115
<a [routerLink]="['/login']">Sign in</a> or <a [routerLink]="['/register']">sign up</a> to add comments on this article.
116116
</div>
117117

118-
<article-comment
118+
<app-article-comment
119119
*ngFor="let comment of comments"
120120
[comment]="comment"
121121
(deleteComment)="onDeleteComment(comment)">
122-
</article-comment>
122+
</app-article-comment>
123123

124124
</div>
125125
</div>

Diff for: src/app/article/article.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from '../shared';
1313

1414
@Component({
15-
selector: 'article-page',
15+
selector: 'app-article-page',
1616
templateUrl: './article.component.html'
1717
})
1818
export class ArticleComponent implements OnInit {

Diff for: src/app/auth/auth.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h1 class="text-xs-center">{{ title }}</h1>
88
<a [routerLink]="['/login']" *ngIf="authType == 'register'">Have an account?</a>
99
<a [routerLink]="['/register']" *ngIf="authType == 'login'">Need an account?</a>
1010
</p>
11-
<list-errors [errors]="errors"></list-errors>
11+
<app-list-errors [errors]="errors"></app-list-errors>
1212
<form [formGroup]="authForm" (ngSubmit)="submitForm()">
1313
<fieldset [disabled]="isSubmitting">
1414
<fieldset class="form-group">

Diff for: src/app/auth/auth.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ActivatedRoute, Router } from '@angular/router';
55
import { Errors, UserService } from '../shared';
66

77
@Component({
8-
selector: 'auth-page',
8+
selector: 'app-auth-page',
99
templateUrl: './auth.component.html'
1010
})
1111
export class AuthComponent implements OnInit {

Diff for: src/app/editor/editor.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="row">
44
<div class="col-md-10 offset-md-1 col-xs-12">
55

6-
<list-errors [errors]="errors"></list-errors>
6+
<app-list-errors [errors]="errors"></app-list-errors>
77

88
<form [formGroup]="articleForm">
99
<fieldset [disabled]="isSubmitting">

Diff for: src/app/editor/editor.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ActivatedRoute, Router } from '@angular/router';
55
import { Article, ArticlesService } from '../shared';
66

77
@Component({
8-
selector: 'editor-page',
8+
selector: 'app-editor-page',
99
templateUrl: './editor.component.html'
1010
})
1111
export class EditorComponent implements OnInit {

Diff for: src/app/home/home.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ <h1 class="logo-font">conduit</h1>
3535
</ul>
3636
</div>
3737

38-
<article-list [limit]="10" [config]="listConfig"></article-list>
38+
<app-article-list [limit]="10" [config]="listConfig"></app-article-list>
3939
</div>
4040

4141
<div class="col-md-3">

Diff for: src/app/home/home.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Router } from '@angular/router';
44
import { ArticleListConfig, TagsService, UserService } from '../shared';
55

66
@Component({
7-
selector: 'home-page',
7+
selector: 'app-home-page',
88
templateUrl: './home.component.html',
99
styleUrls: ['./home.component.css']
1010
})

Diff for: src/app/profile/profile-articles.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<article-list [limit]="10" [config]="articlesConfig">
2-
</article-list>
1+
<app-article-list [limit]="10" [config]="articlesConfig">
2+
</app-article-list>

Diff for: src/app/profile/profile-articles.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router';
44
import { ArticleListConfig, Profile } from '../shared';
55

66
@Component({
7-
selector: 'profile-articles',
7+
selector: 'app-profile-articles',
88
templateUrl: './profile-articles.component.html'
99
})
1010
export class ProfileArticlesComponent implements OnInit {

Diff for: src/app/profile/profile-favorites.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<article-list [limit]="10" [config]="favoritesConfig">
2-
</article-list>
1+
<app-article-list [limit]="10" [config]="favoritesConfig">
2+
</app-article-list>

Diff for: src/app/profile/profile-favorites.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router';
44
import { ArticleListConfig, Profile } from '../shared';
55

66
@Component({
7-
selector: 'profile-favorites',
7+
selector: 'app-profile-favorites',
88
templateUrl: './profile-favorites.component.html'
99
})
1010
export class ProfileFavoritesComponent implements OnInit {

Diff for: src/app/profile/profile.component.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
<img [src]="profile.image" class="user-img" />
99
<h4>{{ profile.username }}</h4>
1010
<p>{{ profile.bio }}</p>
11-
<follow-button
11+
<app-follow-button
1212
[hidden]="isUser"
1313
[profile]="profile"
14-
(onToggle)="onToggleFollowing($event)">
15-
</follow-button>
14+
(toggle)="onToggleFollowing($event)">
15+
</app-follow-button>
1616
<a [routerLink]="['/settings']"
1717
[hidden]="!isUser"
1818
class="btn btn-sm btn-outline-secondary action-btn">

Diff for: src/app/profile/profile.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ActivatedRoute } from '@angular/router';
44
import { User, UserService, Profile } from '../shared';
55

66
@Component({
7-
selector: 'profile-page',
7+
selector: 'app-profile-page',
88
templateUrl: './profile.component.html'
99
})
1010
export class ProfileComponent implements OnInit {

Diff for: src/app/settings/settings.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<h1 class="text-xs-center">Your Settings</h1>
77

8-
<list-errors [errors]="errors"></list-errors>
8+
<app-list-errors [errors]="errors"></app-list-errors>
99

1010
<form [formGroup]="settingsForm" (ngSubmit)="submitForm()">
1111
<fieldset [disabled]="isSubmitting">

Diff for: src/app/settings/settings.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Router } from '@angular/router';
55
import { User, UserService } from '../shared';
66

77
@Component({
8-
selector: 'settings-page',
8+
selector: 'app-settings-page',
99
templateUrl: './settings.component.html'
1010
})
1111
export class SettingsComponent implements OnInit {

Diff for: src/app/shared/article-helpers/article-list.component.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<article-preview
1+
<app-article-preview
22
*ngFor="let article of results"
33
[article]="article">
4-
</article-preview>
4+
</app-article-preview>
55

6-
<div class="article-preview"
6+
<div class="app-article-preview"
77
[hidden]="!loading">
88
Loading articles...
99
</div>
1010

11-
<div class="article-preview"
11+
<div class="app-article-preview"
1212
[hidden]="loading || results.length">
1313
No articles are here... yet.
1414
</div>

Diff for: src/app/shared/article-helpers/article-list.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Article, ArticleListConfig } from '../models';
44
import { ArticlesService } from '../services';
55

66
@Component({
7-
selector: 'article-list',
7+
selector: 'app-article-list',
88
templateUrl: './article-list.component.html'
99
})
1010
export class ArticleListComponent {
@@ -40,7 +40,7 @@ export class ArticleListComponent {
4040
// Create limit and offset filter (if necessary)
4141
if (this.limit) {
4242
this.query.filters.limit = this.limit;
43-
this.query.filters.offset = (this.limit * (this.currentPage - 1))
43+
this.query.filters.offset = (this.limit * (this.currentPage - 1));
4444
}
4545

4646
this.articlesService.query(this.query)

Diff for: src/app/shared/article-helpers/article-meta.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component, Input } from '@angular/core';
33
import { Article } from '../models';
44

55
@Component({
6-
selector: 'article-meta',
6+
selector: 'app-article-meta',
77
templateUrl: './article-meta.component.html'
88
})
99
export class ArticleMetaComponent {

Diff for: src/app/shared/article-helpers/article-preview.component.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<div class="article-preview">
2-
<article-meta [article]="article">
3-
<favorite-button
2+
<app-article-meta [article]="article">
3+
<app-favorite-button
44
[article]="article"
5-
(onToggle)="onToggleFavorite($event)"
5+
(toggle)="onToggleFavorite($event)"
66
class="pull-xs-right">
77
{{article.favoritesCount}}
8-
</favorite-button>
9-
</article-meta>
8+
</app-favorite-button>
9+
</app-article-meta>
1010

1111
<a [routerLink]="['/article', article.slug]" class="preview-link">
1212
<h1>{{ article.title }}</h1>

Diff for: src/app/shared/article-helpers/article-preview.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component, Input } from '@angular/core';
33
import { Article } from '../models';
44

55
@Component({
6-
selector: 'article-preview',
6+
selector: 'app-article-preview',
77
templateUrl: './article-preview.component.html'
88
})
99
export class ArticlePreviewComponent {

Diff for: src/app/shared/buttons/favorite-button.component.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Article } from '../models';
55
import { ArticlesService, UserService } from '../services';
66

77
@Component({
8-
selector: 'favorite-button',
8+
selector: 'app-favorite-button',
99
templateUrl: './favorite-button.component.html'
1010
})
1111
export class FavoriteButtonComponent {
@@ -16,7 +16,7 @@ export class FavoriteButtonComponent {
1616
) {}
1717

1818
@Input() article: Article;
19-
@Output() onToggle = new EventEmitter<boolean>();
19+
@Output() toggle = new EventEmitter<boolean>();
2020
isSubmitting = false;
2121

2222
toggleFavorite() {
@@ -36,7 +36,7 @@ export class FavoriteButtonComponent {
3636
.subscribe(
3737
data => {
3838
this.isSubmitting = false;
39-
this.onToggle.emit(true);
39+
this.toggle.emit(true);
4040
},
4141
err => this.isSubmitting = false
4242
);
@@ -47,14 +47,14 @@ export class FavoriteButtonComponent {
4747
.subscribe(
4848
data => {
4949
this.isSubmitting = false;
50-
this.onToggle.emit(false);
50+
this.toggle.emit(false);
5151
},
5252
err => this.isSubmitting = false
5353
);
5454
}
5555

5656
}
57-
)
57+
);
5858

5959

6060
}

0 commit comments

Comments
 (0)