ESLint keeps flagging my object as potentially null despite having an if statement to check for it.
const user: User | null = getUser()
if (user) { // if (user !== null) doesn't work either
await user.updateProfile({
displayName: this.displayName
})
}
Sometimes the error appears while other times it disappears, making it difficult to address consistently. I would like to completely disable this specific rule in ESLint, but I can't seem to identify its name.
What is the ESLint rule name associated with this issue, or is there another method to deactivate it?