For example, if I have this line of code:
const subject = collection.city?.person;
if(subject.name === "Jimmy") {
// do something
}
Static analysis tools yell at this line of code, for example, because they deem it "bad use of null-like values." Because if the subject is null, subject.name can't be defined. However, ESLint lets this go thru as a valid code.
Is there a way to configure ESLint to catch these types of errors before it gets to the static analysis tools at build time?