Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler-cli): nullish coalescing check fixes #44862

Closed
wants to merge 2 commits into from

Commits on Jan 27, 2022

  1. fix(compiler-cli): accept nullish coalescing operator for any and unk…

    …nown types
    
    We should not make assumptions about the any and unknown types; using a nullish
    coalescing operator is acceptable for those.
    JoostK committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    80a2f89 View commit details
    Browse the repository at this point in the history
  2. fix(compiler-cli): enable nullish coalescing check only with `strictN…

    …ullChecks`
    
    TypeScript configures `strictNullChecks` to be disabled by default, so the nullish
    coalescing check should follow the same default. The rule actively depends on
    `strictNullChecks`, as TypeScript doesn't include `null`/`undefined` in its types
    otherwise so the check wouldn't have a way to differentiate between them.
    
    This commit also takes the `strict` flag into account when `strictNullChecks` itself
    is not configured.
    JoostK committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    4291616 View commit details
    Browse the repository at this point in the history