Skip to content

Commit

Permalink
fix tslint error (#77)
Browse files Browse the repository at this point in the history
* fix(tslint):  comment must start with a space

* fix(tslint): selector of the directive "ShowAuthedDirective" should have prefix "app"

* chore(tslint): remove deprecated rule of typeof-compare

palantir/tslint#2187

* chore(deps): update devDependency ts-node to v4.1.0

* chore(deps): update devDependency tslint to v5.9.1

* chore(deps): update devDependency @types/node to latest

* chore(deps): update devDependency typescript to v2.6.2
  • Loading branch information
davidc05 committed Mar 6, 2018
1 parent ab08d72 commit cda7a19
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"@types/node": "^9.4.0",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
Expand All @@ -46,8 +46,8 @@
"karma-jasmine-html-reporter": "^0.2.2",
"pre-commit": "^1.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.6.2"
}
}
4 changes: 2 additions & 2 deletions src/app/article/article.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h1>{{ article.title }}</h1>
<div class="row">
<div class="col-xs-12 col-md-8 offset-md-2">

<div *showAuthed="true">
<div *appShowAuthed="true">
<app-list-errors [errors]="commentFormErrors"></app-list-errors>
<form class="card comment-form" (ngSubmit)="addComment()">
<fieldset [disabled]="isSubmitting">
Expand All @@ -111,7 +111,7 @@ <h1>{{ article.title }}</h1>
</form>
</div>

<div *showAuthed="false">
<div *appShowAuthed="false">
<a [routerLink]="['/login']">Sign in</a> or <a [routerLink]="['/register']">sign up</a> to add comments on this article.
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="home-page">

<div class="banner" *showAuthed="false">
<div class="banner" *appShowAuthed="false">
<div class="container">
<h1 class="logo-font">conduit</h1>
<p>A place to share your <i>Angular 2</i> knowledge.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/app/profile/profile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class ProfileComponent implements OnInit {
isUser: boolean;

ngOnInit() {
//TODO: mergeMap here
// TODO: mergeMap here
this.route.data.subscribe(
(data: {profile: Profile}) => {
this.profile = data.profile;
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/buttons/favorite-button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class FavoriteButtonComponent {

toggleFavorite() {
this.isSubmitting = true;
//TODO: remove nested subscribes, use mergeMap
// TODO: remove nested subscribes, use mergeMap
this.userService.isAuthenticated.subscribe(
(authenticated) => {
// Not authenticated? Push to login screen
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/buttons/follow-button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class FollowButtonComponent {

toggleFollowing() {
this.isSubmitting = true;
//TODO: remove nested subscribes, use mergeMap
// TODO: remove nested subscribes, use mergeMap

this.userService.isAuthenticated.subscribe(
(authenticated) => {
Expand Down
4 changes: 2 additions & 2 deletions src/app/shared/layout/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<a class="navbar-brand" routerLink="/">conduit</a>

<!-- Show this for logged out users -->
<ul *showAuthed="false"
<ul *appShowAuthed="false"
class="nav navbar-nav pull-xs-right">

<li class="nav-item">
Expand Down Expand Up @@ -32,7 +32,7 @@
</ul>

<!-- Show this for logged in users -->
<ul *showAuthed="true"
<ul *appShowAuthed="true"
class="nav navbar-nav pull-xs-right">

<li class="nav-item">
Expand Down
4 changes: 2 additions & 2 deletions src/app/shared/show-authed.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {

import { UserService } from './services/user.service';

@Directive({ selector: '[showAuthed]' })
@Directive({ selector: '[appShowAuthed]' })
export class ShowAuthedDirective implements OnInit {
constructor(
private templateRef: TemplateRef<any>,
Expand All @@ -30,7 +30,7 @@ export class ShowAuthedDirective implements OnInit {
);
}

@Input() set showAuthed(condition: boolean) {
@Input() set appShowAuthed(condition: boolean) {
this.condition = condition;
}

Expand Down
1 change: 0 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
"variable-declaration": "nospace"
}
],
"typeof-compare": true,
"unified-signatures": true,
"variable-name": false,
"whitespace": [
Expand Down

0 comments on commit cda7a19

Please sign in to comment.