codelyzer: some rules report false positives

I just discovered some weird cases where angular-whitespace complains about:

  • <div fxLayout="column"> (the l - as in the letter L - must be the confusing part)
  • <md-icon *ngIf="isOnline | async; else offline">cloud_off</md-icon>
  • <md-toolbar color="primary"> - might be the same case as the first one
  • <rj-image-filters (queryChange)="updateFilters($event)"></rj-image-filters> - could be the same case with the letter L
  • <!-- Setttings --> - might be the ! sign there, nonetheless, comments should be ignored
  • <md-select [(ngModel)]="timeRangeKey"> - could be the L again
  • *ngIf="query.isUpdating | async as isUpdating" - there’s obviously space there, so not sure what the problem is

And banana-in-a-box:

  • <a md-list-item (click)="navigate(['/resources'])"> - confuses what’s inside the quotes I guess

Finally no-access-missing-member :

  • complains about a prop not existing on the class, but it’s actually a local var
<rj-paginated-resources *ngIf="query"
							#pagination="rjPagination"
							[type]="type"
							[query]="query | async">
	<div fxLayout="row"
		 fxLayoutWrap
		 class="images"
		 padding>
		<ng-container *ngFor="let image of pagination.items | async; trackBy: trackByImage">
			<div class="image">
				<rj-image-card [image]="image"></rj-image-card>
			</div>
		</ng-container>
	</div>
</rj-paginated-resources>

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

@rolandjitsu thanks for pointing this out! I’ll move it to a separate issue. Hopefully we’ll be able to soon clean the glitches and open a PR to Angular CLI with the new features.

I’m still seeing some problems with the check-pipe rule for:

<p *ngIf="(items | async)?.length as length" class="mat-caption">
<span *ngIf="product.propagationTolerance" class="label">&plusmn; {{ product.propagationTolerance | number }}</span>

For the latter, removing &plusmn; seems to fix it.