79347054

Date: 2025-01-10 21:23:24
Score: 3
Natty:
Report link

reference

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.',
  },
],

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: tim