Just to clarify I realize when a companion starts shooting obviously I will get detected, but I mean just while sneaking around if I have 100 stealth will it matter if my companion is with me?
If your companion is seen than most likely yes - it will affect your sneaking. But you can always tell them to wait somewhere else or follow from a distance.
Enemies find companions first for me. I tend to secure an area and ask them to wait so they don't mess up my stealth so badly. I only have them around for the carry weight and perks.