Skip to content

Docs: [no-unnecessary-condition] list of checked expressions is stale #11378

Open
@kirkwaiblinger

Description

@kirkwaiblinger

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

The following expressions are checked:
- Arguments to the `&&`, `||` and `?:` (ternary) operators
- Conditions for `if`, `for`, `while`, and `do-while` statements
- `case`s in `switch` statements
- Base values of optional chain expressions

We also check things like array predicate return types and type predicates now

Affected URL(s)

https://typescript-eslint.io/rules/no-unnecessary-condition

Additional Info

We should either remove this list or update it to be accurate

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updating

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions