What type of exercise should one do for tendinitis?

Aggressive rest. The proper treatment of tendonitis is “r.I.C.E.” or rest, ice, compression, and elevation. Rest includes avoiding the activity or overuse that led to the tendonitis. Once resolved, stretching and strengthening of the affected area can slowly resume.
Depending upon which. Tendon, how bad is it, how chronic it is. But restricting the end range of motion in that tendons actions, gentle stretching and strengthening in the planes not involved with that tendon motion but that will support the involved joint to resist irritation. For example grip and forearm for elbow tendonitis, quadriceps for patellar tendonitis, unaffected parts of the rotator cuff for rtc tendonit.