Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Have Strict Enabled, Getting "strict-type-predicates does not work without --strictNullChecks" #3347

Closed
cretz opened this issue Oct 19, 2017 · 3 comments

Comments

@cretz
Copy link

cretz commented Oct 19, 2017

Bug Report

  • TSLint version: 5.7.0
  • TypeScript version: 2.5.3
  • Running TSLint via: CLI

I run tslint -p . in a dir w/ a tsconfig.json that has "strict": true, but I am getting this:

strict-type-predicates does not work without --strictNullChecks

I see in #2786 that it should check for that. Am I missing something?

@cretz
Copy link
Author

cretz commented Oct 19, 2017

For an example, clone https://github.com/cretz/awss/tree/05eb0c7adb22fb4feab92c1f190a752f8cfec921, cd to proj, and run npm run lint

@ajafff
Copy link
Contributor

ajafff commented Oct 19, 2017

strict is a compilerOption, it's not correct in the top level of your tsconfig.json. It should look like this:

{
    "compilerOptions": {
        "strict": true
    }
}

@cretz
Copy link
Author

cretz commented Oct 19, 2017

My mistake, thanks!

@cretz cretz closed this as completed Oct 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants