Enhancement: [no-unnecessary-type-conversion] Treat Object.values(array) as an unnecessary type conversion #10941
Closed
4 tasks done
Labels
duplicate
This issue or pull request already exists
enhancement: plugin rule option
New rule option for an existing eslint-plugin rule
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Proposal Please Confirm You Have Done The Following...
My proposal is suitable for this project
Link to the rule's documentation
#10182
Description
As an enhancement of the no-unnecessary-type-conversion rule proposed in #8515 and implemented in #10182, I propose that
Object.values(array)
be treated as an unnecessary type conversion as the expression can be simplified to justarray
.Examples:
I have discovered
Object.values(array)
within my own projects, it is possible this unnecessary type coercion exists elsewhere too.Fail
Pass
Additional Info
No response
The text was updated successfully, but these errors were encountered: