Skip to content

Commit b1f6138

Browse files
committed
docs: add fix feature to 'no-missing-button-type' rule and update documentation
1 parent c89116b commit b1f6138

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

apps/website/content/docs/rules/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The `jsx-*` rules check for issues exclusive to JSX syntax, which are absent fro
101101
| [`no-find-dom-node`](./dom-no-find-dom-node) | 2️⃣ | | Disallow `findDOMNode` | |
102102
| [`no-flush-sync`](./dom-no-flush-sync) | 2️⃣ | | Disallow `flushSync` | |
103103
| [`no-hydrate`](./dom-no-hydrate) | 2️⃣ | `🔄` | Replaces usages of `ReactDom.hydrate()` with `hydrateRoot()` | >=18.0.0 |
104-
| [`no-missing-button-type`](./dom-no-missing-button-type) | 1️⃣ | | Enforces explicit `type` attribute for `button` elements | |
104+
| [`no-missing-button-type`](./dom-no-missing-button-type) | 1️⃣ | `🔧` | Enforces explicit `type` attribute for `button` elements | |
105105
| [`no-missing-iframe-sandbox`](./dom-no-missing-iframe-sandbox) | 1️⃣ | | Enforces explicit `sandbox` attribute for `iframe` elements | |
106106
| [`no-namespace`](./dom-no-namespace) | 2️⃣ | | Enforces the absence of a `namespace` in React elements | |
107107
| [`no-render`](./dom-no-render) | 2️⃣ | `🔄` | Replaces usages of `ReactDom.render()` with `createRoot(node).render()` | >=18.0.0 |

packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ react-dom/no-missing-button-type
1414
@eslint-react/dom/no-missing-button-type
1515
```
1616

17+
**Features**
18+
19+
`🔧`
20+
1721
**Presets**
1822

1923
- `dom`

packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import { createJsxElementResolver, createRule, findCustomComponentProp } from ".
66

77
export const RULE_NAME = "no-missing-button-type";
88

9-
export const RULE_FEATURES = [] as const satisfies RuleFeature[];
9+
export const RULE_FEATURES = [
10+
"FIX",
11+
] as const satisfies RuleFeature[];
1012

1113
export const BUTTON_TYPES = ["button", "submit", "reset"] as const;
1214

0 commit comments

Comments
 (0)