I do use small kitchen counter size trash bags to tightly bag up scraps, peels, crumbs and such, because I don't want to get ants.
I guess my moisture offense is to have dishes soaking in the sink, like pans I cooked in, so they'll come clean in the dishwasher.
I just don't understand why most years there are no gnats, at least not indoors, or at least not in my apartment, and this year they are legion. Like I once read that when deer and elk have a bonanza year, with more live births, healthy babies, the wolves that prey on them will also have a bonanza year in terms of population growth, a strange but documented form of unexplained synergy. So what is the synergy that is working for the gnats? We haven't had particularly a lot of rain, no more than usual, which is never a lot in south Texas, and my landlady doesn't use sprin