I imagine if you just anchor the basket deep enough in the ground, it'll work whether it's on flat or a hill.
Some places definitely make it work. Hole #15 at Forked Run State Park in Reedsville, OH has one of the pin positions directly on the side of a steep hill. I played it and they didn't seem to have any problems with erosion. Putting on it sure did suck tho