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

Hi, I'm who's behind Fedify, Hollo, BotKit, and this website, Hackers' Pub! My main account is at @hongminhee洪 民憙 (Hong Minhee).

Fedify, Hollo, BotKit, 그리고 보고 계신 이 사이트 Hackers' Pub을 만들고 있습니다. 제 메인 계정은: @hongminhee洪 民憙 (Hong Minhee).

FedifyHolloBotKit、そしてこのサイト、Hackers' Pubを作っています。私のメインアカウントは「@hongminhee洪 民憙 (Hong Minhee)」に。