Skip to content

Commit 29a9da2

Browse files
committed
docs: disable 'markdown/no-html' rule and add React data fetching tip
1 parent 3a84c5d commit 29a9da2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

eslint.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default tseslint.config(
4949
],
5050
language: "markdown/gfm",
5151
rules: {
52-
"markdown/no-html": "warn",
52+
"markdown/no-html": "off",
5353
"markdown/no-missing-label-refs": "off",
5454
},
5555
},

packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-direct-set-state-in-use-effect.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const fullName = firstName + " " + lastName;
5050

5151
The rule **does not flag** indirect calls, such as:
5252

53-
- Inside event handlers.
53+
- Inside `event` handlers.
5454
- Inside `async` functions.
5555
- Inside `setTimeout`, `setInterval`, `Promise.then`, etc.
5656

@@ -143,6 +143,12 @@ export default function RemoteContent() {
143143
}
144144
```
145145

146+
<Callout title="TIP">
147+
148+
If you need to fetch remote data within the component, consider using libraries like [TanStack Query](https://tanstack.com/query/v3/) or [SWR](https://swr.vercel.app/). They handle caching, re-fetching, and state management for you, making your code cleaner and more efficient.
149+
150+
</Callout>
151+
146152
The following examples are derived from the [React documentation](https://react.dev/learn/you-might-not-need-an-effect):
147153

148154
### Failing

0 commit comments

Comments
 (0)