If an eclipse happens at the time of Jumu‘ah prayer, which prayer should be done first?
Question

                What is the ruling if the time of an eclipse coincides with the time of Jumu‘ah prayer?
Praise be to Allah.
      Firstly: 

    If the sun is eclipsed on a Friday, if that occurs before 
    Jumu‘ah at a time when there is sufficient time to do the ordinary eclipse 
    prayer (salaat al-kusoof), such as if the eclipse occurs in the forenoon or 
    close to it, then you should start with the eclipse prayer, then pray 
    Jumu‘ah at the proper time. If the eclipse occurs at the time of Jumu‘ah, if 
    there is the fear that Jumu‘ah prayer may be missed, then Jumu‘ah should be 
    done first, according to scholarly consensus. 

    If there is no risk of it being missed, then the majority of 
    scholars are of the view that the eclipse prayer should be done first. The 
    Hanbalis follow the view that was favoured by Ibn Qudaamah (may Allah have 
    mercy on him), that Jumu‘ah should be done first, because starting with the 
    eclipse prayer may lead to hardship for some people, because it will lead to 
    keeping people back for the sake of praying the eclipse prayer and 
    compelling them to pray it, when it is not obligatory in the first place. 

    Ibn Qudaamah (may Allah have mercy on him) said in al-Mughni 
    (2/146):

    if two prayers occur at the same time, such as the eclipse 
    prayer with another prayer such as Jumu‘ah or Eid or one of the obligatory 
    prayers or Witr, then people should start with the one which they are more 
    afraid of missing. If there is the fear that they may miss both, then they 
    should start with the obligatory prayer. If neither of them is obligatory, 
    such as the eclipse prayer and Witr or Taraweeh, then they should start with 
    the one which is more emphasised. For example, in the case of the eclipse 
    prayer and Witr, they should start with the eclipse prayer, because it is 
    more emphasised, and for that reason it is Sunnah to offer it in 
    congregation; moreover, Witr may be made up later on but the eclipse prayer 
    cannot be made up later on. 

    If Taraweeh and the eclipse prayer coincide, then which of 
    them should be done first? There are two points of view concerning this. The 
    view of our companions, and the correct view in my opinion, is that the 
    obligatory prayer that is offered in congregation takes precedence over the 
    eclipse prayer in all situations, because giving precedence to the eclipse 
    prayer over it will cause hardship and will require the people present to 
    offer the eclipse prayer even though it is not obligatory upon them, and 
    will force them to wait for the obligatory prayer, even though among them 
    there may be those who are physically weak, elderly or have needs to attend 
    to. The Prophet (blessings and peace of Allah be upon him) instructed us to 
    make the obligatory prayer brief, so that it would not cause undue hardship 
    to those who are praying in congregation behind the imam. Hence it is more 
    appropriate to say that we should not cause hardship by offering this 
    lengthy and difficult prayer, even though it is not obligatory. The same 
    ruling applies if it coincides with Taraweeh prayer; Taraweeh should be 
    given precedence for the same reason. If the eclipse prayer coincides with 
    Witr at the beginning of the time for Witr, it should be given precedence, 
    because Witr  will not be missed; if there is the fear that Witr will be 
    missed, precedence should be given to Witr, because it is brief and can be 
    done easily, and one can still catch up with the time of the eclipse prayer. 
    If there is no time left except as much is needed to do Witr, then there is 
    no need to undertake the eclipse prayer, because it has occurred at a time 
    when prayer is not allowed. If the eclipse coincides with the time of a 
    funeral prayer, the funeral prayer should be given precedence according to 
    scholarly consensus, because there is concern for the deceased. And Allah 
    knows best. End quote. 

    An-Nawawi (may Allah have mercy on him) said in al-Majmoo‘ 
    (5/61): ash-Shaafa‘i and his companions (may Allah have mercy on them) said: 
    When two prayers coincide, precedence should be given to the one that it is 
    feared may be missed, then that which is most emphasised. If Eid and the 
    eclipse prayer coincide, or Jumu‘ah and the eclipse prayer, and there is the 
    fear that the Eid prayer or Jumu‘ah prayer may be missed because there is 
    not enough time, then precedence should be given to the Eid or Jumu‘ah 
    prayer, because they are more emphasised than the eclipse prayer. If there 
    is no fear of missing them, then the more correct view, which was stated 
    categorically by the author [Abu Ishaaq ash-Shiraazi] and the majority, is 
    that precedence should be given to the eclipse prayer, because there is the 
    fear that it may be missed. End quote. 

    See also: al-Mawsoo‘ah al-Foqhiyyah (27/258) 

    What appears to be more correct is the view of Ibn Qudaamah 
    (may Allah have mercy on him), because of what he mentioned about difficulty 
    and hardship, and because Jumu‘ah is more emphasised and more important. 

    Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) was 
    asked: If two prayers coincide, the eclipse prayer and another prayer, such 
    as an obligatory prayer, or Jumu‘ah prayer, or Witr, or Taraweeh, which 
    should be given precedence? 

    He replied: 

    The obligatory prayer should be given precedence over the 
    eclipse prayer (for solar or lunar eclipse), because it is more important, 
    and because Allah, may He be exalted, said in the hadith qudsi: “My slave 
    does not draw close to Me by means of anything more beloved to Me than that 
    which I have made obligatory for him.”

    End quote from Majmoo‘ Fataawa Ibn ‘Uthaymeen (16/307) 

    Secondly: 

    If the imam begins with Jumu‘ah, he should deliver the 
    khutbah then lead the Jumu‘ah prayer, then he should offer the eclipse 
    prayer and deliver a khutbah for that. If he starts with the eclipse prayer 
    and completes it, he should deliver a khutbah for Jumu‘ah and mention the 
    eclipse in it, then pray Jumu‘ah, and the two Jumu‘ah khutbahs will suffice 
    for the khutbah that is usually given with the eclipse prayer. 

    An-Nawawi (may Allah have mercy on him) said, in the book 
    quoted from above: If Jumu‘ah and an eclipse coincide, and the situation 
    requires giving precedence to Jumu‘ah, he should deliver the khutbah for it 
    then pray Jumu‘ah, then offer the eclipse prayer, then give a khutbah for 
    the eclipse. 

    If the situation requires giving precedence to the eclipse 
    prayer, he should start with it, then give the khutbah for Jumu‘ah, making 
    mention of the eclipse in it and what is recommended in this situation in 
    the two Jumu‘ah khutbahs, and there is no need for four khutbahs. Our 
    companions said: This refers to the two Jumu‘ah khutbahs only. This was also 
    stated by ash-Shaafa‘i in al-Umm. End quote. 

    And Allah knows best.