Skip to content

Commit 878744d

Browse files
committed
docs: minor fixes
1 parent 8f699b9 commit 878744d

14 files changed

+40
-30
lines changed

apps/website/content/docs/roadmap.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ title: Roadmap
2020
- [x] `no-component-will-update`
2121
- [x] `no-context-provider`
2222
- [x] `no-forward-ref`
23+
- [ ] `no-string-refs`
2324

2425
### Add auto-fix feature to rules that can be auto-fixed safely
2526

@@ -48,6 +49,15 @@ title: Roadmap
4849

4950
### New Rules
5051

52+
- [x] `no-context-provider` - Replaces usages of `<Context.Provider>` with `<Context>` (React 19).
53+
- [x] `no-forward-ref` - Replaces usages of `forwardRef` with passing `ref` as a prop (React 19).
54+
- [x] `no-use-context` - Replaces usages of `useContext` with `use` (React 19).
55+
- [ ] `react-dom/no-render` - Replaces usages of `ReactDom.render()` with `createRoot(node).render()` (React 19).
56+
- [ ] `react-dom/no-hydrate` - Replaces usages of `ReactDom.hydrate()` with `hydrateRoot()` (React 19).
57+
- [ ] `react-dom/no-unmount-component-at-node` - Replaces usages of `ReactDom.unmountComponentAtNode()` with `root.unmount()` (React 19).
58+
- [ ] `react-dom/no-use-form-state` - Replaces the usages of `useFormState()` to use `useActionState()` (React 19).
59+
- [ ] `react-dom/no-test-utils-act` - Replaces the usages of `TestUtils.act()` to use `React.act()` (React 19).
60+
- [x] `naming-convention/context-name` - Enforces context name to be a valid component name with the suffix `Context` (React 19).
5161
- [ ] `function-component-definition` - Enforce the definition of function components ([Rel1cx/eslint-react#739](https://github.com/Rel1cx/eslint-react/issues/739)).
5262
- [ ] `hooks-extra/no-circular-effect` - Detect circular `set` (and `dispatch`) functions and deps patterns in `useEffect` like Hooks ([Rel1cx/eslint-react#755](https://github.com/Rel1cx/eslint-react/issues/755))
5363

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ full: true
3333
| [`no-clone-element`](./no-clone-element) | 1️⃣ | `🔍` | Prevents using `cloneElement`. | |
3434
| [`no-comment-textnodes`](./no-comment-textnodes) | 1️⃣ | `🔍` | Prevents comments from being inserted as text nodes. | |
3535
| [`no-complex-conditional-rendering`](./no-complex-conditional-rendering) | 0️⃣ | `🔍` | Prevents complex conditional rendering in JSX. | |
36-
| [`no-component-will-mount`](./no-component-will-mount) | 2️⃣ | `🔍` `🔄` | Replaces `componentWillMount` with `UNSAFE_componentWillMount`. | >=16.3.0 |
37-
| [`no-component-will-receive-props`](./no-component-will-receive-props) | 2️⃣ | `🔍` `🔄` | Replaces `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`. | >=16.3.0 |
38-
| [`no-component-will-update`](./no-component-will-update) | 2️⃣ | `🔍` `🔄` | Replaces `componentWillUpdate` with `UNSAFE_componentWillUpdate`. | >=16.3.0 |
39-
| [`no-context-provider`](./no-context-provider) | 1️⃣ | `🔍` `🔄` | Replaces `<Context.Provider>` with `<Context>`. | >=19.0.0 |
36+
| [`no-component-will-mount`](./no-component-will-mount) | 2️⃣ | `🔍` `🔄` | Replaces usages of `componentWillMount` with `UNSAFE_componentWillMount`. | >=16.3.0 |
37+
| [`no-component-will-receive-props`](./no-component-will-receive-props) | 2️⃣ | `🔍` `🔄` | Replaces usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`. | >=16.3.0 |
38+
| [`no-component-will-update`](./no-component-will-update) | 2️⃣ | `🔍` `🔄` | Replaces usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`. | >=16.3.0 |
39+
| [`no-context-provider`](./no-context-provider) | 1️⃣ | `🔍` `🔄` | Replaces usages of `<Context.Provider>` with `<Context>`. | >=19.0.0 |
4040
| [`no-create-ref`](./no-create-ref) | 2️⃣ | `🔍` | Prevents using `createRef`. | |
4141
| [`no-default-props`](./no-default-props) | 2️⃣ | `🔍` | Prevents using `defaultProps` property in favor of ES6 default parameters. | |
4242
| [`no-direct-mutation-state`](./no-direct-mutation-state) | 2️⃣ | `🔍` | Prevents direct mutation of `this.state`. | |
4343
| [`no-duplicate-jsx-props`](./no-duplicate-jsx-props) | 1️⃣ | `🔍` | Prevents duplicate props in JSX. | |
4444
| [`no-duplicate-key`](./no-duplicate-key) | 2️⃣ | `🔍` | Prevents duplicate `key` on elements in the same array or a list of `children`. | |
45-
| [`no-forward-ref`](./no-forward-ref) | 1️⃣ | `🔍` `🔄` | Replaces `forwardRef` with passing `ref` as a prop. | >=19.0.0 |
45+
| [`no-forward-ref`](./no-forward-ref) | 1️⃣ | `🔍` `🔄` | Replaces usages of `forwardRef` with passing `ref` as a prop. | >=19.0.0 |
4646
| [`no-implicit-key`](./no-implicit-key) | 1️⃣ | `🔍` | Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects). | |
4747
| [`no-leaked-conditional-rendering`](./no-leaked-conditional-rendering) | 1️⃣ | `🔍` `💭` | Prevents problematic leaked values from being rendered. | |
4848
| [`no-missing-component-display-name`](./no-missing-component-display-name) | 0️⃣ | `🔍` | Enforces that all components have a `displayName` which can be used in devtools. | |
@@ -62,7 +62,7 @@ full: true
6262
| [`no-unstable-default-props`](./no-unstable-default-props) | 1️⃣ | `🔍` | Prevents using referential-type values as default props in object destructuring. | |
6363
| [`no-unused-class-component-members`](./no-unused-class-component-members) | 1️⃣ | `🔍` | Warns unused class component methods and properties. | |
6464
| [`no-unused-state`](./no-unused-state) | 1️⃣ | `🔍` | Warns unused class component state. | |
65-
| [`no-use-context`](./no-use-context) | 1️⃣ | `🔍` `🔄` | Replaces `useContext` with `use`. | >=19.0.0 |
65+
| [`no-use-context`](./no-use-context) | 1️⃣ | `🔍` `🔄` | Replaces usages of `useContext` with `use`. | >=19.0.0 |
6666
| [`no-useless-fragment`](./no-useless-fragment) | 1️⃣ | `🔍` `🔧` `⚙️` | Prevents using useless `fragment` components or `<>` syntax. | |
6767
| [`prefer-destructuring-assignment`](./prefer-destructuring-assignment) | 0️⃣ | `🔍` | Enforces using destructuring assignment over property assignment. | |
6868
| [`prefer-react-namespace-import`](./prefer-react-namespace-import) | 0️⃣ | `🔍` `🔧` | Enforces React is imported via a namespace import | |

packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-mount.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ react-x/no-component-will-mount
2727

2828
## What it does
2929

30-
Replaces `componentWillMount` with `UNSAFE_componentWillMount`.
30+
Replaces usages of `componentWillMount` with `UNSAFE_componentWillMount`.
3131

3232
This API has been renamed from `componentWillMount` to `UNSAFE_componentWillMount`. The old name has been deprecated. In a future major version of React, only the new name will work.
3333

@@ -81,6 +81,6 @@ class MyComponent extends React.Component<MyComponentProps> {
8181
## See Also
8282

8383
- [no-component-will-receive-props](./no-component-will-receive-props)\
84-
Prevents usage of `componentWillReceiveProps` in class components.
84+
Replace usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`.
8585
- [no-component-will-update](./no-component-will-update)\
86-
Prevents usage of `componentWillUpdate` in class components.
86+
Replace usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`.

packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-mount.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default createRule<[], MessageID>({
2626
meta: {
2727
type: "problem",
2828
docs: {
29-
description: "replace 'componentWillMount' with 'UNSAFE_componentWillMount'",
29+
description: "replace usages of 'componentWillMount' with 'UNSAFE_componentWillMount'",
3030
[Symbol.for("rule_features")]: RULE_FEATURES,
3131
},
3232
fixable: "code",

packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-receive-props.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ react-x/no-component-will-receive-props
2727

2828
## What it does
2929

30-
Replaces `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`.
30+
Replaces usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`.
3131

3232
This API has been renamed from `componentWillReceiveProps` to `UNSAFE_componentWillReceiveProps`. The old name has been deprecated. In a future major version of React, only the new name will work.
3333

@@ -73,6 +73,6 @@ class MyComponent extends React.Component {
7373
## See Also
7474

7575
- [no-component-will-mount](./no-component-will-mount)\
76-
Prevents usage of `componentWillMount` in class components.
76+
Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.
7777
- [no-component-will-update](./no-component-will-update)\
78-
Prevents usage of `componentWillUpdate` in class components.
78+
Replace usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`.

packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-receive-props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default createRule<[], MessageID>({
2626
meta: {
2727
type: "problem",
2828
docs: {
29-
description: "replace 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'",
29+
description: "replace usages of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'",
3030
[Symbol.for("rule_features")]: RULE_FEATURES,
3131
},
3232
fixable: "code",

packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-update.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ react-x/no-component-will-update
2727

2828
## What it does
2929

30-
Replaces `componentWillUpdate` with `UNSAFE_componentWillUpdate`.
30+
Replaces usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`.
3131

3232
This API has been renamed from `componentWillUpdate` to `UNSAFE_componentWillUpdate`. The old name has been deprecated. In a future major version of React, only the new name will work.
3333

@@ -73,6 +73,6 @@ class MyComponent extends React.Component {
7373
## See Also
7474

7575
- [no-component-will-mount](./no-component-will-mount)\
76-
Prevents usage of `componentWillMount` in class components.
76+
Replaces usages of `componentWillMount` with `UNSAFE_componentWillMount`.
7777
- [no-component-will-receive-props](./no-component-will-receive-props)\
78-
Prevents usage of `componentWillReceiveProps` in class components.
78+
Replaces usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`.

packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default createRule<[], MessageID>({
2626
meta: {
2727
type: "problem",
2828
docs: {
29-
description: "replace 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'",
29+
description: "replace usages of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'",
3030
[Symbol.for("rule_features")]: RULE_FEATURES,
3131
},
3232
fixable: "code",

packages/plugins/eslint-plugin-react-x/src/rules/no-context-provider.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ react-x/no-context-provider
2727

2828
## What it does
2929

30-
Replaces `<Context.Provider>` with `<Context>`.
30+
Replaces usages of `<Context.Provider>` with `<Context>`.
3131

3232
In React 19, you can render `<Context>` as a provider instead of `<Context.Provider>`.
3333

@@ -79,6 +79,6 @@ function App({ children }) {
7979
## See Also
8080

8181
- [`no-forward-ref`](./no-forward-ref)\
82-
Disallows using `React.forwardRef`.
82+
Replaces usages of `forwardRef` with passing `ref` as a prop.
8383
- [`no-use-context`](./no-use-context)\
84-
Disallows using `React.useContext`.
84+
Replaces usages of `useContext` with `use`.

packages/plugins/eslint-plugin-react-x/src/rules/no-context-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default createRule<[], MessageID>({
1919
meta: {
2020
type: "problem",
2121
docs: {
22-
description: "replace '<Context.Provider>' with '<Context>'",
22+
description: "replace usages of '<Context.Provider>' with '<Context>'",
2323
[Symbol.for("rule_features")]: RULE_FEATURES,
2424
},
2525
fixable: "code",

0 commit comments

Comments
 (0)