ast-grep 알듯 모를듯.. 아래같이 하면 innerHTML prop를 넘겨주고, 여닫는 사이에 내용은 없지만 self-closing 안 하는 케이스들을 잡을 수 있겠다.

id: innerhtml-not-self-closed
language: tsx
severity: error
rule:
  all:
  - kind: jsx_element
    pattern: <$TAG $$$ARGS></$TAG>
    all:
    - has:
        kind: jsx_opening_element
        has:
          kind: jsx_attribute
          regex: innerHTML
    - has:
        kind: jsx_closing_element
fix: "<$TAG $$$ARGS />"
1

If you have a fediverse account, you can reply to this note from your own instance. Search https://hackers.pub/ap/notes/0198a426-0c6f-76af-a4ee-a56a2deda82a on your instance and reply to it.