A better idea than using mothballs is to take your leftover soap slivers and put them in a vented plastic bag. You place the bag with seasonal clothes before packing them away. Not only will the scent prevent them from moth harm but also they’ll smell great when you pull them out.
I especially like this for sweaters, which can be difficult to remove the odor of mothballs from. Using soap you simply have a clean smell rather than the smell of an attic