Problem
3 ESLint warnings exist in Context files:
src/context/AuthContext.tsx — exports useAuth alongside AuthProvider
src/context/ListsContext.tsx — exports useLists alongside ListsProvider
src/context/ThemeContext.tsx — exports useTheme alongside ThemeProvider
The react-refresh/only-export-components rule flags these because each file exports both a component and a hook.
Proposed Solution
Either:
- Move each
useX hook to a separate file (e.g., src/hooks/useAuth.ts re-exporting from context), or
- Disable the rule for these specific files with an eslint-disable comment
Option 1 is cleaner but touches more import paths.
Acceptance Criteria
Problem
3 ESLint warnings exist in Context files:
src/context/AuthContext.tsx— exportsuseAuthalongsideAuthProvidersrc/context/ListsContext.tsx— exportsuseListsalongsideListsProvidersrc/context/ThemeContext.tsx— exportsuseThemealongsideThemeProviderThe
react-refresh/only-export-componentsrule flags these because each file exports both a component and a hook.Proposed Solution
Either:
useXhook to a separate file (e.g.,src/hooks/useAuth.tsre-exporting from context), orOption 1 is cleaner but touches more import paths.
Acceptance Criteria
npm run lintproduces 0 warnings