Fix lint: replace != null with !== null && !== undefined
oxlint enforces eqeqeq; the five != null checks in mls.ts were flagged. https://claude.ai/code/session_01WhzXHpv6taXdHzhgvnv83u
This commit is contained in:
parent
9ae5bd4cf6
commit
1598be4e9e
1 changed files with 5 additions and 5 deletions
|
|
@ -131,7 +131,7 @@ export class MlsStandingsAdapter implements StandingsSyncAdapter {
|
||||||
|
|
||||||
const playoffSeedStat = sm.get("playoffSeed");
|
const playoffSeedStat = sm.get("playoffSeed");
|
||||||
const conferenceRank =
|
const conferenceRank =
|
||||||
playoffSeedStat?.value != null
|
playoffSeedStat?.value !== null && playoffSeedStat?.value !== undefined
|
||||||
? Math.round(playoffSeedStat.value)
|
? Math.round(playoffSeedStat.value)
|
||||||
: playoffSeedStat?.displayValue
|
: playoffSeedStat?.displayValue
|
||||||
? parseInt(playoffSeedStat.displayValue, 10) || undefined
|
? parseInt(playoffSeedStat.displayValue, 10) || undefined
|
||||||
|
|
@ -146,10 +146,10 @@ export class MlsStandingsAdapter implements StandingsSyncAdapter {
|
||||||
wins: Math.round(wins),
|
wins: Math.round(wins),
|
||||||
losses: Math.round(losses),
|
losses: Math.round(losses),
|
||||||
ties: Math.round(ties),
|
ties: Math.round(ties),
|
||||||
tablePoints: tablePoints != null ? Math.round(tablePoints) : undefined,
|
tablePoints: tablePoints !== null && tablePoints !== undefined ? Math.round(tablePoints) : undefined,
|
||||||
goalsFor: goalsFor != null ? Math.round(goalsFor) : undefined,
|
goalsFor: goalsFor !== null && goalsFor !== undefined ? Math.round(goalsFor) : undefined,
|
||||||
goalsAgainst: goalsAgainst != null ? Math.round(goalsAgainst) : undefined,
|
goalsAgainst: goalsAgainst !== null && goalsAgainst !== undefined ? Math.round(goalsAgainst) : undefined,
|
||||||
goalDifference: goalDifference != null ? Math.round(goalDifference) : undefined,
|
goalDifference: goalDifference !== null && goalDifference !== undefined ? Math.round(goalDifference) : undefined,
|
||||||
winPct: gamesPlayed > 0 ? wins / gamesPlayed : 0,
|
winPct: gamesPlayed > 0 ? wins / gamesPlayed : 0,
|
||||||
gamesPlayed,
|
gamesPlayed,
|
||||||
conference: normalizeConference(conference),
|
conference: normalizeConference(conference),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue