Skip to content

feat(build): migrate from Prettier to Oxfmt for performant code formatting#42434

Open
hainenber wants to merge 1 commit into
masterfrom
feat/migrate-from-prettier-to-oxfmt
Open

feat(build): migrate from Prettier to Oxfmt for performant code formatting#42434
hainenber wants to merge 1 commit into
masterfrom
feat/migrate-from-prettier-to-oxfmt

Conversation

@hainenber

Copy link
Copy Markdown
Contributor

feat(build): migrate from Prettier to Oxfmt for performant code formatting

SUMMARY

30x faster than Prettier, which is translated to 1 second formatting whole Superset codebase compared to Prettier's 30s!

There'll be more codes added to the project and switching to a more performant formatter is, IMO, future-proofing.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

Green CI

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

…tting

Signed-off-by: hainenber <dotronghai96@gmail.com>
@dosubot dosubot Bot added the frontend:refactor Related to refactoring the frontend label Jul 26, 2026
@bito-code-review

bito-code-review Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #c73f95

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts - 1
    • Duplicate type definition · Line 69-75
      The `legendItems` parameter type duplicates `LegendDataItem` which is already defined in `series.ts` (lines 75-80). Import and use the shared type alias instead to follow DRY principle and reduce maintenance risk if the type changes.
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • superset-frontend/packages/superset-ui-core/src/components/DropdownButton/index.tsx - 1
    • CWE-398: Duplicate condition check · Line 37-38
  • superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx - 1
Review Details
  • Files reviewed - 125 · Commit Range: af9729a..af9729a
    • .cursor/rules/dev-standard.mdc
    • .pre-commit-config.yaml
    • .rat-excludes
    • Makefile
    • superset-frontend/.prettierignore
    • superset-frontend/eslint.config.minimal.js
    • superset-frontend/netlify.toml
    • superset-frontend/packages/superset-core/src/storage/index.ts
    • superset-frontend/packages/superset-ui-chart-controls/src/types.ts
    • superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/AsyncAceEditor.stories.tsx
    • superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx
    • superset-frontend/packages/superset-ui-core/src/components/Button/types.ts
    • superset-frontend/packages/superset-ui-core/src/components/CodeEditor/index.tsx
    • superset-frontend/packages/superset-ui-core/src/components/DropdownButton/index.tsx
    • superset-frontend/packages/superset-ui-core/src/components/DynamicEditableTitle/index.tsx
    • superset-frontend/packages/superset-ui-core/src/components/EmptyState/index.tsx
    • superset-frontend/packages/superset-ui-core/src/components/Form/types.ts
    • superset-frontend/packages/superset-ui-core/src/components/Icons/index.tsx
    • superset-frontend/packages/superset-ui-core/src/components/Label/types.ts
    • superset-frontend/packages/superset-ui-core/src/components/Loading/types.ts
    • superset-frontend/packages/superset-ui-core/src/components/MetadataBar/ContentType.ts
    • superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx
    • superset-frontend/packages/superset-ui-core/src/components/Tabs/Tabs.tsx
    • superset-frontend/packages/superset-ui-core/src/connection/types.ts
    • superset-frontend/packages/superset-ui-core/src/currency-format/types.ts
    • superset-frontend/packages/superset-ui-core/src/models/Registry.ts
    • superset-frontend/packages/superset-ui-core/src/query/api/v1/handleError.ts
    • superset-frontend/packages/superset-ui-core/src/query/getClientErrorObject.ts
    • superset-frontend/packages/superset-ui-core/src/query/types/Dashboard.ts
    • superset-frontend/packages/superset-ui-core/src/query/types/Filter.ts
    • superset-frontend/packages/superset-ui-core/src/query/types/Metric.ts
    • superset-frontend/packages/superset-ui-core/src/query/types/PostProcessing.ts
    • superset-frontend/packages/superset-ui-core/src/query/types/QueryFormData.ts
    • superset-frontend/packages/superset-ui-core/src/time-comparison/types.ts
    • superset-frontend/packages/superset-ui-core/test/chart/components/ChartDataProvider.test.tsx
    • superset-frontend/packages/superset-ui-core/test/time-format/factories/createD3TimeFormatter.test.ts
    • superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/TTestTable.tsx
    • superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx
    • superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts
    • superset-frontend/plugins/plugin-chart-ag-grid-table/src/types.ts
    • superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/getRowBasicColorFormatter.ts
    • superset-frontend/plugins/plugin-chart-ag-grid-table/test/controlPanel.test.tsx
    • superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/types.ts
    • superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx
    • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
    • superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/types.ts
    • superset-frontend/plugins/plugin-chart-echarts/src/utils/legendLayout.ts
    • superset-frontend/plugins/plugin-chart-echarts/src/utils/safeEChartOptionsParser.ts
    • superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/MixedTimeseries/buildQuery.test.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts
    • superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/shared.ts
    • superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.ts
    • superset-frontend/plugins/plugin-chart-pivot-table/src/types.ts
    • superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
    • superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx
    • superset-frontend/plugins/plugin-chart-table/test/controlPanel.test.tsx
    • superset-frontend/plugins/preset-chart-deckgl/src/layers/Path/buildQuery.ts
    • superset-frontend/plugins/preset-chart-deckgl/src/utilities/Shared_DeckGL.tsx
    • superset-frontend/plugins/preset-chart-deckgl/src/utils/crossFiltersDataMask.ts
    • superset-frontend/prettier.config.js
    • superset-frontend/scripts/po2json.sh
    • superset-frontend/src/SqlLab/components/TableExploreTree/TreeNodeRenderer.tsx
    • superset-frontend/src/SqlLab/middlewares/persistSqlLabStateEnhancer.ts
    • superset-frontend/src/SqlLab/reducers/sqlLab.ts
    • superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx
    • superset-frontend/src/components/Datasource/FoldersEditor/TreeItem.styles.ts
    • superset-frontend/src/components/Datasource/FoldersEditor/treeUtils.ts
    • superset-frontend/src/components/ListView/Filters/CompactSelectPanel.tsx
    • superset-frontend/src/dashboard/actions/dashboardLayout.ts
    • superset-frontend/src/dashboard/actions/dashboardState.ts
    • superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.tsx
    • superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusIndicatorDot.tsx
    • superset-frontend/src/dashboard/components/Dashboard.tsx
    • superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
    • superset-frontend/src/dashboard/components/DashboardBuilder/DashboardContainer.test.tsx
    • superset-frontend/src/dashboard/components/IconButton.tsx
    • superset-frontend/src/dashboard/components/dnd/DragHandle.tsx
    • superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.tsx
    • superset-frontend/src/dashboard/components/gridComponents/Header/Header.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilter.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTag.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.overflow.test.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/UrlFilters/UrlFilterTag.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useItemStateManager.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useModalSaveLogic.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/transformers/customizationTransformer.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/transformers/filterTransformer.ts
    • superset-frontend/src/dashboard/components/nativeFilters/state.ts
    • superset-frontend/src/dashboard/containers/DashboardPage.tsx
    • superset-frontend/src/dashboard/reducers/dashboardInfo.ts
    • superset-frontend/src/dashboard/reducers/nativeFilters.ts
    • superset-frontend/src/dashboard/types.ts
    • superset-frontend/src/dashboard/util/risonFilters.ts
    • superset-frontend/src/dataMask/reducer.ts
    • superset-frontend/src/explore/components/ExploreContainer/ExploreDndContext.tsx
    • superset-frontend/src/explore/components/controls/ColumnConfigControl/types.ts
    • superset-frontend/src/explore/components/controls/DateFilterControl/types.ts
    • superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.tsx
    • superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx
    • superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx
    • superset-frontend/src/explore/components/controls/SelectControl.tsx
    • superset-frontend/src/explore/components/controls/TextAreaControl.tsx
    • superset-frontend/src/explore/components/controls/VerticalRadioControl.tsx
    • superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx
    • superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.tsx
    • superset-frontend/src/explore/controlUtils/standardizedFormData.ts
    • superset-frontend/src/explore/types.ts
    • superset-frontend/src/features/alerts/AlertReportModal.tsx
    • superset-frontend/src/features/databases/UploadDataModel/index.tsx
    • superset-frontend/src/features/databases/types.ts
    • superset-frontend/src/features/home/ActivityTable.tsx
    • superset-frontend/src/features/home/RightMenu.tsx
    • superset-frontend/src/middleware/loggerMiddleware.ts
    • superset-frontend/src/pages/Chart/index.tsx
    • superset-frontend/src/pages/FileHandler/FileHandler.subdirectory.test.tsx
    • superset-frontend/src/pages/FileHandler/index.test.tsx
    • superset-frontend/src/setup/setupApp.ts
    • superset-frontend/src/views/CRUD/types.ts
    • superset-frontend/src/views/CRUD/utils.tsx
  • Files skipped - 31
    • .devcontainer/devcontainer-base.json - Reason: Filter setting
    • .devcontainer/devcontainer.json - Reason: Filter setting
    • AGENTS.md - Reason: Filter setting
    • superset-frontend/.oxfmtrc.json - Reason: Filter setting
    • superset-frontend/cypress-base/package.json - Reason: Filter setting
    • superset-frontend/package-lock.json - Reason: Filter setting
    • superset-frontend/package.json - Reason: Filter setting
    • superset-frontend/packages/generator-superset/package.json - Reason: Filter setting
    • superset-frontend/packages/superset-core/package.json - Reason: Filter setting
    • superset-frontend/packages/superset-ui-chart-controls/package.json - Reason: Filter setting
    • superset-frontend/packages/superset-ui-core/package.json - Reason: Filter setting
    • superset-frontend/packages/superset-ui-switchboard/package.json - Reason: Filter setting
    • superset-frontend/plugins/legacy-plugin-chart-calendar/package.json - Reason: Filter setting
    • superset-frontend/plugins/legacy-plugin-chart-chord/package.json - Reason: Filter setting
    • superset-frontend/plugins/legacy-plugin-chart-country-map/package.json - Reason: Filter setting
    • superset-frontend/plugins/legacy-plugin-chart-horizon/package.json - Reason: Filter setting
    • superset-frontend/plugins/legacy-plugin-chart-paired-t-test/package.json - Reason: Filter setting
    • superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/package.json - Reason: Filter setting
    • superset-frontend/plugins/legacy-plugin-chart-partition/package.json - Reason: Filter setting
    • superset-frontend/plugins/legacy-plugin-chart-rose/package.json - Reason: Filter setting
    • superset-frontend/plugins/legacy-plugin-chart-world-map/package.json - Reason: Filter setting
    • superset-frontend/plugins/legacy-preset-chart-nvd3/package.json - Reason: Filter setting
    • superset-frontend/plugins/plugin-chart-ag-grid-table/package.json - Reason: Filter setting
    • superset-frontend/plugins/plugin-chart-cartodiagram/package.json - Reason: Filter setting
    • superset-frontend/plugins/plugin-chart-echarts/package.json - Reason: Filter setting
    • superset-frontend/plugins/plugin-chart-handlebars/package.json - Reason: Filter setting
    • superset-frontend/plugins/plugin-chart-pivot-table/package.json - Reason: Filter setting
    • superset-frontend/plugins/plugin-chart-point-cluster-map/package.json - Reason: Filter setting
    • superset-frontend/plugins/plugin-chart-table/package.json - Reason: Filter setting
    • superset-frontend/plugins/plugin-chart-word-cloud/package.json - Reason: Filter setting
    • superset-frontend/plugins/preset-chart-deckgl/package.json - Reason: Filter setting
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Eslint (Linter) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.17544% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.23%. Comparing base (e3d3262) to head (af9729a).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
superset-frontend/src/setup/setupApp.ts 0.00% 6 Missing ⚠️
...ages/superset-ui-core/src/components/Tabs/Tabs.tsx 0.00% 5 Missing ⚠️
...onents/Datasource/FoldersEditor/TreeItem.styles.ts 28.57% 5 Missing ⚠️
...ts/nativeFilters/FilterBar/ActionButtons/index.tsx 33.33% 4 Missing ⚠️
...tend/plugins/plugin-chart-table/src/TableChart.tsx 78.57% 3 Missing ⚠️
...core/src/components/DynamicEditableTitle/index.tsx 60.00% 2 Missing ⚠️
...perset-ui-core/src/components/EmptyState/index.tsx 0.00% 2 Missing ⚠️
...plore/components/controls/VerticalRadioControl.tsx 0.00% 2 Missing ⚠️
...chart-echarts/src/utils/safeEChartOptionsParser.ts 0.00% 1 Missing ⚠️
...b/components/TableExploreTree/TreeNodeRenderer.tsx 50.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #42434      +/-   ##
==========================================
- Coverage   65.24%   65.23%   -0.02%     
==========================================
  Files        2795     2795              
  Lines      157643   157704      +61     
  Branches    36061    36077      +16     
==========================================
+ Hits       102853   102877      +24     
- Misses      52814    52850      +36     
- Partials     1976     1977       +1     
Flag Coverage Δ
hive 38.39% <ø> (-0.01%) ⬇️
javascript 71.27% <70.17%> (+<0.01%) ⬆️
mysql 57.56% <ø> (-0.02%) ⬇️
postgres 57.60% <ø> (-0.02%) ⬇️
presto 40.31% <ø> (-0.01%) ⬇️
python 59.00% <ø> (-0.02%) ⬇️
sqlite 57.23% <ø> (-0.02%) ⬇️
unit 100.00% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant