Moths are nasty pests & mothballs are just as nasty.
Mothballs often contain a compound called para-dichlorobenzene. This is harmful to moths but also harmful to you as it is a carcinogen. A much safer alternative is to choose lavender or cedarwood. The scent of these items will help keep moths away.