fix: resolve all lint warnings and promote warn rules to error#287
Merged
fix: resolve all lint warnings and promote warn rules to error#287
Conversation
Fix all ESLint warnings (complexity, max-lines, no-shadow, object-shorthand) across backend and frontend, then promote the five warn-level rules to error in eslint.config.js so new violations fail CI. Backend: - Extract Oura data processing into oura-process.ts (max-lines fix) - Extract notes, restore, custom-metrics services from mutations.ts - Extract enrichActivity/enrichSleepFields helpers in queries.ts Frontend: - Data-driven nav links in Header.tsx - Extract shared DataSource components (shared.tsx) - Split EntityDetail into type-specific components - Extract RuleEditForm and AddRuleForm in LastFmTagRulesSettings - Extract helpers in DayView, TagMappingsSettings, ExerciseDetail All 972 backend tests pass. pnpm check and pnpm fix clean.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #287 +/- ##
===========================================
+ Coverage 31.88% 32.43% +0.54%
===========================================
Files 181 185 +4
Lines 22992 22651 -341
Branches 1886 1889 +3
===========================================
+ Hits 7331 7346 +15
+ Misses 15627 15271 -356
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
warn-level rules (complexity,max-depth,max-lines,no-shadow,object-shorthand) toerrorineslint.config.jsso new violations fail CI.Backend changes
oura-process.tsto fix max-lines (540→~50 lines remaining)enrichActivity()andenrichSleepFields()helpers to fix complexity (16→under 15)validateCustomMetricRange()helper to fix complexity (16→under 15)Frontend changes
NAV_LINKSarray withNavLinkcomponent (complexity 18→under 15)drawPointMarker()anddrawBlockOverlay()helpers (complexity 23→under 15)SaveStatusIndicator,StatusBanner,DataTypesList,LoginRequiredintoshared.tsx; refactor CalendarsSource, LastFmSource, RescueTimeSourceEntityContentintoActivityContent,TagContent,ProductivityContent,MetricContent; extractMetricDetail.tsx,ProductivityDetail.tsx,TagDetail.tsxExerciseStatscomponent (complexity 20→under 15)RowStatusIndicator,IconPreviewcomponents (complexity 21→under 15)AddRuleForminto separate file,RuleEditFormcomponent,buildUpdateBody/getArtistUpdateshelpers (complexity 18,17→under 15; max-lines 671→443+262)ESLint config
All five rules promoted from
warntoerror:Verification
pnpm fix— clean (zero warnings/errors)pnpm check— clean (tsc + eslint pass)