Skip to content

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

Merged
hainenber merged 11 commits into
masterfrom
feat/migrate-from-prettier-to-oxfmt
Aug 3, 2026
Merged

feat(build): migrate from Prettier to Oxfmt for performant code formatting#42434
hainenber merged 11 commits 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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.43%. Comparing base (791305d) to head (7d9e0c5).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #42434   +/-   ##
=======================================
  Coverage   65.43%   65.43%           
=======================================
  Files        2810     2810           
  Lines      159528   159537    +9     
  Branches    36410    36419    +9     
=======================================
+ Hits       104380   104387    +7     
- Misses      53102    53104    +2     
  Partials     2046     2046           
Flag Coverage Δ
hive 38.06% <ø> (ø)
javascript 71.56% <ø> (+<0.01%) ⬆️
mysql 57.77% <ø> (ø)
postgres 57.82% <ø> (ø)
presto 39.95% <ø> (ø)
python 59.20% <ø> (ø)
sqlite 57.44% <ø> (ø)
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.

Signed-off-by: hainenber <dotronghai96@gmail.com>
@github-actions github-actions Bot added the doc Namespace | Anything related to documentation label Jul 28, 2026
@github-actions github-actions Bot added the github_actions Pull requests that update GitHub Actions code label Aug 2, 2026
Signed-off-by: hainenber <dotronghai96@gmail.com>
This was due to Oxfmt escaping the MDX/JSX comment syntax with literal backlash, failing MDX loader used by @Docusaurus

Signed-off-by: hainenber <dotronghai96@gmail.com>
@netlify

netlify Bot commented Aug 2, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 7d9e0c5
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a70ac56595ac40007dbf5d9
😎 Deploy Preview https://deploy-preview-42434--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hainenber
hainenber merged commit e4ef84c into master Aug 3, 2026
77 checks passed
@hainenber
hainenber deleted the feat/migrate-from-prettier-to-oxfmt branch August 3, 2026 17:27
@bito-code-review

Copy link
Copy Markdown
Contributor

Bito Automatic Review Skipped – PR Already Merged

Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.
No action is needed if you didn't intend to review it. To get a review, you can type /review in a comment and save it

mikebridge added a commit to mikebridge/superset that referenced this pull request Aug 3, 2026
…ame type

Post-rebase housekeeping for two things that landed on master:

- apache#42434 migrated the repo from Prettier to Oxfmt. Only three of this
  branch's files needed reformatting (the rest are new files Oxfmt had
  never seen); the changes are wrapping-only.
- apache#42711 removed `username` from the version payload's `changed_by`, so
  `VersionChangedBy` — which existed solely to add that field to
  `ActivityChangedBy` and had no other consumer — is deleted. `VersionMeta`
  now uses `ActivityChangedBy` directly, which is what the server-side
  schema-parity test enforces.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies:npm doc Namespace | Anything related to documentation frontend:refactor Related to refactoring the frontend github_actions Pull requests that update GitHub Actions code packages plugins size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants