Skip to content

refactor: enabled @typescript-eslint/explicit-module-boundary-types ESlint rule, fixed code#3967

Merged
IvanIlyichev merged 1 commit intomainfrom
f/linting
Oct 12, 2025
Merged

refactor: enabled @typescript-eslint/explicit-module-boundary-types ESlint rule, fixed code#3967
IvanIlyichev merged 1 commit intomainfrom
f/linting

Conversation

@IvanIlyichev
Copy link
Copy Markdown
Contributor

@IvanIlyichev IvanIlyichev commented Oct 12, 2025

Summary by CodeRabbit

  • New Features
    • Query Builder gains custom date/time widgets with consistent formatting.
  • UI
    • Data Table column settings editor redesigned with clearer data/form-specific sections and conditional visibility.
    • Reference list tags now use updated icons.
    • Security settings streamlined; removed pre-populated permissions in some components.
  • Refactor
    • Broad type-safety improvements and stricter input validation across forms, utilities, and hooks.
    • Improved error handling in expression migration and HTTP/type guards.
  • Chores
    • Minor signature cleanups and typings alignment for improved maintainability.

@IvanIlyichev IvanIlyichev merged commit 1eaf764 into main Oct 12, 2025
1 check passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 12, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Broad TypeScript tightening replaces many any parameters with object or unknown across UI settings builders, utilities, hooks, providers, and type guards. One helper is removed, several guards are added, and a few behaviors change: column settings builder refactor, query builder date/time widgets, gqlLoader.canLoadData logic, and minor API surface adjustments.

Changes

Cohort / File(s) Summary
Removed initial-values resolver
shesha-reactjs/src/components/configurableForm/useInitialValues.ts
Deleted helper that evaluated dynamic initial form values (getInitialValues).
Sidebar menu configurator typing
.../configurableSidebarMenu/configurator/groupSettings.ts, .../configurableSidebarMenu/configurator/itemSettings.ts
getGroupSettings/getItemSettings param typed object (from any).
Query Builder updates
.../components/queryBuilder/config.ts, .../components/queryBuilder/domUtils.ts, .../providers/queryBuilder/models.ts
Added custom date/datetime widgets and moment-based jsonLogic; added param types for calcTextWidth; hasCustomQBSettings now takes unknown.
DataTable column settings refactor
.../designer-components/dataTable/table/columnsEditor/columnSettings.ts
Rewrote builder structure with dataType-driven visibility; signature data?: object; reorganized tabs/containers and inputs.
DataTable/Filters/Cells typing
.../components/dataTable/cell/utils.ts, .../providers/dataTable/filters/evaluateFilter.ts, .../providers/dataTable/utils.ts
asNumber param to unknown; useFormEvaluatedFilter additionalData to object; getMoment/getDuration params to unknown.
FormDesigner utilities typing
.../components/formDesigner/components/utils.ts, .../components/formDesigner/formComponent.tsx
addContextData context params to object; customAddressEventHandler callbacks typed; onGeocodeChange returns Promise<void>; actualModelPropertyFilter value param to unknown.
Icon usage change
.../components/readOnlyDisplayFormItem/index.tsx, .../components/refListDropDown/reflistTag.tsx
Removed exported Icon component; ReflistTag now uses ShaIcon and icon prop type is string.
Designer getSettings typing sweep
shesha-reactjs/src/designer-components/*/*settings*.ts*, .../settings.ts, .../settingsForm.ts, .../formSettings.ts
Many getSettings function params changed from any/untyped to object; no control-flow changes except noted below.
Designer settings functional tweaks
.../designer-components/columns/settingsForm.ts, .../designer-components/sizableColumns/settingsForm.ts
Removed usage of data.permissions in Security sections.
Designer utils typing
.../designer-components/button/buttonGroup/utils.tsx, .../designer-components/button/util.ts, .../designer-components/card/utils.ts, .../designer-components/entityPicker/utils.ts, .../designer-components/image/utils.ts, .../designer-components/tabs/utils.ts, .../designer-components/wizard/utils.ts, .../designer-components/multiColorInput/index.tsx, .../designer-components/imageAnnotation/utilis.ts
Tightened parameter types to concrete props; added local type aliases in wizard; narrowed parseIntOrDefault types; removed exported getCustomEnabled.
Settings utils typing
.../designer-components/_settings/utils.tsx, .../designer-components/_settings/utils/background/utils.tsx, .../designer-components/_settings/utils/dimensions/utils.tsx
Switched various helpers’ params to unknown/object; canvasWidth?: string.
Hooks typing
shesha-reactjs/src/hooks/formComponentHooks.ts
additionalData parameter typed object across three hooks.
Interfaces and guards tightening
.../interfaces/ajaxResponse.ts, .../interfaces/errorInfo.ts, .../interfaces/metadata.ts, .../providers/form/models.ts
Type guards now take unknown/object; added isConfigurableFormComponent.
Form providers: loaders/submitters/store/proxy/utils
.../providers/form/loaders/*, .../providers/form/submitters/interfaces.ts, .../providers/form/store/shaFormInstance.tsx, .../providers/form/observableProxy.ts, .../providers/form/touchableProperty.ts, .../providers/form/touchableProxy.ts, .../providers/form/utils.ts, .../providers/form/api.ts
Broad param typing to object/unknown; gqlLoader.canLoadData now explicit id checks; setAdditionalData now object; touched value to unknown; multiple evaluation helpers signatures updated; toBase64 now Blob.
Public API typing
.../publicApi/http/hooks.ts, .../publicApi/utils/api.ts, .../publicApi/currentUser/api.ts
AxiosHttpClient data param typed as generic T; UtilsApi.evaluateString data now object; CurrentUserApi methods converted to arrow properties with generic value typing.
Stored files utils typing
shesha-reactjs/src/providers/storedFiles/utils.ts
Added explicit types to remove/add/update helpers; parameters typed (string/IStoredFile[]).
Misc utilities typing
shesha-reactjs/src/icons/fileIcons.tsx, shesha-reactjs/src/utils/autocomplete.ts
Functions now take typed params (string, AutocompleteValueType).
View generation utils typing
.../publicApi/forms/generation-logic/*/*.ts, .../publicApi/forms/generation-logic/viewGenerationUtils.ts
addComponentsToMarkup first param to unknown; view utils now use isConfigurableFormComponent and typed token/markup params.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as UI Component
  participant F as useFormEvaluatedFilter
  participant P as ObservableProxy
  participant C as Context
  participant E as Evaluator

  U->>F: args, additionalData (object)
  alt has additionalData
    F->>P: setAdditionalData(additionalData)
  end
  F->>C: build context
  C->>E: evaluate(filterTemplate, context)
  E-->>F: filter string
  F-->>U: evaluated filter
  note right of F: additionalData type narrowed to object
Loading
sequenceDiagram
  autonumber
  actor D as Designer
  participant S as getColumnSettings(data?: object)
  participant B as Builder

  D->>S: open column settings
  S->>S: dataType = data?.type
  S->>B: add Common tab + columnType
  alt dataType == "Data"
    S->>B: show Data Settings container
  else dataType == "Form"
    S->>B: show Form Settings container
  else
    S->>B: show generic Display/Action panels
  end
  B-->>D: markup JSON
  note over S,B: Visibility rules depend on computed dataType
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

Hops on the keys, I trim the anys thin,
Casting unknown shadows, type guards stepping in.
Widgets tell the time; columns choose their fate,
Icons swap their faces—ShaIcon’s looking great.
With stricter burrow maps, my reviews run tight—
Carrot-typed and tidy, we code into the night. 🥕✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch f/linting

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ab28fb and 41ed090.

⛔ Files ignored due to path filters (1)
  • shesha-reactjs/eslint.config.mjs is excluded by none and included by none
📒 Files selected for processing (107)
  • shesha-reactjs/src/components/configurableForm/useInitialValues.ts (0 hunks)
  • shesha-reactjs/src/components/configurableSidebarMenu/configurator/groupSettings.ts (1 hunks)
  • shesha-reactjs/src/components/configurableSidebarMenu/configurator/itemSettings.ts (1 hunks)
  • shesha-reactjs/src/components/dataTable/cell/utils.ts (1 hunks)
  • shesha-reactjs/src/components/formComponentSelector/adapters.ts (1 hunks)
  • shesha-reactjs/src/components/formDesigner/components/utils.ts (3 hunks)
  • shesha-reactjs/src/components/formDesigner/formComponent.tsx (1 hunks)
  • shesha-reactjs/src/components/queryBuilder/config.ts (2 hunks)
  • shesha-reactjs/src/components/queryBuilder/domUtils.ts (1 hunks)
  • shesha-reactjs/src/components/readOnlyDisplayFormItem/index.tsx (0 hunks)
  • shesha-reactjs/src/components/refListDropDown/reflistTag.tsx (2 hunks)
  • shesha-reactjs/src/designer-components/_common-migrations/migrateUseExpression.ts (2 hunks)
  • shesha-reactjs/src/designer-components/_settings/utils.tsx (3 hunks)
  • shesha-reactjs/src/designer-components/_settings/utils/background/utils.tsx (1 hunks)
  • shesha-reactjs/src/designer-components/_settings/utils/dimensions/utils.tsx (1 hunks)
  • shesha-reactjs/src/designer-components/alert/settings.ts (1 hunks)
  • shesha-reactjs/src/designer-components/button/buttonGroup/utils.tsx (2 hunks)
  • shesha-reactjs/src/designer-components/button/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/button/util.ts (2 hunks)
  • shesha-reactjs/src/designer-components/card/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/card/utils.ts (1 hunks)
  • shesha-reactjs/src/designer-components/charts/settingsFormIndividual.ts (1 hunks)
  • shesha-reactjs/src/designer-components/checkbox/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/checkboxGroup/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/chevron/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/colorPicker/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/columns/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/component-selector/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/container/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/dataList/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/dataTable/advancedFilterButton/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/dataTable/advancedFilterButton/utils.ts (1 hunks)
  • shesha-reactjs/src/designer-components/dataTable/pager/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/dataTable/quickSearch/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/dataTable/quickSearch/tabbedSettingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/dataTable/table/columnsEditor/columnSettings.ts (1 hunks)
  • shesha-reactjs/src/designer-components/dataTable/table/utils.ts (1 hunks)
  • shesha-reactjs/src/designer-components/dataTable/tableContext/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/dataTable/tableViewSelector/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/drawer/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/editModeToggler/settingsForm-old.ts (1 hunks)
  • shesha-reactjs/src/designer-components/editModeToggler/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/entityPicker/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/entityPicker/utils.ts (1 hunks)
  • shesha-reactjs/src/designer-components/horizontalMenu/modal.tsx (1 hunks)
  • shesha-reactjs/src/designer-components/horizontalMenu/settings.ts (1 hunks)
  • shesha-reactjs/src/designer-components/htmlRender/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/iconPicker/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/image/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/image/utils.ts (1 hunks)
  • shesha-reactjs/src/designer-components/imageAnnotation/utilis.ts (2 hunks)
  • shesha-reactjs/src/designer-components/inputComponent/utils.tsx (1 hunks)
  • shesha-reactjs/src/designer-components/itemListConfigurator/interfaces.ts (1 hunks)
  • shesha-reactjs/src/designer-components/link/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/markdown/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/menuList/settings.ts (1 hunks)
  • shesha-reactjs/src/designer-components/multiColorInput/index.tsx (1 hunks)
  • shesha-reactjs/src/designer-components/notes/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/passwordCombo/utils.ts (1 hunks)
  • shesha-reactjs/src/designer-components/permissions/permissionTagGroup/index.tsx (1 hunks)
  • shesha-reactjs/src/designer-components/profileDropdown/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/progress/settings.ts (1 hunks)
  • shesha-reactjs/src/designer-components/propertyRouter/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/radio/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/rate/settings.ts (1 hunks)
  • shesha-reactjs/src/designer-components/richTextEditor/formSettings.ts (1 hunks)
  • shesha-reactjs/src/designer-components/sectionSeprator/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/settingsEditor/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/sizableColumns/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/slider/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/statistic/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/tabs/utils.ts (1 hunks)
  • shesha-reactjs/src/designer-components/text/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/textArea/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/timeField/settings.ts (1 hunks)
  • shesha-reactjs/src/designer-components/validationErrors/settingsForm.ts (1 hunks)
  • shesha-reactjs/src/designer-components/wizard/utils.ts (3 hunks)
  • shesha-reactjs/src/hooks/formComponentHooks.ts (3 hunks)
  • shesha-reactjs/src/icons/fileIcons.tsx (1 hunks)
  • shesha-reactjs/src/interfaces/ajaxResponse.ts (1 hunks)
  • shesha-reactjs/src/interfaces/errorInfo.ts (1 hunks)
  • shesha-reactjs/src/interfaces/metadata.ts (4 hunks)
  • shesha-reactjs/src/providers/canvas/utils.ts (1 hunks)
  • shesha-reactjs/src/providers/dataTable/filters/evaluateFilter.ts (1 hunks)
  • shesha-reactjs/src/providers/dataTable/utils.ts (1 hunks)
  • shesha-reactjs/src/providers/form/api.ts (1 hunks)
  • shesha-reactjs/src/providers/form/loaders/customLoader.ts (2 hunks)
  • shesha-reactjs/src/providers/form/loaders/gqlLoader.ts (2 hunks)
  • shesha-reactjs/src/providers/form/loaders/interfaces.ts (1 hunks)
  • shesha-reactjs/src/providers/form/models.ts (2 hunks)
  • shesha-reactjs/src/providers/form/observableProxy.ts (1 hunks)
  • shesha-reactjs/src/providers/form/store/shaFormInstance.tsx (4 hunks)
  • shesha-reactjs/src/providers/form/submitters/interfaces.ts (1 hunks)
  • shesha-reactjs/src/providers/form/touchableProperty.ts (3 hunks)
  • shesha-reactjs/src/providers/form/touchableProxy.ts (2 hunks)
  • shesha-reactjs/src/providers/form/utils.ts (15 hunks)
  • shesha-reactjs/src/providers/queryBuilder/models.ts (1 hunks)
  • shesha-reactjs/src/providers/sheshaApplication/publicApi/currentUser/api.ts (1 hunks)
  • shesha-reactjs/src/providers/sheshaApplication/publicApi/forms/generation-logic/baseGenerationLogic.ts (1 hunks)
  • shesha-reactjs/src/providers/sheshaApplication/publicApi/forms/generation-logic/create-view/createViewGenerationLogic.ts (1 hunks)
  • shesha-reactjs/src/providers/sheshaApplication/publicApi/forms/generation-logic/details-view/detailsViewGenerationLogic.ts (1 hunks)
  • shesha-reactjs/src/providers/sheshaApplication/publicApi/forms/generation-logic/table-view/tableViewGenerationLogic.ts (1 hunks)
  • shesha-reactjs/src/providers/sheshaApplication/publicApi/forms/generation-logic/viewGenerationUtils.ts (4 hunks)
  • shesha-reactjs/src/providers/sheshaApplication/publicApi/http/hooks.ts (1 hunks)
  • shesha-reactjs/src/providers/sheshaApplication/publicApi/utils/api.ts (2 hunks)
  • shesha-reactjs/src/providers/storedFiles/utils.ts (2 hunks)
  • shesha-reactjs/src/utils/autocomplete.ts (1 hunks)
⛔ Files not processed due to max files limit (6)
  • shesha-reactjs/src/utils/date.ts
  • shesha-reactjs/src/utils/fluentMigrator/migrator.ts
  • shesha-reactjs/src/utils/form.ts
  • shesha-reactjs/src/utils/index.ts
  • shesha-reactjs/src/utils/jsonLogic.ts
  • shesha-reactjs/src/utils/object.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@IvanIlyichev IvanIlyichev deleted the f/linting branch October 12, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant