Skip to content

Configs: [no-unnecessary-type-conversion] add to strict-type-checked ruleset #11374

Open
@skondrashov

Description

@skondrashov

Before You File a Proposal Please Confirm You Have Done The Following...

Description

I feel like the same reasoning applies as for something like no-unnecessary-condition. It seems like the strict-type-checked ruleset is for projects where types can be trusted, and in those projects, it makes sense to forbid any kind of type guard, assertion, or really any code without side effects unrelated to types, and that clearly includes this rule.

Impacted Configurations

Just strict-type-checked, I believe.

Additional Info

I proposed/helped write the rule, so I'm of course biased.

I don't know the considerations for adding a rule to a preset configuration, but assuming risk is a factor, I think that even though the rule is only a couple of months old, it is based heavily on existing code, I have been using it myself without issues, and there has only been one minor bug report for it (#11192), so it seems safe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginpreset config changeProposal for an addition, removal, or general change to a preset configtriageWaiting for team members to take a look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions