La Genèse 36:31 Midrash : Mekhilta DeRabbi Yishmael, Shemot Rabbah, Sefer HaYashar (midrash) & Midrash Aggadah

וְאֵ֙לֶּה֙ הַמְּלָכִ֔ים אֲשֶׁ֥ר מָלְכ֖וּ בְּאֶ֣רֶץ אֱד֑וֹם לִפְנֵ֥י מְלָךְ־מֶ֖לֶךְ לִבְנֵ֥י יִשְׂרָאֵֽל׃

Ce sont ici les rois qui régnèrent dans le pays d’Édom, avant qu’un roi régnât sur les enfants d’Israël.

Mekhilta DeRabbi Yishmael

(Exodus 15:14) "Peoples heard — they quaked": When the peoples heard that Pharaoh and his hosts were lost in the sea, that the rule of Egypt had ended, and that their idolatry had been overthrown, they began quaking, this being the thrust of "Peoples heard; they quaked." Variantly: "Peoples heard; they quaked": When the peoples heard that the Holy One Blessed be He had lifted the horn of Israel and brought them into Eretz Yisrael, they began quaking — at which the Holy One Blessed be He said to them: Fools that you are. Many kings reigned before Me (i.e., in My presence) and Israel was not wrathful (against them), viz. (Genesis 36:31) "And these are the kings that reigned in the land of Edom." And many rulers arose from you, and Israel was not wrathful, viz. (Ibid. 29) "Chief Lotan, Chief Shoval." And now you grow wrathful! I, likewise, will give you "wrath" not to your liking, viz. (Psalms 99:1) "The L–rd reigns — let the peoples quake!"...

Shemot Rabbah

Another interpretation: “The Lord spoke to Moses and to Aaron” – that is what is written: “The voice of my beloved, behold, he is coming” (Song of Songs 2:8). When Moses went and said to Israel: ‘So said the Holy One blessed be He to me: “Today you are leaving, in the month of spring”’ (Exodus 13:4), they said to him: ‘Where is He?’ He said to them: ‘He is about to arrive: “The voice of my beloved, behold, he is coming, [leaping upon the heights, bounding upon the hills]”’ (Song of Songs 2:8). Rabbi Yehuda said: What is “leaping upon the heights?” The Holy One blessed be He said: If I scrutinize the actions of Israel they will never be redeemed. Rather, at whom will I look? At their saintly forefathers, as it is stated: “Moreover, I have heard the cry of the children of Israel…[and I have remembered my covenant]” (Exodus 6:5)9The covenant was made with the patriarchs. – on the merit of their forefathers I am redeeming them. Therefore, it is written: “Leaping upon the heights,” and heights mean nothing other than the forefathers, as it is stated: “Hear, O heights, the Lord’s grievance [and the mighty ones, foundations of the earth]” (Micah 6:2).10 Eitanim, meaning mighty ones, is a term that the Sages used for the patriarchs.
Another interpretation: Rabbi Neḥemya said: What is “leaping upon the heights?” [It is not to be understood literally.] Rather, the Holy One blessed be He said: Israel does not have deeds that would warrant their being redeemed, except by the merit of the elders, as it is stated: “Go, and gather the elders of Israel” (Exodus 3:16), and heights are nothing other than the elders, as Yiftaḥ’s daughter says to her father: “I will go down in the heights” (Judges 11:37). Was she going to the heights? Rather, she was saying: To the elders, as she was going to show the elders that she was a pure virgin.11She therefore did not deserve the fate decreed for her by her father’s vow. That is why it is written: “Leaping upon the heights.”
Another interpretation: Rabbi Elazar said: What is “leaping upon the heights”? The Holy One blessed be He said: I arranged for Esau that he would establish kings, as it is stated: “These are the kings who reigned in the land of Edom” (Genesis 36:31). If I allow Esau to establish more kings, how will Israel survive? Rather, I will supplant them and render them chieftains, as it is stated: “These are the chieftains of the sons of Esau” (Genesis 36:15).12The midrash is reading the verses out of chronological order, as if the chieftains came after the kings. Heights mean nothing other than idolaters, as it is stated: “Behold, four chariots13The chariots represent four idolatrous nations. are emerging from between the two heights” (Zechariah 6:1).

Sefer HaYashar (midrash)

And those animals mounted the asses and rode away with them and they were not to be ‎found to this very day.‎‏ ‏And one of those animals approached Anah and dealt him a blow with ‎its tail and fled from the place.‎‏ ‏And when he saw these things he was greatly afraid of his life, ‎and he too fled and escaped to the city.‎‏ ‏And he related unto his father and brothers all that ‎hath befallen him and many men went in search of the asses but they could not find them.‎‏ ‏And Anah and his brothers never dared to approach that place again for they were in great ‎fear of their lives.‎‏ ‏And the children of Anah the son of Seir were: Dishon and his sister ‎Ahlibamah, and the children of Dishon were: Hemdan, and Eshban, and Ithran and Cheran; and ‎the children of Ezer were: Bilhan, and Zaavan, and Akan, and the children of Dishan were: Uz ‎and Aran. These are the families of the children of Seir the Horite, according to their dukes in ‎the land of Seir.‎‏ ‏And Esau with his children dwelt in the land of Seir the Horite, the inhabitants ‎of the land, and they acquired possessions in it and they were fruitful and multiplied ‎exceedingly.‎‏ ‏And Jacob with his children and all belonging to him dwelt with Isaac their father ‎in the land of Canaan, as the Lord had commanded unto Abraham their father.‎‏ ‏And it came to ‎pass in the one hundred and fifth year of Jacob's life, which was the ninth year of his dwelling ‎in the land of Canaan after his return from Padan-Aram, that Jacob journeyed with his children ‎from Hebron, and they went along and reached the city of Shechem, and they located there, ‎for the sons of Jacob found good and fat pasture for their cattle in Shechem.‎‏ ‏And the city of ‎Shechem had been rebuilt at that time, and there were in her about three hundred men and ‎women.‎‏ ‏And when Jacob and his sons with all belonging to them came back, they dwelt in the ‎parcel of the land which Jacob had bought from Hamor, when he arrived there from Padan-‎Aram, long before Simeon and Levi had destroyed the city.‎‏ ‏And when the kings of the ‎Canaanites and the Amorites around the city of Shechem heard that Jacob and his sons ‎returned to Shechem to dwell therein, they said: Shall Jacob and his sons be permitted to ‎dwell again in this city after having slain and driven away its inhabitants, to come once again to ‎kill and drive away the people now living in the city? And all of the Canaanitish kings assembled ‎once more to fight with Jacob and his sons.‎‏ ‏And Jashub king of Tapuah sent also to all the kings ‎that were around him, to Elan king of Gaash, and to Thuri king of Shiloh, and to Parathon, king ‎of Hazar, and to Susy king of Sarton, and to Laban king of Beth-horan, and to Shabir king of ‎Othnaimah, saying: Come up to my assistance, and we will smite the Hebrew and his sons and ‎all belonging to him, for they have come once more to Shechem, to take possession thereof ‎and to slay its inhabitants as heretofore.‎