$MO$ for the fluorine molecule, the $14$ valence electrons of the fluorine atoms fill $4$ bonding and $3$ anti-bonding orbital thus bond order is $1 $.
Bond order $=\frac{\text { bonding electrons }-\text { anti - bonding electrons }}{2}$
In the same way $O _{2}^{2-}$ has $2 \times(6)+2=14 e^{-}$