diff --git a/apps/website/content/docs/rules/overview.mdx b/apps/website/content/docs/rules/overview.mdx index 731009d35f..ef77447088 100644 --- a/apps/website/content/docs/rules/overview.mdx +++ b/apps/website/content/docs/rules/overview.mdx @@ -102,7 +102,7 @@ The `jsx-*` rules check for issues exclusive to JSX syntax, which are absent fro | [`no-flush-sync`](./dom-no-flush-sync) | 2️⃣ | | Disallow `flushSync` | | | [`no-hydrate`](./dom-no-hydrate) | 2️⃣ | `🔄` | Replaces usages of `ReactDom.hydrate()` with `hydrateRoot()` | >=18.0.0 | | [`no-missing-button-type`](./dom-no-missing-button-type) | 1️⃣ | `🔧` | Enforces explicit `type` attribute for `button` elements | | -| [`no-missing-iframe-sandbox`](./dom-no-missing-iframe-sandbox) | 1️⃣ | | Enforces explicit `sandbox` attribute for `iframe` elements | | +| [`no-missing-iframe-sandbox`](./dom-no-missing-iframe-sandbox) | 1️⃣ | `🔧` | Enforces explicit `sandbox` attribute for `iframe` elements | | | [`no-namespace`](./dom-no-namespace) | 2️⃣ | | Enforces the absence of a `namespace` in React elements | | | [`no-render`](./dom-no-render) | 2️⃣ | `🔄` | Replaces usages of `ReactDom.render()` with `createRoot(node).render()` | >=18.0.0 | | [`no-render-return-value`](./dom-no-render-return-value) | 2️⃣ | | Disallow the return value of `ReactDOM.render` | | diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.md b/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.md index 6caf43f83b..933c0ac2c9 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.md +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.md @@ -14,6 +14,10 @@ react-dom/no-missing-iframe-sandbox @eslint-react/dom/no-missing-iframe-sandbox ``` +**Features** + +`🔧` + **Presets** - `dom` diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.spec.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.spec.ts index 240b4c8fc7..dcea7ffb6e 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.spec.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.spec.ts @@ -10,6 +10,13 @@ ruleTester.run(RULE_NAME, rule, { errors: [ { messageId: "noMissingIframeSandbox", + suggestions: [ + { + messageId: "addIframeSandbox", + data: { value: "" }, + output: tsx`