Skip to content

Commit 1ae4d83

Browse files
committed
✏️ Fix no-hook-memo being a warning by default (should be an error)
1 parent f6519b6 commit 1ae4d83

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pnpm add --save-dev eslint-plugin-react-no-manual-memo
4141
| :----------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------- | :--- | :- | :- |
4242
| [no-component-memo](https://github.com/BellCubeDev/eslint-plugin-react-no-manual-memo/blob/main/docs/no-component-memo.md) | Disallow React.memo() in favor of React Compiler automatic memoization | 🌐 ✅ | | 🔧 |
4343
| [no-custom-memo-hook](https://github.com/BellCubeDev/eslint-plugin-react-no-manual-memo/blob/main/docs/no-custom-memo-hook.md) | Disallow custom hooks that only use useCallback and useMemo | 🌐 || |
44-
| [no-hook-memo](https://github.com/BellCubeDev/eslint-plugin-react-no-manual-memo/blob/main/docs/no-hook-memo.md) | Disallow manual memoization hooks (useMemo, useCallback) in favor of React Compiler | 🌐 | | 🔧 |
44+
| [no-hook-memo](https://github.com/BellCubeDev/eslint-plugin-react-no-manual-memo/blob/main/docs/no-hook-memo.md) | Disallow manual memoization hooks (useMemo, useCallback) in favor of React Compiler | 🌐 | | 🔧 |
4545

4646
<!-- end auto-generated rules list -->
4747

docs/no-hook-memo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Disallow manual memoization hooks (useMemo, useCallback) in favor of React Compi
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

7-
💼⚠️ This rule is enabled in the 🌐 `all` config. This rule _warns_ in the `recommended` config.
7+
💼 This rule is enabled in the following configs: 🌐 `all`, `recommended`.
88

99
<!-- end auto-generated rule header -->
1010

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const plugin = {
3030
recommended: {
3131
plugins: [namespace],
3232
rules: {
33-
[`${namespace}/no-hook-memo`]: 'warn',
33+
[`${namespace}/no-hook-memo`]: 'error',
3434
[`${namespace}/no-component-memo`]: 'error',
3535
[`${namespace}/no-custom-memo-hook`]: 'warn',
3636
},
@@ -50,7 +50,7 @@ export const plugin = {
5050
[namespace]: {}, // circular ref; assigned after the plugin object is initially created
5151
},
5252
rules: {
53-
[`${namespace}/no-hook-memo`]: 'warn',
53+
[`${namespace}/no-hook-memo`]: 'error',
5454
[`${namespace}/no-component-memo`]: 'error',
5555
[`${namespace}/no-custom-memo-hook`]: 'warn',
5656
},

0 commit comments

Comments
 (0)