chore(eslint): enable no-var and preserve-caught-error rules#1048
Open
carlosthe19916 wants to merge 4 commits into
Open
chore(eslint): enable no-var and preserve-caught-error rules#1048carlosthe19916 wants to merge 4 commits into
carlosthe19916 wants to merge 4 commits into
Conversation
Remove the "off" overrides so the default strictness applies. Fix var→const in e2e tests and attach cause to re-thrown error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideEnables stricter ESLint behavior by removing overrides that disabled no-var and preserve-caught-error, then updates affected e2e tests/helpers to use const instead of var and to preserve the original error as a cause when rethrowing. Flow diagram for updated error rethrowing with cause in UI helperflowchart TD
A[Run UI download verification helper] --> B[Download verification fails]
B --> C[catch err]
C --> D[Create new Error with message and cause: err]
D --> E[throw new Error]
E --> F[Caller receives error with preserved original cause]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1048 +/- ##
==========================================
+ 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:
|
…r-preserve-caught-error
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
getFullSbomPaths, consider usingreturn sbomPaths.map(path =>${sbomDir}/${path});instead of mutating an array withforEachto make the helper more concise and idiomatic.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `getFullSbomPaths`, consider using `return sbomPaths.map(path => `${sbomDir}/${path}`);` instead of mutating an array with `forEach` to make the helper more concise and idiomatic.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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
no-varandpreserve-caught-errorfrom the ESLint "off" overrides so default strictness appliesvar→constin e2e API testscauseto re-thrown error in e2e UI helperTest plan
npm run lintpasses with 0 warnings🤖 Generated with Claude Code
Summary by Sourcery
Tighten ESLint configuration by enforcing modern error handling and variable declaration rules in e2e code.
Enhancements: