Even Superman had to worry about kryptonite and onions have a whole handful of pests adapted especially for eating up onions. Onion flies are a good example, and they’ll lay their eggs in onions and onion maggots will spring up and eat their way out. Other pests include stem and bulb eelworms, nematodes, and thrips, so when you are choosing companions, try to avoid ones that suffer from these same pests, or you’ll just end up attracting more of them to both plants!