using that JSXAttribute, can't you just target className directly and add regex for your validation?
i.e.
'no-restricted-syntax': [
'error',
{
selector: 'JSXAttribute[name="className"][value.value=/^bg-/]',
message: 'Do not set background colors directly.',
},
],