It’s common among non-jazz musicians to think of “swing” rhythms as having a triplet-like feel, and it’s equally common among jazz players to regard that as hopelessly incorrect. That conflict over swing style has been widely discussed elsewhere, so I won’t rehash it here.
But there’s another layer to the swing/triplets issue: It’s important to understand that real swing rhythms are essentially duple. The primary subdivision of the beat is into two parts, even though those parts aren’t equal in length.
So, writing or playing lots of triplets is a common mistake that non-jazz musicians make when they are trying to imitate a swing sound. That’s not to say that triplets can’t or don’t exist in swing rhythms, but they aren’t the underlying subdivision, and in most cases are best used sparingly.
For example, this can be played to sound like an authentic swing/jazz line:
And even this notation, while problematic, can be translated into something authentic-sounding:
But, to someone who knows jazz style well, this one never quite sounds like swing:
It might pass for a shuffle or something else, but it’s hard to make it swing.
When a well-written swing line does include a triplet, a fluent jazz player might play it to sound distinctly un-triplety:
That approach (one of several possibilities) might make sense to a jazz player because they are stretching the downbeat note, and letting the subsequent notes fall later in the beat—a very similar approach to playing a pair of swung eighth notes.
Written or improvised melodies, background figures, drum fills, and other things that are supposed to swing in an authentic way should avoid excessive triplets. Extensive listening and study of great jazz writing, interpretation, and improvisation are crucial to understanding real jazz swing style.