chore: resolve ts/eslint warnings/errors#1832
Open
paustint wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR focuses on cleaning up TypeScript and ESLint warnings/errors across the UI and shared libraries by tightening types (especially around refs, event handlers, and error handling) and adding missing ambient typings for Google-related APIs.
Changes:
- Replaced many
ex.messageusages withgetErrorMessage(ex)and tightened catch variable typing. - Improved React typing (e.g.,
ForwardedRef, nullable handler params) and adjusted generics forreact-modal-promise. - Added Google ambient type references / custom typings wiring and adjusted ESLint + tsconfig settings to reduce build/lint friction.
Reviewed changes
Copilot reviewed 75 out of 76 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/ui/src/lib/utils/OutsideClickHandler.tsx | Adds explicit TS types for handlers/refs. |
| libs/ui/src/lib/utils/ErrorBoundaryWithoutContent.tsx | Types constructor and derived error arg. |
| libs/ui/src/lib/sobject-list/SobjectListMultiSelect.tsx | Uses ForwardedRef typing for forwardRef. |
| libs/ui/src/lib/sobject-list/SobjectListFilter.tsx | Adds key/value assertions for filter typing. |
| libs/ui/src/lib/sobject-list/SobjectList.tsx | Uses ForwardedRef typing for forwardRef. |
| libs/ui/src/lib/sobject-list/SobjectCombobox.tsx | Uses getErrorMessage for UI errors. |
| libs/ui/src/lib/sobject-list/ConnectedSobjectListMultiSelect.tsx | Uses getErrorMessage for UI errors. |
| libs/ui/src/lib/sobject-list/ConnectedSobjectList.tsx | Uses getErrorMessage for UI errors. |
| libs/ui/src/lib/sobject-field-list/useWhereIsThisUsed.tsx | Uses getErrorMessage for logging/state. |
| libs/ui/src/lib/sobject-field-list/SobjectFieldCombobox.tsx | Uses getErrorMessage for UI errors. |
| libs/ui/src/lib/providers/DialogServiceProvider.tsx | Fixes context setter typing. |
| libs/ui/src/lib/modal/XlsxSheetSelectionModalPromise.tsx | Adds explicit create generics. |
| libs/ui/src/lib/modal/ConfirmationModalPromise.tsx | Adds explicit create generics; tweaks resolve typing. |
| libs/ui/src/lib/list/ReadonlyList.tsx | Uses ForwardedRef typing for forwardRef. |
| libs/ui/src/lib/list/List.tsx | Adjusts ref typing and focus/scroll logic. |
| libs/ui/src/lib/layout/AutoFullHeightContainer.tsx | Adds explicit prop typing / definite assignment. |
| libs/ui/src/lib/form/picklist/Picklist.tsx | Ref array typing adjustments. |
| libs/ui/src/lib/form/formGroupDropDown/FormGroupDropdown.tsx | Ref array typing adjustments. |
| libs/ui/src/lib/form/file-selector/ImageSelector.tsx | Types props and uses getErrorMessage. |
| libs/ui/src/lib/form/file-selector/GoogleFolderSelector.tsx | Adds google picker ambient types reference. |
| libs/ui/src/lib/form/file-selector/GoogleFileSelectorExternalButton.tsx | Adds google picker ambient types reference. |
| libs/ui/src/lib/form/file-selector/GoogleFileSelector.tsx | Adds google picker types and safer error extraction. |
| libs/ui/src/lib/form/file-selector/FileSelector.tsx | Uses getErrorMessage for UI errors. |
| libs/ui/src/lib/form/dropdown/DropDown.tsx | Ref array typing adjustments. |
| libs/ui/src/lib/form/date/DatePicker.tsx | Adds missing param typing. |
| libs/ui/src/lib/form/date/DateGrid.tsx | Ref grid typing adjustments. |
| libs/ui/src/lib/form/date-time/DateTime.tsx | Allows nullable date/time inputs. |
| libs/ui/src/lib/form/context-menu/ContextMenu.tsx | Ref array typing adjustments. |
| libs/ui/src/lib/form/combobox/ComboboxWithItemsVirtual.tsx | Tightens filter typing; updates keyboard action union. |
| libs/ui/src/lib/form/combobox/ComboboxWithGroupedItems.tsx | Tightens filter typing. |
| libs/ui/src/lib/file-download-modal/RecordDownloadModal.tsx | Fixes handler typing; radio casts. |
| libs/ui/src/lib/file-download-modal/options/FileDownloadGoogle.tsx | Adds google picker ambient types reference. |
| libs/ui/src/lib/file-download-modal/FileFauxDownloadModal.tsx | Fixes handler typing; radio casts. |
| libs/ui/src/lib/file-download-modal/FileDownloadModal.tsx | Narrows some unsafe indexing/casts; error typing. |
| libs/ui/src/lib/expression-group/ExpressionContainer.tsx | Makes initial state optional. |
| libs/ui/src/lib/expression-group/ExpressionConditionRow.tsx | Adds casts to satisfy Picklist typing. |
| libs/ui/src/lib/data-table/SalesforceRecordDataTable.tsx | Improves typing of reducers/results; uses getErrorMessage. |
| libs/ui/src/lib/data-table/grid/filters/HeaderFilters.tsx | Comparator typing and null time handling. |
| libs/ui/src/lib/data-table/data-table-formatters.tsx | Uses getErrorMessage for tracker warnings. |
| libs/types/src/lib/ui/types.ts | Adds google picker ambient types reference. |
| libs/shared/utils/src/lib/utils.ts | Tightens reduce/object typing and some casts. |
| libs/shared/ui-utils/src/lib/shared-ui-utils.ts | Uses getErrorMessage; tightens reducers/casts. |
| libs/shared/ui-utils/src/lib/shared-browser-extension-helpers.ts | Avoids globalThis typing issues via casts. |
| libs/shared/ui-utils/src/lib/hooks/useProfilesAndPermSets.tsx | Uses getErrorMessage for logging. |
| libs/shared/ui-utils/src/lib/hooks/useGoogleApi.ts | Adds google account/gapi refs; refactors callback; safer error access. |
| libs/shared/ui-utils/src/lib/hooks/useGlobalEventHandler.ts | Casts handler to EventListener for TS compatibility. |
| libs/shared/ui-utils/src/lib/hooks/useDrivePicker.ts | Adds google picker ambient types reference. |
| libs/shared/ui-record-form/src/lib/UiRecordFormField.tsx | Allows nullable date/time inputs. |
| libs/shared/ui-record-form/src/lib/ui-record-form-utils.ts | Uses getErrorMessage in feature detection. |
| libs/shared/ui-core/src/state-management/manage-permissions.state.ts | Tightens reduce typing/casts. |
| libs/shared/ui-core/src/state-management/load-records.state.ts | Adds google picker ambient types reference. |
| libs/shared/ui-core/src/record/ViewEditCloneRecord.tsx | Fixes key typing for constants map; tightens reduce typing. |
| libs/shared/ui-core/src/record/ViewChildRecords.tsx | Uses getErrorMessage; fixes constants map key typing. |
| libs/shared/ui-core/src/record/RecordSearchPopover.tsx | Adds param typing. |
| libs/shared/ui-core/src/metadata/useDeployMetadataPackage.tsx | Uses getErrorMessage for logging/state. |
| libs/shared/ui-core/src/mass-update-records/useDeployRecords.ts | Uses getErrorMessage for processing errors. |
| libs/shared/ui-core/src/load/LoadRecordsResultsModal.tsx | Fixes key typing for width map. |
| libs/shared/ui-core/src/load/load-records-utils.tsx | Uses getErrorMessage; tightens reducers/casts. |
| libs/shared/ui-core/src/jobs/JobWorker.ts | Definite assignment for handler. |
| libs/shared/ui-core/src/jobs/Jobs.tsx | Adds gapi types reference; tightens worker message typing. |
| libs/shared/ui-core/src/formula-evaluator/FormulaEvaluatorUserSearch.tsx | Allows null selection; casts value to string. |
| libs/shared/ui-core/src/formula-evaluator/FormulaEvaluatorRecordSearch.tsx | Allows null selection; casts value to string. |
| libs/shared/ui-core/src/formula-evaluator/formula-evaluator.editor-utils.ts | Uses getErrorMessage for warnings. |
| libs/shared/ui-core/src/create-fields/useCreateFields.ts | Uses getErrorMessage; improves reduce typing. |
| libs/shared/ui-core/src/create-fields/create-fields-utils.tsx | Generalizes validators to FieldValue; tightens typing. |
| libs/shared/ui-core/src/app/MonacoEditor.tsx | Uses Emotion ClassNamesContent types. |
| libs/shared/data/src/lib/client-data.ts | Tightens queryAllFromList local typing. |
| libs/icon-factory/src/lib/icon-factory.tsx | Fixes icon map indexing typing. |
| libs/features/record-type-manager/tsconfig.spec.json | Adds files for Nx + custom typings. |
| libs/features/record-type-manager/tsconfig.lib.json | Moves typings into files list. |
| libs/features/load-records/tsconfig.spec.json | Adds files for Nx + custom typings. |
| libs/connected/connected-ui/src/lib/utils.ts | Fixes map indexing typing. |
| libs/connected/connected-ui/src/lib/useSetTraceFlag.tsx | Uses getErrorMessage/getErrorStack. |
| libs/connected/connected-ui/src/lib/useDescribeMetadata.tsx | Uses getErrorMessage for UI errors. |
| eslint.config.js | Adjusts hooks rule settings; adds eslint-config boundary override. |
| custom-typings/index.d.ts | Reworks ambient typings and module declarations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adb5d31 to
a563668
Compare
a563668 to
f032d44
Compare
f032d44 to
2eb99f1
Compare
2eb99f1 to
54007cd
Compare
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.
No description provided.