environment-agency-austria/tslint-eaa-contrib

prefer-readonly: inline lambdas

Closed this issue · 2 comments

TSLint rule prefer-readonly

Shall we allow inline lambdas? The difference would be inside a class were
private toggleInfo = (): void => {... }
would yield an error. The fix would be adding readonly
private readonly toggleInfo = (): void => {... }

I don't really have a preference on that one, except for having the rule itself activated.

I like this solution:
"prefer-readonly": [true, "only-inline-lambdas"]

Since the option does not do that, that we thought, I will disable the rule completely