Last night, I had a Swarm of Bats sharing a space with one of my PCs, and two of the others used spells against it: Fire Bolt and Poison Spray. The question came up asking if it would affect the PC sharing the space with the swarm. At the time, I ruled
no, since they're not area affects, and I default to permissive during play so I can spend the time researching rules after.
However, I can't find any sources on what happens in this situation. It seems to make sense that at least Poison Spray would affect the swarmed PC, but I can't find any sources one way or another. Is there anything definitive anywhere? If not, it seems like, RAW, it wouldn't, since, again, not area effects.