refactor: reduce complexity, remove dead code, add oxlint plugins#47
Merged
Conversation
6b41ecf to
3415aca
Compare
3415aca to
9304fce
Compare
9304fce to
5ec2ad1
Compare
5ec2ad1 to
2729d79
Compare
…ean consoles - Extract tone scheduling helper in audio.ts, simplify playEndSound - Group DOM queries in ui.ts, standardize textContent, fix TS strict init - Extract auth/token helpers in google-fit.ts, simplify uploadSession - Remove dead code: TimerEngine.toggle, StorageService.getHistory/close - Reduce complexity: normalizeConfig (CRAP 110→clean), determineIntervalCount - Add oxlint JS plugins: eslint-plugin-testing-library, playwright, sonarjs - Clean all 14 console.log/warn/error debug statements - Enable 8 additional sonarjs rules (no-gratuitous-expressions, etc.) - Add fallow regression baseline + health snapshot tracking - Configure fallow-mcp in opencode.json for agent tooling - Update CI with code-quality job + lint + regression check - Fix tests for removed console calls and dead code - All 55 tests pass, 155 rules active, 0 warnings, 0 errors
2729d79 to
a6b5836
Compare
|
There was a problem hiding this comment.
No quality gates enabled for this code.
See analysis details in CodeScene
Quality Gate Profile: Custom Configuration
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
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
This PR cleans up the codebase with multiple improvements:
Complexity Reduction
audio.ts, simplifyplayEndSoundui.ts, standardize ontextContent, fix TS strict initializationgoogle-fit.ts, simplifyuploadSessionnormalizeConfigCRAP score dropped from 110 → clean (extractedpickMode,pickNumber,pickBool)determineIntervalCountCRAP score dropped from 42 → cleanDead Code Removal
TimerEngine.toggle()— only used in testsStorageService.getHistory()— never calledStorageService.close()— never calledLinting Improvements
eslint-plugin-testing-library,eslint-plugin-playwright,eslint-plugin-sonarjsconsole.log/warn/errordebug statementsFallow Integration
fallow-mcpin opencode.json for agent toolingCI Updates
code-qualityjob with lint + regression checkVerification
tsc --noEmit)