chore(eslint): enable @typescript-eslint/no-unused-expressions rule#1057
Draft
carlosthe19916 wants to merge 5 commits into
Draft
chore(eslint): enable @typescript-eslint/no-unused-expressions rule#1057carlosthe19916 wants to merge 5 commits into
carlosthe19916 wants to merge 5 commits into
Conversation
Replace short-circuit expressions used as statements (cond && fn()) with explicit if statements for clarity. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideEnables the @typescript-eslint/no-unused-expressions ESLint rule by removing its override and refactors all affected short-circuit expression statements into explicit, rule-compliant conditionals across client, server, e2e, and logging code. Flow diagram for conditional side effects after enabling no_unused_expressionsflowchart TD
A[Click DownloadAndLeave button] --> B[handleDownloadCSV]
B --> C{blocker.state === blocked}
C -->|true| D[blocker.proceed]
C -->|false| E[Do nothing]
subgraph Cancel_action
A2[Click Cancel button] --> C2{blocker.state === blocked}
C2 -->|true| D2[blocker.reset]
C2 -->|false| E2[Do nothing]
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1057 +/- ##
==========================================
+ Coverage 50.68% 50.70% +0.01%
==========================================
Files 253 253
Lines 5499 5499
Branches 1660 1660
==========================================
+ Hits 2787 2788 +1
Misses 2440 2440
+ Partials 272 271 -1
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:
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
@typescript-eslint/no-unused-expressionsoverride from ESLint configcond && fn()) with explicitifstatementsTest plan
npm run lintpasses with 0 warnings🤖 Generated with Claude Code
Summary by Sourcery
Enable the @typescript-eslint/no-unused-expressions ESLint rule and update code to comply with it.
Enhancements:
Chores: