Salam alaikum.
In shariah it’s well known, that it’s prohibited to swear by anyone or anything except Allah.
Umar bin Al-Khattab (May Allah be pleased with him) narrated that Allah’s Messenger(sallalahu alaihi wa ala alihi wa sallam) said: “Whoever swears by other than Allah has disbelieved or committedShirk.” [At-Tirmidhi graded this Hadith as Hasan (fair) and Al-Hakim has graded it Sahih (sound)].
Ibn Mas’ud (May Allah be pleased with him) said: “To swear by Allah while lying is more loved by me than to swear by other than Him while speaking truth.”
Imam Nawawe dedicated separate chapter on this in his book “Riyad as salihin”.
Shia scholar famous Mirza Hussain Noore Tabarsi in his book “Mustadrak al-wasail” (vol 6, p 50) narrated:
[ 19109 ] 5 – وروي عنه (صلى الله عليه وآله)، أنه قال: من حلف بغير الله فقد أشرك
And it was reported from him (sallahu alaihi wa ali) that he said: “Whoever would swear by other than Allah committed shirk”.
And he also narrated (vol 6, p 64):
[ 19165 ] 3 – وعنه (صلى الله عليه وآله)، قال : “من حلف بغير الله، فقد كفر وأ شرك
And from him (sallahu alaihi wa alihi) that he said: “Whoever swear to someone other than Allah, he committed kufr or shirk”