This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
Rule no-unnecessary-type-assertion doesn't work if tsconfig has "strict": true
#4840
Labels
Bug Report
Rule no-unnecessary-type-assertion doesn't work if your
tsconfig.json
has"strict": true
. It was made so that it only works if you have"strictNullChecks": true
but should also work for"strict": true
since that covers all strict rules.Bug introduction: b836f28#diff-2237d1e758ab18614b7d976b89e56ea0R53
Strict rule explanation: https://www.typescriptlang.org/docs/handbook/compiler-options.html
Note, will fix this myself so PR incoming.
Reproduction using TSLint Playground
Playground doesn't allow you to change the tsconfig?
TypeScript code being linted
tsconfig.json
Code
with
tslint.json
configuration:Actual behavior
No errors.
Expected behavior
An error!
The text was updated successfully, but these errors were encountered: