Skip to content

Fix pre-existing react-refresh/only-export-components lint warnings #2

@gdiab

Description

@gdiab

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:

  1. Move each useX hook to a separate file (e.g., src/hooks/useAuth.ts re-exporting from context), or
  2. Disable the rule for these specific files with an eslint-disable comment

Option 1 is cleaner but touches more import paths.

Acceptance Criteria

  • npm run lint produces 0 warnings
  • No regressions in context usage across the app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions