Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit b557d0f

Browse files
belovinhoxobotyi
andauthored
fix: proper configuration of react-hooks plugin (#925)
Co-authored-by: xobotyi <xog3@yandex.ru>
1 parent e592d7d commit b557d0f

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

configs/react.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,17 @@ import { adjustESLintConfigFiles } from './base.js';
55
/** @var {Linter.Config[]} */
66
const reactConfig = [
77
pluginReact.configs.flat.recommended,
8-
pluginReactHooks.configs.recommended,
8+
{
9+
plugins: {
10+
'react-hooks': {
11+
rules: pluginReactHooks.rules,
12+
},
13+
},
14+
rules: {
15+
'react-hooks/rules-of-hooks': 'error',
16+
'react-hooks/exhaustive-deps': 'warn',
17+
},
18+
},
919
{
1020
rules: {
1121
// While using ts with `react-jsx` preset - there

0 commit comments

Comments
 (0)