fix: resolve pre-existing ESLint errors#1190
Merged
leecalcote merged 1 commit intolayer5io:masterfrom Dec 18, 2025
Merged
Conversation
- Added eslint-disable comment for unused type in actors/utils.ts The ContextWithReturnAddress type provides type safety for reply() - Fixed conditional React Hook call in InviteUserModal.tsx Changed from ternary operator to optional chaining with skip parameter Ensures React Hook is always called, satisfying Rules of Hooks Both fixes are minimal, non-breaking changes that resolve lint errors without affecting functionality. Tested: - ESLint passes on both files - Build succeeds - All tests pass Signed-off-by: Jeet Burman <jeetburrman@gmail.com>
Member
Author
|
As discussed in Monday's meeting (15 December 2025) with @Rajesh-Nagarajan-11 and @kishore007k , I have created a PR fixing the lint errors... I request a review. |
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.
Problem
Error 1: Unused Type Definition
File: src/actors/utils.ts
Issue: Type ContextWithReturnAddress is defined but never explicitly used
Impact: ESLint no-unused-vars rule violation
Error 2: Conditional React Hook Call
File: src/custom/DashboardWidgets/GettingStartedWidget/InviteUserModal.tsx
Issue: useGetUserByEmailQuery hook called inside a ternary operator (conditional)
Impact: Violates React's Rules of Hooks - hooks must be called unconditionally
These errors existed in the master branch and were affecting contributors' PRs.

Description
This PR resolves 2 pre-existing ESLint errors that were blocking CI checks:
src/actors/utils.ts:8:6- Unused type definitionsrc/custom/DashboardWidgets/GettingStartedWidget/InviteUserModal.tsx:109:7- Conditional React Hook callChanges Made
Fix 1: Unused Type Declaration (utils.ts)
eslint-disable-next-linecomment forContextWithReturnAddresstypereply()functionFix 2: Conditional Hook Call (InviteUserModal.tsx)
? :) to optional chaining (?.) with nullish coalescing (??)skipparameter check to prevent unnecessary queries when hook is undefinedTested:
Notes for Reviewers
Both fixes are minimal, non-breaking changes that resolve lint errors without affecting functionality.
Command for reproduction :
npx eslint src\actors\utils.ts src\custom\DashboardWidgets\GettingStartedWidget\InviteUserModal.tsxSigned commits