Leafminers are disgusting pests. They are fly maggots that burrow into the leaves and eat them from the inside out. It looks like this:
As soon as I tried to have spinach in my garden this year, the flies were immediately there trying to lay their gross eggs on it. So I found a solution: I had mesh food covers with my barbeque supplies. I popped them over the spinach and voila! The flies couldn’t get to the spinach.
It also had the added benefit of giving the spinach more shade, which may prolong their growing season.