An Angular output is bound under another name than its property
What it finds
An alias gives an output two names, one in templates and one in the class, which readers have to map in their heads, and searches for one miss the other.
Reported are @Output decorators given a string, and output calls given an alias, in Angular classes.
From the rule's source, output_public_name_differs.rs.
import { Component, EventEmitter, Output } from "@angular/core";@Component({ selector: "app-card", template: "" })export class CardComponent { @Output("picked") pick = new EventEmitter<string>();tx0 reports: this output is bound under an alias} Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/ts:output-public-name-differs" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/ts:output-public-name-differs] reason="..."tx0 explain tx0/ts:output-public-name-differs shows the same in the terminal. Found a false positive? Report it.