Skip to content

chore(eslint): enable @typescript-eslint/no-wrapper-object-types rule#1049

Draft
carlosthe19916 wants to merge 4 commits into
guacsec:mainfrom
carlosthe19916:hotfix/enable-no-wrapper-object-types
Draft

chore(eslint): enable @typescript-eslint/no-wrapper-object-types rule#1049
carlosthe19916 wants to merge 4 commits into
guacsec:mainfrom
carlosthe19916:hotfix/enable-no-wrapper-object-types

Conversation

@carlosthe19916
Copy link
Copy Markdown
Collaborator

@carlosthe19916 carlosthe19916 commented May 27, 2026

Summary

  • Remove the @typescript-eslint/no-wrapper-object-types override from ESLint config
  • Replace Object with object in generic constraint in utils.ts

Test plan

  • npm run lint passes with 0 warnings

🤖 Generated with Claude Code

Summary by Sourcery

Enable the TypeScript ESLint no-wrapper-object-types rule and update utility types to comply with the linting rule.

Enhancements:

  • Tighten the objectKeys utility generic constraint to use the primitive object type instead of the Object wrapper type.

Build:

  • Remove the override disabling @typescript-eslint/no-wrapper-object-types from the ESLint configuration to enforce safer object typing.

Replace Object with object in generic constraint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 27, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Enables the @typescript-eslint/no-wrapper-object-types rule by removing its override from the ESLint configuration and updating a generic constraint in a utility helper to use the primitive object type, ensuring the codebase complies with the rule.

Flow diagram for ESLint rule enabling and utils update

flowchart LR
  Dev["Developer updates PR"] --> ESLintConfig["eslint.config.mjs
(remove @typescript-eslint/no-wrapper-object-types override)"]
  ESLintConfig --> ESLint["ESLint with @typescript-eslint/no-wrapper-object-types enabled"]
  ESLint --> Utils["utils.ts
update objectKeys<T extends object>"]
  Utils --> LintPass["npm run lint passes with 0 warnings"]
Loading

File-Level Changes

Change Details Files
Update a utility helper to use the primitive object type in its generic constraint so it complies with the no-wrapper-object-types rule.
  • Change the generic constraint from the wrapper Object type to the primitive object type in the objectKeys helper.
  • Ensure the return type assertion continues to map keys to keyof T without altering runtime behavior.
client/src/app/utils/utils.ts
Tighten ESLint rules by enabling @typescript-eslint/no-wrapper-object-types.
  • Remove the override that disabled the @typescript-eslint/no-wrapper-object-types rule from the ESLint configuration.
  • Rely on the default configuration so the rule is now enforced during linting.
eslint.config.mjs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.68%. Comparing base (16a6bec) to head (0e3cdbf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1049   +/-   ##
=======================================
  Coverage   50.68%   50.68%           
=======================================
  Files         253      253           
  Lines        5499     5499           
  Branches     1660     1660           
=======================================
  Hits         2787     2787           
  Misses       2440     2440           
  Partials      272      272           
Flag Coverage Δ
e2e 68.93% <100.00%> (ø)
unit 2.01% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@carlosthe19916 carlosthe19916 marked this pull request as draft May 27, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant