The opposite to this phrase is “to do what is right in the eyes of the Lord.” This phrase is Mosaic (Exodus 15:26; Deuteronomy 6:18; Deuteronomy 12:25, Deuteronomy 12:28; Deuteronomy 13:18; Deuteronomy 21:9), but it recurs with great frequency in the Deuteronomic History, especially in evaluations of and exhortations to the monarchies and in Jeremiah 34:15.
6 In those days there was no king in Israel. Everyone did what was right in his own eyes.