Tslint: Have Strict Enabled, Getting "strict-type-predicates does not work without --strictNullChecks"

Created on 19 Oct 2017  ·  3Comments  ·  Source: palantir/tslint

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?

Not A Bug

Most helpful comment

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

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

All 3 comments

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

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

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

My mistake, thanks!

Was this page helpful?
0 / 5 - 0 ratings