When a class getter only returns a literal value, it can be replaced with a readonly class field.
Readonly fields are more concise and avoid the overhead of setting up and tearing down a function closure.
This rule only reports getters that return constant literal values (strings, numbers, bigints, booleans, regular expressions, template literals, null).
It does not report getters that return objects, arrays, or functions, as these have different semantics.
If you are writing a TypeScript library intended to be consumed by JavaScript users, you may prefer getters because the readonly modifier is only enforced at compile time.
JavaScript consumers could still modify a readonly field at runtime.