eslint-plugin-functional icon indicating copy to clipboard operation
eslint-plugin-functional copied to clipboard

Prefer Readonly<T> over readonly keyword

Open RebeccaStevens opened this issue 6 years ago • 2 comments

Transferred from jonaskello/tslint-immutable#58

RebeccaStevens avatar Jul 19 '19 00:07 RebeccaStevens

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.

jonaskello avatar Jul 28 '19 12:07 jonaskello

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

RebeccaStevens avatar Dec 28 '19 13:12 RebeccaStevens