Rule proposal: Prefer readonly member variables instead of getters that return literal values, or vice versa #1556
Labels
enhancement: new plugin rule
New rule request for eslint-plugin
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
I'm finding a common pattern in our code:
I would like to enforce using simple
readonly
members instead of getter functions:This could also be applied to getter functions that return other literals, such as integers.
Some people prefer the reverse, so the rule should be bidirectional.
The text was updated successfully, but these errors were encountered: