I made a covenant with mine eyes; rather, for mine eyes. The covenant must have been with himself. Job means that be came to a fixed resolution, by which he thenceforth guided his conduct, not even to "look upon a woman to lust after her" (Matthew 5:28).
We must suppose this resolution come to in his early youth, when the passions are strongest, and when so many men go astray. How then should I look upon a maid! Having made such a resolution, how could I possibly break it by "looking upon a maid"?
Job assumes that he could not be so weak as to break a solemn resolution.