Skip to content

Apply 'no-unnecessary-type-assertion' lint rule#22005

Merged
5 commits merged intomasterfrom
no-unnecessary-type-assertion
Feb 17, 2018
Merged

Apply 'no-unnecessary-type-assertion' lint rule#22005
5 commits merged intomasterfrom
no-unnecessary-type-assertion

Conversation

@ghost
Copy link

@ghost ghost commented Feb 16, 2018

A lot of type assertions have become unnecesary as we added stricter node types. This lint rule prevents us from writing x as T if the type of x is already assignable to T.
Required changing no-unnecessary-type-assertion to ignore x! since we don't have --strictNullChecks yet -- made a pull request upstream at palantir/tslint#3724.
Also switches us to using the --project tslint option. This increases lint time from about 13 to 19.5 seconds.

@ghost ghost merged commit b3edc8f into master Feb 17, 2018
@ghost ghost deleted the no-unnecessary-type-assertion branch February 17, 2018 02:38
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant