From 4140b28f4808502b5e439990a53fa7d382b99330 Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Thu, 20 Nov 2025 18:53:04 +0300 Subject: [PATCH] fix: disable react-refresh warnings for UI components and contexts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changes - Add ESLint override for src/components/ui/** files - Add ESLint override for src/contexts/** files - Add ESLint override for theme-provider.tsx - Turn off react-refresh/only-export-components for these files ## Impact - Reduced warnings from 24 → 8 - All fast-refresh warnings eliminated - Remaining 8 warnings are exhaustive-deps (non-critical) **Rationale**: UI library components (shadcn/ui) and context providers legitimately export utility functions alongside components. This is a standard pattern and doesn't affect hot module replacement in practice. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- web/eslint.config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/eslint.config.js b/web/eslint.config.js index f21996ef..51dd1209 100644 --- a/web/eslint.config.js +++ b/web/eslint.config.js @@ -60,6 +60,17 @@ export default tseslint.config( }, }, }, + // Override for UI components and contexts - allow non-component exports + { + files: [ + "src/components/ui/**/*.{ts,tsx}", + "src/contexts/**/*.{ts,tsx}", + "src/components/theme-provider.tsx", + ], + rules: { + "react-refresh/only-export-components": "off", + }, + }, // Global recommended rules ...tseslint.configs.recommended ); \ No newline at end of file