"It can be as close to the house as you want it, just moving it further
away for some is better. If you flood get it far away or let it run downhill. I dont flood so mine extis just out the wall on one pump. "
This is very bad advice. I wouldn't say 20 ft is an absolute minimum, but discharging sump pump water right at the foundation is nuts. You want all water to be directed away from the house, whether it's rain water or sump pump water.