Are you sure it's the earwigs? They mostly eat the dead vegetation around the garden. They also eat aphids, maggots, grubs & most insect eggs. For the most part they don't go for greens until those foods are depleted.
To git rid of em you can use borax. Protect your plants by putting some vaseline around the base, or set out traps. Bamboo or soy sauce/oil.