Rules
no-jsx-script-tag
Avoid native script elements in JSX.
Purpose and behavior
Avoid native script elements in JSX.
The rule reports lowercase <script> JSX elements but allows components such as <Script>. Use your framework’s script integration.
Options
No configurable options. Enable with "rules/no-jsx-script-tag": "error".
Invalid example
const el = <script>alert(1)</script>Valid example
const el = <Script />Fixes and exceptions
This rule provides no automatic fix. Rewrite the code to preserve its intended behavior.
For a boundary exception, use oxlint-disable-next-line rules/no-jsx-script-tag -- reason. Examples cover this rule only and may omit imports or declarations.
Source and tests
Enabled by the TypeScript preset.