What is wrong with renaming an input property? If I have the following component
@Component({
selector: 'sc-heading',
templateUrl: './sc-heading.component.html',
styleUrls: ['./sc-heading.component.scss']
})
export class ScHeadingComponent {
@Input()
title: string;
@Input()
class: string;
@Input('columns')
set columnsSet(value: string | number) {
if (typeof value === 'string') {
this.columns = parseInt(value, 10);
} else {
this.columns = value;
}
}
columns = 1;
}
What is wrong with having an override for the columns property setter so it can take a string as an input and parse it? I have just switched over to angular-eslint and it has a rule @angular-eslint/no-input-rename which is causing this to error. I use this in multiple spots so I was wondering if there is anything wrong with this practice before I go and disable the rule.