Skip to content

Commit 89205c8

Browse files
committed
chore: enable eslint-plugin-react-hooks
1 parent ccdd3c2 commit 89205c8

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

eslint.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import eslint from '@eslint/js'
44
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript'
5-
import importX from 'eslint-plugin-import-x'
5+
import { importX } from 'eslint-plugin-import-x'
6+
import * as reactHooks from 'eslint-plugin-react-hooks'
67
import { config, configs } from 'typescript-eslint'
78

89
export default config(
@@ -12,6 +13,7 @@ export default config(
1213
eslint.configs.recommended,
1314
importX.flatConfigs.recommended,
1415
importX.flatConfigs.typescript,
16+
reactHooks.configs['recommended-latest'],
1517
{
1618
files: ['**/*.{ts,tsx}'],
1719
extends: [configs.eslintRecommended, configs.strictTypeChecked],

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"clean-pkg-json": "^1.3.0",
119119
"eslint-import-resolver-typescript": "^4.4.1",
120120
"eslint-plugin-import-x": "^4.13.3",
121+
"eslint-plugin-react-hooks": "^5.2.0",
121122
"nano-staged": "^0.8.0",
122123
"npm-run-all2": "^7.0.2",
123124
"prettier": "^3.5.3",

src/runtime/components/_HeadingTitle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const HeadingTitle = ({
3535
[uid, slug || slugger?.slug(slugFromChildren)]
3636
.filter(Boolean)
3737
.join('-') || undefined,
38-
[slug, uid, slugFromChildren],
38+
[uid, slug, slugger, slugFromChildren],
3939
)
4040
return (
4141
<HeadingComponent id={id}>

yarn.lock

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ __metadata:
4242
eslint-import-resolver-typescript: "npm:^4.4.1"
4343
eslint-plugin-import-x: "npm:^4.13.3"
4444
eslint-plugin-mdx: "npm:^3.4.2"
45+
eslint-plugin-react-hooks: "npm:^5.2.0"
4546
html-tag-names: "npm:^2.1.0"
4647
mdast-util-mdx: "npm:^2.0.1"
4748
mdast-util-mdx-jsx: "npm:^2.1.4"
@@ -5523,6 +5524,15 @@ __metadata:
55235524
languageName: node
55245525
linkType: hard
55255526

5527+
"eslint-plugin-react-hooks@npm:^5.2.0":
5528+
version: 5.2.0
5529+
resolution: "eslint-plugin-react-hooks@npm:5.2.0"
5530+
peerDependencies:
5531+
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
5532+
checksum: 10c0/1c8d50fa5984c6dea32470651807d2922cc3934cf3425e78f84a24c2dfd972e7f019bee84aefb27e0cf2c13fea0ac1d4473267727408feeb1c56333ca1489385
5533+
languageName: node
5534+
linkType: hard
5535+
55265536
"eslint-plugin-react-naming-convention@npm:1.50.0":
55275537
version: 1.50.0
55285538
resolution: "eslint-plugin-react-naming-convention@npm:1.50.0"

0 commit comments

Comments
 (0)