If you can't place the compressor outside or in another room, at least place it as far from the painting area as possible.
1. As Milo said, you don't want airborne oil droplets floating around.
2. The pressure switch contacts arc when turning on and especially off.
3. The compressor cooling pulley stirs up dust.
4. Lights on the walls are great, especially when trying to paint down along the rockers.
5. Have a dedicated compressed air outlet just for painting, no air tools. Get a good water separator and use all 3/8 ID hose and fittings.
I've made about every mistake possible so what I know, I learned the hard way.
The pros will have more and better ideas.