prefer-nullish-coalescing Prefer nullish coalescing when a nullish value selects a fallback A conditional that returns a value when it is non-nullish and a fallback otherwise manually implements nullish coalescing. Instead, you SHOULD use the ?? operator. - Category: style - Level: warning - Fix: automatic - Scope: module Reported function select(value: string | undefined, fallback: string): string { return value !== undefined ? value : fallback; } Accepted function select(value: string | undefined, fallback: string): string { return value ?? fallback; } Prior art - typescript-eslint ยท prefer-nullish-coalescing language/linter/src/rules/style/prefernullishcoalescing.rs:8