Skip to content

feat(deps): upgrade ESLint and react-hooks with code fixes#153

Merged
fx merged 2 commits intomainfrom
chore/eslint-updates-and-fixes
Dec 3, 2025
Merged

feat(deps): upgrade ESLint and react-hooks with code fixes#153
fx merged 2 commits intomainfrom
chore/eslint-updates-and-fixes

Conversation

@fx
Copy link
Copy Markdown
Owner

@fx fx commented Dec 3, 2025

Summary

  • Upgrades ESLint ecosystem packages (eslint 9.28.0, eslint-plugin-react-hooks 7.0.1)
  • Disables new experimental React Compiler rules in eslint config
  • Fixes code patterns to comply with updated linting rules

Changes

  • ESLint 9.28.0 → 9.28.0
  • eslint-plugin-react-hooks 5.2.0 → 7.0.1
  • Disabled new experimental rules: react-hooks/refs, react-hooks/static-components, react-hooks/set-state-in-effect, react-hooks/incompatible-library, react-hooks/preserve-manual-memoization
  • Fixed various code patterns across components (hooks ordering, state management)

Related

Supersedes Dependabot PR #152

Test plan

  • All tests pass (npm test)
  • Linting passes (npm run lint)
  • TypeScript checks pass (npm run typecheck)

Copilot AI review requested due to automatic review settings December 3, 2025 23:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the ESLint ecosystem (eslint 9.28.0→9.39.1, eslint-plugin-react-hooks 5.2.0→7.0.1, TypeScript ESLint 8.35.0→8.48.1) and applies code fixes to comply with updated linting rules. The changes focus on proper React hooks usage, removing unused variables, and improving state management patterns.

Key Changes:

  • Upgraded ESLint and react-hooks plugin with new experimental rules disabled for gradual adoption
  • Fixed React hooks ordering to ensure hooks are called before early returns
  • Refactored state management to use useState initializers instead of useEffect for form initialization

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json Updated ESLint ecosystem packages to latest versions
package-lock.json Lock file updates reflecting new package versions
eslint.config.js Added configuration to disable new experimental React Compiler rules
src/panel.ts Removed unused error parameter from catch block
src/hooks/useWebRTC.ts Removed unused frame counting variables and fixed dependency array
src/components/widgets/WeatherWidget.tsx Moved useMemo hook before early returns to comply with Rules of Hooks
src/components/tests/CardConfig.test.tsx Removed unused fireEvent import
src/components/ScreenConfigDialog.tsx Replaced useEffect with useState initializer for form state
src/components/LightCard.tsx Extracted variables for useMemo dependencies to improve clarity
src/components/KeepAlive.tsx Changed from useRef to useState to properly trigger re-renders
src/components/InputTextCard.tsx Refactored to use computed values instead of useEffect for state sync
src/components/Dashboard.tsx Added key prop to force ScreenConfigDialog remount
src/components/CameraCard.tsx Prefixed unused parameter with underscore
src/components/BinarySensorCard.tsx Moved useMemo hook before early returns
app/utils/responsive.ts Removed redundant setState call before addEventListener

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fx fx merged commit 8f8e175 into main Dec 3, 2025
2 checks passed
@fx fx deleted the chore/eslint-updates-and-fixes branch December 3, 2025 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants