Octet rule said that an atom can have the highest eight electrons in its shell. If there are eight electrons or if an atom completes its octet, it becomes stable.
Noble gases have a stable electronic configuration as their octet is complete. They cannot accept more electrons.
Electron affinity is the energy released when an isolated atom gains an electron. Since noble gases cannot accept electrons, their electron affinity is zero.
Therefore, noble gases have zero electron affinity.