For 1 by X, a medium cage has enough capacity (11-42 needs only 31).
Refer here for details of compatibility between different drive line equipment.
Using an 11 speed derailleur with a ratio of 1.1 vs 10 speed is 1.2, with a cable pull of 3.4mm, across 9 shifts, gives an error of 3mm. If you have have the derailleur perfect in the center, you are out by 1.5mm at the outer cogs, which is getting to be a little far out for my liking. Many say it works, but I have seen no one report back after the chain, cassette and cables are no longer new and shiny and in perfect working order. However, I have also heard and suspect it to be true, that the M8000 provides a better 10 speed 11-42 setup than a 10 Speed derailleur.
Better alternates to the M8000 if you don't want to go to 11 speed are third party upgrades to your 10 speed derailleur, e.g. Rad Cage, Goatlink, or both.
I looked at going 1x for my 3x10, and decided it was either go the whole hog and do it properly with 1x11 or stick with what I had.