Rules
no-missing-iframe-sandbox
Full Name in eslint-plugin-react-dom
Full Name in @eslint-react/eslint-plugin
Features
🔍
Presets
dom
recommended
recommended-typescript
recommended-type-checked
What it does
Enforces explicit sandbox
attribute for iframe
elements.
The sandbox attribute enables an extra set of restrictions for the content in the iframe. Using sandbox attribute is considered a good security practice.
Examples
This rule checks all React iframe elements and verifies that there is sandbox attribute and that it's value is valid.