there are many issues open concerning the check-pipe rule. IMO, this problems are unsolvable without introduce other risks.
@mgechev , what do you think about drop once and for all this rule ?
I believe the Angular team is working on making the compiler with a friendlier API, especially for template references.
I'd suggest to remove it from the README.md file. If we drop it completely (or remove the check-pipe config option), this will be a breaking change so we'll have to release version 5 as well.
hmm, friendlier API ? good news ! indeed, it would be a breaking change. it may not be the right moment, yes. But, meanwhile, some people are waiting for an answer to these problems. I think we need to provide a answer to these people.
BTW, We have remove this option from the README.mdbut It's inconsistent with the tslint doc where we talk about it. It can be confusing.
We can drop if from master, generate the docs and push it to GitHub Page. We should remember to re-enable it if we push minor/patch versions.
Perhaps instead of removing it from the docs, you could document that it has been removed. That way, developers trying to use the check-pipe who are looking at the docs won't be scratching their heads wondering where it is and need to search around to find this issue in order to figure out what happened to it.
@jaufgang I think I just had an issue when I thoughtlessly copied a config file and somehow managed to replace parts of my ts code with }}{}{}}{}}}{} scratches head 馃
I still managed to accidentally copy this from some version of docs(?) with check-pipe and ended up breaking my code
"angular-whitespace": [
true,
"check-interpolation",
"check-pipe",
"check-semicolon"
],
Also this one is pretty funny:
export class TestListVie { { { {{{ ; }} }} }}t; {
@Inpu { {{{ { { o; }} { }}ay: str; }}g[];
From one of my view components run through the fixer a couple times.
I'm just going to rely on the IDE for moustache-y whitespace for now. 馃ぃ
https://github.com/mgechev/codelyzer/issues/335#issuecomment-403333989
@Component({
selector : 'hero-list',
templateUrl: 'hero-list.html' // << this is normal
})
export class HeroListComponent { // << this is normal
became
@Component({
selector : 'hero-list',
templateUrl: 'hero-list.h{{ l', // << oops
})
}}port class HeroListComponent { // << oops
In a generated snippet
// Angular calls its ngOnChanges() method whenever it detects changes to input properties
ngOnChanges(changes: SimpleChanges): void {
//Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
//Add '${implements OnChanges}' to the class.
console.log('address-form::inputngOnChange', changes);
}
became
// {{ gular }}alls its ngOnChanges() method whenever it detects changes to input properties
ngOnChanges(changes: SimpleChanges): void {
// Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
// Add '${implements OnChanges}' to the class.
console.log('address-form::inputngOnChange', changes);
}
regex?
Most helpful comment
Perhaps instead of removing it from the docs, you could document that it has been removed. That way, developers trying to use the
check-pipewho are looking at the docs won't be scratching their heads wondering where it is and need to search around to find this issue in order to figure out what happened to it.