Skip to content

Commit a951d8b

Browse files
committed
integrate eslint-plugin-react-you-might-not-need-an-effect
1 parent d740ed9 commit a951d8b

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

eslint.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import noBarrelFiles from 'eslint-plugin-no-barrel-files';
1313
import eslintPluginLodash from 'eslint-plugin-lodash';
1414
import eslintPluginPlaywright from 'eslint-plugin-playwright';
1515
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
16+
import reactYouMightNotNeedAnEffect from 'eslint-plugin-react-you-might-not-need-an-effect';
1617

1718

1819
const compat = new FlatCompat({
@@ -108,6 +109,12 @@ export default defineConfig(
108109
},
109110
},
110111

112+
// ── React "You Might Not Need an Effect" ──
113+
{
114+
files: ['**/*.{ts,tsx}'],
115+
...reactYouMightNotNeedAnEffect.configs.recommended,
116+
},
117+
111118
// ── Import-X (replaces eslint-plugin-import) ──
112119
eslintPluginImportX.flatConfigs.recommended,
113120
eslintPluginImportX.flatConfigs.typescript,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
"eslint-plugin-playwright": "^2.10.1",
103103
"eslint-plugin-prettier": "^5.5.5",
104104
"eslint-plugin-react-hooks": "^7.0.1",
105+
"eslint-plugin-react-you-might-not-need-an-effect": "^0.9.3",
105106
"eslint-plugin-unicorn": "^64.0.0",
106107
"husky": "^9.1.7",
107108
"jsdom": "^29.0.2",

pnpm-lock.yaml

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)