-
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Labels
Resolution: DuplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Bug Report
Given the following code, ESLint reports functional/prefer-readonly-type rule:
type A = Readonly<[string]>;Expected behavior
No error should be reported as the non-readonly tuple is never actually created since it is immediately being cast into a readonly tuple.
Actual behavior
Autofix replaces the above with:
type A = Readonly<readonly [string]>;Proposed changes
Don't report the rule in this case, or disable auto fix, or remove Readonly<> when adding readonly
Metadata
Metadata
Assignees
Labels
Resolution: DuplicateThis issue or pull request already existsThis issue or pull request already exists