eslint-plugin-functional
eslint-plugin-functional copied to clipboard
Prefer Readonly<T> over readonly keyword
Transferred from jonaskello/tslint-immutable#58
I think we should keep the rule to check for readonly attributes but we could add this somehow as an option or separate rule. Since it would be an addition it would not require a major version increment so we could probably look into it post 1.0.0.
I can think of two ways to go about this:
Option 1
Add an option to the prefer-readonly-type rule called something like style with options keyword (default) and generic (maybe also either/any?).
Option 2 Create a new rule to enforce one style over the other