i tried to use optional chaining in javascript but my eslint rules causing error .
Error : Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError no-unsafe-optional-chaining
const { homeAddress, officeAddress} = Employee?.addresses;
Error : Unsafe arithmetic operation on optional chaining. It can result in NaN no-unsafe-optional-chaining
const AddressesCount = homeAddress?.length + officeAddress?.length
how can I fix this issue ? I do not want to violate the rule