Takfir of sheikhan and ahle-sunna from their book

Allama Muhammad Baqir al-Majlisi in his “Biharul anwar” (69/137-138) narrated:

عن مولى لعلي بن الحسين عليهما السلام قال: كنت معه عليه السلام في بعض خلواته فقلت: إن لي عليك حقا ألا تخبرني عن هذين الرجلين: عن أبي بكر وعمر ؟

فقال: كافران كافر من أحبهما. وعن أبي حمزة الثمالي أنه سئل علي بن الحسين عليهما السلام عنهما فقال: كافران كافر من تولاهما.

From freed slave of Ali ibn Hussain (alaihi salam): “Sometimes when alaihi salam stayed alone I was with him, and asked: “I have a right upon you, would you not tell me about those two men, Abu Bakr and Umar?”  (Imam answered): “Disbelievers and disbelievers those who love them”.  And it was narrated from Abu Hamza as-Somali that he asked Ali ibn Hussain (alaihi salam) about them and he said: “Disbelievers and disbelievers those who befriend them”.

Then Majlisi narrated from 3 imams, Ali ibn Hussain, Muhammad ibn Ali and Jafar ibn Muhammad that they said:

ثلاثة لا ينظر الله إليهم يوم القيامة ولا يزكيهم ولهم عذاب أليم: من زعم أنه إمام وليس بامام، ومن جحد إمامة إمام من الله، ومن زعم أن لهما في الاسلام نصيبا

Allah wouldn’t look to 3 kind of people in the doomsday, and wouldn’t purify them and they would have a painful torment: The one who would claim that he’s Imaam while he’s not, the one who would reject Imamate of imam from Allah, and whoever would claim that they have a share in Islam.