All answers here suggest disabling the whole eslint rule which is not very practical, a better solution will be to ignore the eslint error at that specific location like this:
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore