Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS2.4, NG 4.2.3 - Pipe operator should be surrounded by one space #343

Closed
intellix opened this issue Jun 20, 2017 · 5 comments
Closed

TS2.4, NG 4.2.3 - Pipe operator should be surrounded by one space #343

intellix opened this issue Jun 20, 2017 · 5 comments

Comments

@intellix
Copy link

Was just testing the new stuff added in 3.1.0 and noticed that the "check-pipe" property never works for me. I've essentially copy/pasted from the tests so they should be supported:

<div>{{ foo + bar | pipe }}</div>

Error:

Warning: Cannot read property 'expression' of undefined

ERROR: /Users/dominicwatson/Sites/stash/xcaf/xc-r2d2/src/app/payment/fees/fees.component.html[1, 18]: The pipe operator should be surrounded by one space on each side, i.e. " | ".

My versions:

tslint: 5.3.2
typescript: 2.4.0
codelyzer: 3.1.0
@angular/cli: 1.1.2
node: 8.0.0
os: darwin x64
@angular/animations: 4.2.3
@angular/cli: 1.1.2
@angular/common: 4.2.3
@angular/compiler: 4.2.3
@angular/compiler-cli: 4.2.3
@angular/core: 4.2.3
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 4.2.3
@angular/http: 4.2.3
@angular/platform-browser: 4.2.3
@angular/platform-browser-dynamic: 4.2.3
@angular/router: 4.2.3
@angular/service-worker: 1.0.0-beta.5
@angular/language-service: 4.2.3
@mgechev
Copy link
Owner

mgechev commented Jun 20, 2017

Hm, there's a spec for this, which passes successfully.

@mgechev
Copy link
Owner

mgechev commented Jun 21, 2017

Got it. That's an external template, right?

@intellix
Copy link
Author

Yep, it was in an external template :) thanks so much

@intellix
Copy link
Author

Still having issues with this one. I'm running 3.1.1 and I'm still getting:

Warning: Cannot read property 'expression' of undefined

On stuff like:

<footer class="game-footer" [ngSwitch]="isUserLoggedIn | async"></footer>

Also, it seems the reported line/columns are wrong for those. I'm getting much less violations though than I did on 3.1.0

@wKoza
Copy link
Collaborator

wKoza commented Jun 22, 2017

check-pipe seems to work only in interpolation.

looks like #346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants