A person being committed to doing what is evil is spoken of as if that person had sold himself to evil. See how you translated this idea in [1 Kings 21:20](../21/20.md). Alternate translation: "who dedicated himself to doing what was evil" (See: [[rc://en/ta/man/translate/figs-metaphor]])
The phrase, "in the sight of" refers to someone's opinion. See how you translated this in [1 Kings 11:6](../11/06.md). Alternate translation: "what Yahweh considers to be evil" (See: [[rc://en/ta/man/translate/figs-metaphor]])