sindresorhus/eslint-plugin-unicorn
Rule proposal: `prefer-nullish-coalescing`
Chiusa
#471 aperta il 6 dic 2019
help wantednew rule
Metriche repository
- Star
- (5022 stelle)
- Metriche merge PR
- (Merge medio 1g 16h) (399 PR mergiate in 30 g)
Descrizione
https://github.com/tc39/proposal-nullish-coalescing
let foo = (undefined || null) || bar;
// equals
let foo = (undefined || null) ?? bar;
anyway, it not safe for foo || bar -> foo ?? bar, we should use ESLint suggestion api