Skip to content

Maybe enable prefer-nullish-coalescing and prefer-optional-chain #2121

@ShadowJonathan

Description

@ShadowJonathan

https://typescript-eslint.io/rules/prefer-nullish-coalescing/

https://typescript-eslint.io/rules/prefer-optional-chain/

These discourage falsy/truthy checking, and actually check for undefined or null.

This'd help if a parameter is number | null/idx?: number, to not branch on 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions