This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 97240872160 Replace Prettier with oxfmt (#76472)
97240872160 is described below
commit 9724087216039c18f560081e558948d2846beb41
Author: Brent Bovenzi <[email protected]>
AuthorDate: Mon Nov 9 10:59:17 2026 -0500
Replace Prettier with oxfmt (#76472)
* UI: Replace Prettier with oxfmt
Formatting the UI package took ~12s with Prettier, a cost every contributor
pays
through the prek hook and again in CI. oxfmt does the same work in ~0.3s.
The nine import groups from the Prettier sort-imports plugin carry over as
oxfmt
sortImports groups, so import order does not change. Keeping react in its
own
first group also keeps the license header above the first import; merged
into
the package group, @chakra-ui/react sorts ahead of react and is hoisted
above
the header.
The seven source files that change are oxfmt's two formatting differences
from
Prettier: multi-line unions get a leading pipe, and one negated condition
wraps
inside the if parentheses.
Codegen no longer passes --format prettier: openapi-gen is excluded from
formatting and the generated files are byte-for-byte identical without it.
Co-Authored-By: Claude <[email protected]>
* Drop the oxc VS Code extension from the devcontainers
The devcontainers never recommended a Prettier extension, so recommending
one for
oxfmt is an addition rather than part of the swap. Formatting is enforced
by the
prek hook and CI whatever the editor.
Co-Authored-By: Claude <[email protected]>
* Document oxfmt's CSS and HTML coverage and the exact react import group
oxfmt formats the UI's CSS and HTML files as Prettier did, so the node setup
guide should still list them. The react import group must stay an exact
match:
a react* pattern would also pull react-dom and react-router-dom into the
first
group.
Co-Authored-By: Claude <[email protected]>
* Keep the UI hook passing on locale-only commits
oxfmt exits with an error when every file it is given is ignored, which is
the case for a commit that only touches translation files. Prettier skipped
ignored files silently.
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
---
.github/dependabot.yml | 3 +
.rat-excludes | 2 +
airflow-core/.pre-commit-config.yaml | 2 +-
airflow-core/src/airflow/ui/.oxfmtrc.json | 51 +++
airflow-core/src/airflow/ui/.prettierignore | 9 -
airflow-core/src/airflow/ui/.prettierrc | 23 --
airflow-core/src/airflow/ui/eslint.config.js | 2 -
airflow-core/src/airflow/ui/package.json | 10 +-
airflow-core/src/airflow/ui/pnpm-lock.yaml | 345 +++++++++++++--------
airflow-core/src/airflow/ui/rules/perfectionist.js | 8 +-
airflow-core/src/airflow/ui/rules/prettier.js | 38 ---
.../airflow/ui/src/components/FilterBar/types.ts | 9 +-
.../ui/src/components/TaskInstanceTooltip.tsx | 4 +-
.../src/pages/Asset/CreateAssetEventModal.test.tsx | 6 +-
.../airflow/ui/src/pages/Dag/Calendar/Calendar.tsx | 6 +-
.../src/airflow/ui/src/pages/ReactPlugin.tsx | 3 +-
.../ui/src/queries/useCreateBackfill.test.tsx | 3 +-
.../src/airflow/ui/src/queries/useTrigger.test.tsx | 3 +-
contributing-docs/15_node_environment_setup.rst | 5 +-
scripts/ci/prek/ts_compile_lint_ui.py | 4 +-
20 files changed, 316 insertions(+), 220 deletions(-)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index c310b473518..761fc2de44b 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -134,6 +134,9 @@ updates:
patterns:
- "eslint*"
- "@eslint/*"
+ oxc:
+ patterns:
+ - "oxfmt"
typescript:
patterns:
- "typescript*"
diff --git a/.rat-excludes b/.rat-excludes
index b41f42959cf..7dfd209b529 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -14,6 +14,7 @@
.codespellignorelines
.eslintignore
.eslintrc
+.oxfmtrc.json
.prettierignore
.prettierrc
.rat-excludes
@@ -211,6 +212,7 @@ www-hash.txt
**/.gitattributes
**/.rat-excludes
**/.gitignore
+**/.oxfmtrc.json
**/.prettierignore
**/.prettierrc
**/.airflowignore
diff --git a/airflow-core/.pre-commit-config.yaml
b/airflow-core/.pre-commit-config.yaml
index 293a892159b..b6fc7153d05 100644
--- a/airflow-core/.pre-commit-config.yaml
+++ b/airflow-core/.pre-commit-config.yaml
@@ -242,7 +242,7 @@ repos:
name: Compile / format / lint UI
env:
PYTHONPYCACHEPREFIX: .build/pycache
- description: TS types generation / ESLint / Prettier new UI files
+ description: TS types generation / ESLint / Oxfmt new UI files
language: node
files: |
(?x)
diff --git a/airflow-core/src/airflow/ui/.oxfmtrc.json
b/airflow-core/src/airflow/ui/.oxfmtrc.json
new file mode 100644
index 00000000000..9270602d38c
--- /dev/null
+++ b/airflow-core/src/airflow/ui/.oxfmtrc.json
@@ -0,0 +1,51 @@
+{
+ "$schema": "./node_modules/oxfmt/configuration_schema.json",
+ "endOfLine": "lf",
+ "printWidth": 110,
+ "singleQuote": false,
+ "jsxSingleQuote": false,
+ "tabWidth": 2,
+ "trailingComma": "all",
+ "useTabs": false,
+ "sortPackageJson": false,
+ "sortImports": {
+ "groups": [
+ "react",
+ ["builtin", "external"],
+ "openapi",
+ "system-components",
+ "layouts",
+ "pages",
+ "components",
+ "app",
+ ["parent", "sibling", "index"]
+ ],
+ "customGroups": [
+ // Exact match: "react*" would also pull react-dom and react-router-dom
into this group.
+ { "groupName": "react", "elementNamePattern": ["react"] },
+ { "groupName": "openapi", "elementNamePattern": ["openapi/**"] },
+ {
+ "groupName": "system-components",
+ "elementNamePattern": ["src/system-components",
"src/system-components/**"]
+ },
+ { "groupName": "layouts", "elementNamePattern": ["src/layouts/**"] },
+ { "groupName": "pages", "elementNamePattern": ["src/pages/**"] },
+ { "groupName": "components", "elementNamePattern": ["src/components/**"]
},
+ { "groupName": "app", "elementNamePattern": ["src/**", "tests/**"] }
+ ],
+ "newlinesBetween": true,
+ "ignoreCase": false,
+ "sortSideEffects": false
+ },
+ "ignorePatterns": [
+ ".mypy_cache/",
+ "templates/**/*.html",
+ "dist/",
+ "*.md",
+ "*.yaml",
+ "coverage/*",
+ ".pnpm-store",
+ "public/i18n/locales/*",
+ "openapi-gen/"
+ ]
+}
diff --git a/airflow-core/src/airflow/ui/.prettierignore
b/airflow-core/src/airflow/ui/.prettierignore
deleted file mode 100644
index b90ad27ecef..00000000000
--- a/airflow-core/src/airflow/ui/.prettierignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.mypy_cache/
-templates/**/*.html
-dist/
-*.md
-*.yaml
-coverage/*
-.pnpm-store
-public/i18n/locales/*
-openapi-gen/
diff --git a/airflow-core/src/airflow/ui/.prettierrc
b/airflow-core/src/airflow/ui/.prettierrc
deleted file mode 100644
index bfe5d88dec9..00000000000
--- a/airflow-core/src/airflow/ui/.prettierrc
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "$schema": "http://json.schemastore.org/prettierrc",
- "endOfLine": "lf",
- "importOrder": [
- "^react$",
- "<THIRD_PARTY_MODULES>",
- "^openapi/",
- "^src/system-components",
- "^src/layouts",
- "^src/pages",
- "^src/components",
- "^(src|tests)/",
- "^[./]"
- ],
- "importOrderSeparation": true,
- "jsxSingleQuote": false,
- "plugins": ["@trivago/prettier-plugin-sort-imports"],
- "printWidth": 110,
- "singleQuote": false,
- "tabWidth": 2,
- "trailingComma": "all",
- "useTabs": false
-}
diff --git a/airflow-core/src/airflow/ui/eslint.config.js
b/airflow-core/src/airflow/ui/eslint.config.js
index ecc7708995a..f1efb9a038f 100644
--- a/airflow-core/src/airflow/ui/eslint.config.js
+++ b/airflow-core/src/airflow/ui/eslint.config.js
@@ -24,7 +24,6 @@ import { i18nRules } from "./rules/i18n.js";
import { i18nextRules } from "./rules/i18next.js";
import { jsoncRules } from "./rules/jsonc.js";
import { perfectionistRules } from "./rules/perfectionist.js";
-import { prettierRules } from "./rules/prettier.js";
import { reactRules } from "./rules/react.js";
import { remRules } from "./rules/rem.js";
import { stylisticRules } from "./rules/stylistic.js";
@@ -43,7 +42,6 @@ export default /** @type {const} @satisfies
{ReadonlyArray<FlatConfig.Config>} *
typescriptRules,
// Da rest
perfectionistRules,
- prettierRules,
reactRules,
stylisticRules,
remRules,
diff --git a/airflow-core/src/airflow/ui/package.json
b/airflow-core/src/airflow/ui/package.json
index 5f7188f76fa..44fca7395aa 100644
--- a/airflow-core/src/airflow/ui/package.json
+++ b/airflow-core/src/airflow/ui/package.json
@@ -12,9 +12,10 @@
"build": "vite build",
"lint": "eslint --quiet && tsc --p tsconfig.app.json",
"lint:fix": "eslint --fix && tsc --p tsconfig.app.json",
- "format": "pnpm prettier --write .",
+ "format": "oxfmt --write .",
+ "format:check": "oxfmt --check .",
"preview": "vite preview",
- "codegen": "openapi-merge-cli && openapi-rq -i openapi.merged.json -c
axios --format prettier -o openapi-gen --operationId",
+ "codegen": "openapi-merge-cli && openapi-rq -i openapi.merged.json -c
axios -o openapi-gen --operationId",
"test": "vitest run",
"coverage": "vitest run --coverage",
"test:e2e": "playwright test",
@@ -84,7 +85,6 @@
"@tanstack/eslint-plugin-query": "^5.105.3",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
- "@trivago/prettier-plugin-sort-imports": "^6.0.2",
"@types/culori": "^4.0.1",
"@types/node": "^26.6.6",
"@types/react": "^19.3.0",
@@ -97,12 +97,10 @@
"@vitest/coverage-v8": "^5.1.0",
"babel-plugin-react-compiler": "^1.0.0",
"eslint": "^10.11.0",
- "eslint-config-prettier": "^10.1.8",
"eslint-plugin-i18next": "^6.1.5",
"eslint-plugin-jsonc": "^3.4.2",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-perfectionist": "^5.12.1",
- "eslint-plugin-prettier": "^5.5.6",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.7",
@@ -112,7 +110,7 @@
"jsonc-eslint-parser": "^3.3.0",
"msw": "^3.0.3",
"openapi-merge-cli": "^2.0.2",
- "prettier": "^3.9.10",
+ "oxfmt": "0.75.0",
"ts-morph": "^27.0.2",
"typescript": "^6.0.3",
"typescript-eslint": "^8.72.1",
diff --git a/airflow-core/src/airflow/ui/pnpm-lock.yaml
b/airflow-core/src/airflow/ui/pnpm-lock.yaml
index 6078142e757..9abaf32a65e 100644
--- a/airflow-core/src/airflow/ui/pnpm-lock.yaml
+++ b/airflow-core/src/airflow/ui/pnpm-lock.yaml
@@ -215,9 +215,6 @@ importers:
'@testing-library/react':
specifier: ^16.3.3
version:
16.3.3(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@trivago/prettier-plugin-sort-imports':
- specifier: ^6.0.2
- version: 6.0.2([email protected])
'@types/culori':
specifier: ^4.0.1
version: 4.0.1
@@ -254,9 +251,6 @@ importers:
eslint:
specifier: ^10.11.0
version: 10.11.0([email protected])
- eslint-config-prettier:
- specifier: ^10.1.8
- version: 10.1.8([email protected]([email protected]))
eslint-plugin-i18next:
specifier: ^6.1.5
version: 6.1.5
@@ -269,9 +263,6 @@ importers:
eslint-plugin-perfectionist:
specifier: ^5.12.1
version: 5.12.1([email protected]([email protected]))([email protected])
- eslint-plugin-prettier:
- specifier: ^5.5.6
- version:
5.5.6([email protected]([email protected]([email protected])))([email protected]([email protected]))([email protected])
eslint-plugin-react:
specifier: ^7.37.5
version: 7.37.5([email protected]([email protected]))
@@ -299,9 +290,9 @@ importers:
openapi-merge-cli:
specifier: ^2.0.2
version: 2.0.2
- prettier:
- specifier: ^3.9.10
- version: 3.9.10
+ oxfmt:
+ specifier: 0.75.0
+ version: 0.75.0
ts-morph:
specifier: ^27.0.2
version: 27.0.2
@@ -811,6 +802,120 @@ packages:
'@oxc-project/[email protected]':
resolution: {integrity:
sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==}
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-zHJ7LcTN46/5mtoLxsUu14pdF9ixFwDURtmxZ0CeNwqom5qB5NRVqU6o2GRZ7QPdNBW8G6j9UTJzQ+EDevMH0w==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm]
+ os: [android]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-IdxsKZJvHZUvI7q6kLmzXdEFpFiBEDQw/WJtSp1QlzNXBw1JlLN3tY50WwWd4doPnq86XW4P+7BsQwu6meCW+w==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [android]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-vyiqZilO5jal/nXZ0143NyKcP6TkzjaQdVEWU/kwgyWqugAgIRgAbrnO3MOF+e6LkQu3CrtrkPoc3mrsZZY6cA==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-oua7eVqVe769mDam6ORcavygxTzG3ovo5QRQ1kJCPaEbnWXPYhtAiYDj8pajVmFjO7j8Elf3gInnWpTX0LLYtg==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [x64]
+ os: [darwin]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-NWkbezhg7mx2Ep94g/TysR3c1bsISsU4lQ6t5xI4841PAk0Kqcn1+UEe+BoFH2/UK2YegPXq+OF+0bUcSvUalA==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [x64]
+ os: [freebsd]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-CAHX87kJplTq2E0OWP7opG8gEVlHc7CeLEi4nMJOyx3psuqBKf84HZ3UIkX2guWEJ5UljU2zJF0o46XylywVVA==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm]
+ os: [linux]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-jmxYOiQzx2fp+OwQb7717K1zI8AMKEykw04sfr95/mU8SIL/oKgQq8nXH42sEznEquBL2RU7nLY36eBnYFT+vg==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm]
+ os: [linux]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-eimaiAhx08dbOg12Fj3PYhymXY8vRbaiJB505vDXMy6ohne3Y1qTS0e5KEwFMq3LmDjEO+16BX38c/oXFI/SAQ==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [linux]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-bjSONIG1ba2xugr9oHQau0E6oPFYOMjPaa5hK/wpVC/Q1pcgf2BZMKwbuA8/cWzhWX5QV/UdPzD+rw1kQHpikQ==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [linux]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-wDksWQXC/KZucISyqlhBtvpW+pyHh8z0Cjm6Qxiv22XlllM2Bx5gJGDnPYjV+H0lL+o1iqLlEli8jmBuRCLcjw==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [ppc64]
+ os: [linux]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-5JkNwViqaVuk4I+9+zgVrEYiHOAPXFxgDgP6iDnpdOBjm7XAHAOjSvolHZZAokWPx7CGOw8tKteXmn4WPIInaQ==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [riscv64]
+ os: [linux]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-1EVqRIE0eZLB08j3ZCVN47Ors7LCXGmOI+3xJYgyoFUKUerD3Glxb+Q1Bp3lK8NeT5R3ZdS9uhX/wobNBYZ6jw==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [riscv64]
+ os: [linux]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-UJWRVNT6Yuw4ssLv2BwaBUWU1GWtByE+EnoHu8I+P1t8Kn+WozYU5WYOqb5aj8gbXJJ8gGZt+w40Hi/7L6iVLw==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [s390x]
+ os: [linux]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-FHdvHhyz8ChBctBUvVGti49kSEwANd1PZQwlXUEoF9Ed4plxXxk/wWc0mfZmrze2lRgmME7ytDmVIOixYauQhg==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [x64]
+ os: [linux]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-6MjtsF96s9mSBV0GEwUe4pOFPP2Mz7ahcHPAit0DSKL5fM6oMM7RG1zvYxwB7+SBkIxsWBRhhxuqmy7pibNwsA==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [x64]
+ os: [linux]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-1D6T6aL1Pj+U5GLxqwV1fKjUJ5+FFm+bn7UrqNDMveZmWs0jo/3vc+dzzuV/jF/FdVo12gowODk3SnAO2YOwLg==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [openharmony]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-RX2eUmy7J/nM8+tnM3nzR8t1eqkwj1q8Kgo7beA+4DVgKYYHHyrEa3qEmthxw7Z+HqpCCEOWuoqa+jelo9/w2Q==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [arm64]
+ os: [win32]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-UpKta0iSZmPLII0dYXYdbzdBTsGREUbSHLqgLdtKcqBvs40qjmUz+cgUcaU1smPx13DfbEG4XqnaSn5MoFN0og==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [ia32]
+ os: [win32]
+
+ '@oxfmt/[email protected]':
+ resolution: {integrity:
sha512-pjiLiCk0QMCWxs0n5XiNU85YLAKA+wJxPjxlDVygmr4bP4glcfTU2nOpso5nR4Rdi2Pxv5YwakD4UE+eh7M0BQ==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ cpu: [x64]
+ os: [win32]
+
'@pandacss/[email protected]':
resolution: {integrity:
sha512-JFmahiSKrpBE48NHl8NIsNO5e5y1SrOrOGvyle9h9rkNrYw+RJrm5CLeGimmyhg2FIymsmZE76sDnw5Zuu2LVA==}
engines: {node: '>=20'}
@@ -869,42 +974,36 @@ packages:
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [linux]
- libc: [glibc]
'@rolldown/[email protected]':
resolution: {integrity:
sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [linux]
- libc: [musl]
'@rolldown/[email protected]':
resolution: {integrity:
sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [ppc64]
os: [linux]
- libc: [glibc]
'@rolldown/[email protected]':
resolution: {integrity:
sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [s390x]
os: [linux]
- libc: [glibc]
'@rolldown/[email protected]':
resolution: {integrity:
sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [linux]
- libc: [glibc]
'@rolldown/[email protected]':
resolution: {integrity:
sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [linux]
- libc: [musl]
'@rolldown/[email protected]':
resolution: {integrity:
sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==}
@@ -1031,25 +1130,6 @@ packages:
'@types/react-dom':
optional: true
- '@trivago/[email protected]':
- resolution: {integrity:
sha512-3DgfkukFyC/sE/VuYjaUUWoFfuVjPK55vOFDsxD56XXynFMCZDYFogH2l/hDfOsQAm1myoU/1xByJ3tWqtulXA==}
- engines: {node: '>= 20'}
- peerDependencies:
- '@vue/compiler-sfc': 3.x
- prettier: 2.x - 3.x
- prettier-plugin-ember-template-tag: '>= 2.0.0'
- prettier-plugin-svelte: 3.x
- svelte: 4.x || 5.x
- peerDependenciesMeta:
- '@vue/compiler-sfc':
- optional: true
- prettier-plugin-ember-template-tag:
- optional: true
- prettier-plugin-svelte:
- optional: true
- svelte:
- optional: true
-
'@ts-morph/[email protected]':
resolution: {integrity:
sha512-W74iWf7ILp1ZKNYXY5qbddNaml7e9Sedv5lvU1V8lftlitkc9Pq1A+jlH23ltDgWYeZFFEqGCD1Ies9hqu3O+g==}
@@ -2420,12 +2500,6 @@ packages:
resolution: {integrity:
sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==}
engines: {node: '>=12'}
- [email protected]:
- resolution: {integrity:
sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==}
- hasBin: true
- peerDependencies:
- eslint: '>=7.0.0'
-
[email protected]:
resolution: {integrity:
sha512-RbBmDFyu7FqnjE8F0ZxPNzx5UaptdeS9Uu50r7A+D7s/+FCX+ybiyViYEgFUaFIFqSWJgZRTpL5d8Kanxxl2lQ==}
engines: {node: '>=12'}
@@ -2462,20 +2536,6 @@ packages:
eslint:
optional: true
- [email protected]:
- resolution: {integrity:
sha512-ifetmTcxWfz+4qRW3pH/ujdTq2jQIj59AxJMIN26K5avYgU8dxycUETQonWiW+wPrYXA0j3Try0l1CnwVQtDqQ==}
- engines: {node: ^14.18.0 || >=16.0.0}
- peerDependencies:
- '@types/eslint': '>=8.0.0'
- eslint: '>=8.0.0'
- eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0'
- prettier: '>=3.0.0'
- peerDependenciesMeta:
- '@types/eslint':
- optional: true
- eslint-config-prettier:
- optional: true
-
[email protected]:
resolution: {integrity:
sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g==}
engines: {node: '>=18'}
@@ -2565,9 +2625,6 @@ packages:
[email protected]:
resolution: {integrity:
sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
- [email protected]:
- resolution: {integrity:
sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==}
-
[email protected]:
resolution: {integrity:
sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
@@ -3040,9 +3097,6 @@ packages:
[email protected]:
resolution: {integrity:
sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}
- [email protected]:
- resolution: {integrity:
sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==}
-
[email protected]:
resolution: {integrity:
sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==}
hasBin: true
@@ -3165,28 +3219,24 @@ packages:
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [linux]
- libc: [glibc]
[email protected]:
resolution: {integrity:
sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [linux]
- libc: [musl]
[email protected]:
resolution: {integrity:
sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [linux]
- libc: [glibc]
[email protected]:
resolution: {integrity:
sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [linux]
- libc: [musl]
[email protected]:
resolution: {integrity:
sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==}
@@ -3570,6 +3620,22 @@ packages:
resolution: {integrity:
sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==}
engines: {node: '>= 0.4'}
+ [email protected]:
+ resolution: {integrity:
sha512-/ZKvY5asfsVi9hdkOmRIumqOPu6kxlTgiJSZf54uq29kKew+Gu1FFAnEkGePyvLVW+MAYu41D6XggnzoElQzPw==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ hasBin: true
+ peerDependencies:
+ '@astrojs/compiler-rs': ^0.5.0
+ svelte: ^5.0.0
+ vite-plus: '*'
+ peerDependenciesMeta:
+ '@astrojs/compiler-rs':
+ optional: true
+ svelte:
+ optional: true
+ vite-plus:
+ optional: true
+
[email protected]:
resolution: {integrity:
sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}
engines: {node: '>=10'}
@@ -3591,16 +3657,10 @@ packages:
[email protected]:
resolution: {integrity:
sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==}
- [email protected]:
- resolution: {integrity:
sha512-4s6vd6dx1AotCx/RCI2m7t7GCh5bDRUtGNvRfHSP2wbBQdMi67pPe7mtzmgwcaQ8VKK/6IB7Glfyu3qdZJPybQ==}
-
[email protected]:
resolution: {integrity:
sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}
engines: {node: '>=8'}
- [email protected]:
- resolution: {integrity:
sha512-HlsyYdMBnbPQ9Jr/VgJ1YF4scnldvJpJxCVx6KgqPL4dxppsWrJHCIIxQXMJrqGnsRkNPATbeMJ8Yxu7JMsYcA==}
-
[email protected]:
resolution: {integrity:
sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==}
@@ -3687,15 +3747,6 @@ packages:
resolution: {integrity:
sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
- [email protected]:
- resolution: {integrity:
sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg==}
- engines: {node: '>=6.0.0'}
-
- [email protected]:
- resolution: {integrity:
sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==}
- engines: {node: '>=14'}
- hasBin: true
-
[email protected]:
resolution: {integrity:
sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
@@ -4138,6 +4189,10 @@ packages:
resolution: {integrity:
sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==}
engines: {node: '>=12.0.0'}
+ [email protected]:
+ resolution: {integrity:
sha512-jBrmx4lYmaC9k/mgPbylxs7kBUxHtD8256up+HjLaDFfXScKJQyil+SWXSvhAtT7XHo+yTVlpB81PGmHP8oLSQ==}
+ engines: {node: ^20.0.0 || >=22.0.0}
+
[email protected]:
resolution: {integrity:
sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==}
engines: {node: '>=14.0.0'}
@@ -5178,6 +5233,63 @@ snapshots:
'@oxc-project/[email protected]': {}
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
+ '@oxfmt/[email protected]':
+ optional: true
+
'@pandacss/[email protected]': {}
'@pkgjs/[email protected]':
@@ -5340,20 +5452,6 @@ snapshots:
'@types/react': 19.3.0
'@types/react-dom': 19.3.0(@types/[email protected])
- '@trivago/[email protected]([email protected])':
- dependencies:
- '@babel/generator': 7.29.1
- '@babel/parser': 7.29.7
- '@babel/traverse': 7.29.0
- '@babel/types': 7.29.7
- javascript-natural-sort: 0.7.1
- lodash-es: 4.18.1
- minimatch: 9.0.9
- parse-imports-exports: 0.2.4
- prettier: 3.9.10
- transitivePeerDependencies:
- - supports-color
-
'@ts-morph/[email protected]':
dependencies:
minimatch: 10.2.6
@@ -7216,10 +7314,6 @@ snapshots:
[email protected]: {}
- [email protected]([email protected]([email protected])):
- dependencies:
- eslint: 10.11.0([email protected])
-
[email protected]([email protected]([email protected]))([email protected]):
dependencies:
eslint: 10.11.0([email protected])
@@ -7275,15 +7369,6 @@ snapshots:
- supports-color
- typescript
-
[email protected]([email protected]([email protected]([email protected])))([email protected]([email protected]))([email protected]):
- dependencies:
- eslint: 10.11.0([email protected])
- prettier: 3.9.10
- prettier-linter-helpers: 1.0.1
- synckit: 0.11.13
- optionalDependencies:
- eslint-config-prettier: 10.1.8([email protected]([email protected]))
-
[email protected]([email protected]([email protected])):
dependencies:
'@babel/core': 7.29.7
@@ -7431,8 +7516,6 @@ snapshots:
[email protected]: {}
- [email protected]: {}
-
[email protected]: {}
[email protected]: {}
@@ -7956,8 +8039,6 @@ snapshots:
optionalDependencies:
'@pkgjs/parseargs': 0.11.0
- [email protected]: {}
-
[email protected]: {}
[email protected]: {}
@@ -8705,6 +8786,30 @@ snapshots:
object-keys: 1.1.1
safe-push-apply: 1.0.0
+ [email protected]:
+ dependencies:
+ tinypool: 2.2.0
+ optionalDependencies:
+ '@oxfmt/binding-android-arm-eabi': 0.75.0
+ '@oxfmt/binding-android-arm64': 0.75.0
+ '@oxfmt/binding-darwin-arm64': 0.75.0
+ '@oxfmt/binding-darwin-x64': 0.75.0
+ '@oxfmt/binding-freebsd-x64': 0.75.0
+ '@oxfmt/binding-linux-arm-gnueabihf': 0.75.0
+ '@oxfmt/binding-linux-arm-musleabihf': 0.75.0
+ '@oxfmt/binding-linux-arm64-gnu': 0.75.0
+ '@oxfmt/binding-linux-arm64-musl': 0.75.0
+ '@oxfmt/binding-linux-ppc64-gnu': 0.75.0
+ '@oxfmt/binding-linux-riscv64-gnu': 0.75.0
+ '@oxfmt/binding-linux-riscv64-musl': 0.75.0
+ '@oxfmt/binding-linux-s390x-gnu': 0.75.0
+ '@oxfmt/binding-linux-x64-gnu': 0.75.0
+ '@oxfmt/binding-linux-x64-musl': 0.75.0
+ '@oxfmt/binding-openharmony-arm64': 0.75.0
+ '@oxfmt/binding-win32-arm64-msvc': 0.75.0
+ '@oxfmt/binding-win32-ia32-msvc': 0.75.0
+ '@oxfmt/binding-win32-x64-msvc': 0.75.0
+
[email protected]:
dependencies:
yocto-queue: 0.1.0
@@ -8731,10 +8836,6 @@ snapshots:
is-decimal: 2.0.1
is-hexadecimal: 2.0.1
- [email protected]:
- dependencies:
- parse-statements: 1.0.11
-
[email protected]:
dependencies:
'@babel/code-frame': 7.29.0
@@ -8742,8 +8843,6 @@ snapshots:
json-parse-even-better-errors: 2.3.1
lines-and-columns: 1.2.4
- [email protected]: {}
-
[email protected]:
dependencies:
entities: 6.0.1
@@ -8810,12 +8909,6 @@ snapshots:
[email protected]: {}
- [email protected]:
- dependencies:
- fast-diff: 1.3.0
-
- [email protected]: {}
-
[email protected]:
dependencies:
ansi-regex: 5.0.1
@@ -9362,6 +9455,8 @@ snapshots:
fdir: 6.5.0([email protected])
picomatch: 4.0.7
+ [email protected]: {}
+
[email protected]: {}
[email protected]: {}
diff --git a/airflow-core/src/airflow/ui/rules/perfectionist.js
b/airflow-core/src/airflow/ui/rules/perfectionist.js
index a1e4dd70fb0..0451f79b8ac 100644
--- a/airflow-core/src/airflow/ui/rules/perfectionist.js
+++ b/airflow-core/src/airflow/ui/rules/perfectionist.js
@@ -62,10 +62,10 @@ export const perfectionistRules = /** @type {const}
@satisfies {FlatConfig.Confi
/*
* `sort-imports` is intentionally left off: import order is owned by
- * `@trivago/prettier-plugin-sort-imports` (see `importOrder` in
- * `.prettierrc`). The prek hook runs `eslint --fix` before
- * `prettier --write`, so enabling it here would let Prettier overwrite
- * ESLint's ordering and leave `pnpm lint` failing with no possible fix.
+ * oxfmt's `sortImports` (see `.oxfmtrc.json`). The prek hook runs
+ * `eslint --fix` before `oxfmt --write`, so enabling it here would let
+ * oxfmt overwrite ESLint's ordering and leave `pnpm lint` failing with no
+ * possible fix.
*/
/**
diff --git a/airflow-core/src/airflow/ui/rules/prettier.js
b/airflow-core/src/airflow/ui/rules/prettier.js
deleted file mode 100644
index 9fa5cdae0b8..00000000000
--- a/airflow-core/src/airflow/ui/rules/prettier.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*!
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/**
- * @import { FlatConfig } from "@typescript-eslint/utils/ts-eslint";
- */
-import prettier from "eslint-plugin-prettier";
-
-import { off } from "./off.js";
-
-/**
- * ESLint TypeScript namespace.
- */
-export const prettierNamespace = "prettier";
-
-/**
- * ESLint Prettier rules.
- * @see
[eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)
- */
-export const prettierRules = /** @type {const} @satisfies {FlatConfig.Config}
*/ ({
- plugins: { [prettierNamespace]: prettier },
- rules: off("no-irregular-whitespace", "no-unexpected-multiline"),
-});
diff --git a/airflow-core/src/airflow/ui/src/components/FilterBar/types.ts
b/airflow-core/src/airflow/ui/src/components/FilterBar/types.ts
index e310996bbf4..0e20758d459 100644
--- a/airflow-core/src/airflow/ui/src/components/FilterBar/types.ts
+++ b/airflow-core/src/airflow/ui/src/components/FilterBar/types.ts
@@ -30,7 +30,14 @@ export type CompositeFilterValue = Record<string, string>;
// A ``boolean`` filter's value is the string ``"true"``; absent means off.
Keeping it a
// string avoids ``isValidFilterValue`` treating ``false`` as a value worth
writing to the URL.
export type FilterValue =
- Array<string> | CompositeFilterValue | Date | DateRangeValue | number |
string | null | undefined;
+ | Array<string>
+ | CompositeFilterValue
+ | Date
+ | DateRangeValue
+ | number
+ | string
+ | null
+ | undefined;
export type FilterConfig = {
readonly defaultValue?: FilterValue;
diff --git a/airflow-core/src/airflow/ui/src/components/TaskInstanceTooltip.tsx
b/airflow-core/src/airflow/ui/src/components/TaskInstanceTooltip.tsx
index 4c57757ab05..50bd0779095 100644
--- a/airflow-core/src/airflow/ui/src/components/TaskInstanceTooltip.tsx
+++ b/airflow-core/src/airflow/ui/src/components/TaskInstanceTooltip.tsx
@@ -43,7 +43,9 @@ type Props = {
readonly loopMaxIterations?: number | null;
readonly runId?: string | null;
readonly taskInstance?:
- LightGridTaskInstanceSummaryWithWhen | TaskInstanceHistoryResponse |
TaskInstanceResponse;
+ | LightGridTaskInstanceSummaryWithWhen
+ | TaskInstanceHistoryResponse
+ | TaskInstanceResponse;
readonly tooltip?: string | null;
} & Omit<TooltipProps, "content">;
diff --git
a/airflow-core/src/airflow/ui/src/pages/Asset/CreateAssetEventModal.test.tsx
b/airflow-core/src/airflow/ui/src/pages/Asset/CreateAssetEventModal.test.tsx
index 37bcb5d91da..3e49a9932ac 100644
--- a/airflow-core/src/airflow/ui/src/pages/Asset/CreateAssetEventModal.test.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Asset/CreateAssetEventModal.test.tsx
@@ -282,7 +282,8 @@ describe("CreateAssetEventModal", () => {
render(<CreateAssetEventModal asset={asset} onClose={vi.fn()} open />, {
wrapper: Wrapper });
const onSuccess =
vi.mocked(useAssetServiceCreateAssetEvent).mock.calls.at(-1)?.[0]?.onSuccess as
- ((data: AssetEventResponse) => Promise<void>) | undefined;
+ | ((data: AssetEventResponse) => Promise<void>)
+ | undefined;
await onSuccess?.({ id: 1 } as unknown as AssetEventResponse);
@@ -358,7 +359,8 @@ describe("CreateAssetEventModal", () => {
render(<CreateAssetEventModal asset={asset} onClose={vi.fn()} open />, {
wrapper: Wrapper });
const onSuccess =
vi.mocked(useAssetServiceMaterializeAsset).mock.calls.at(-1)?.[0]?.onSuccess as
- ((data: DAGRunResponse) => Promise<void>) | undefined;
+ | ((data: DAGRunResponse) => Promise<void>)
+ | undefined;
expect(onSuccess).toBeTypeOf("function");
await onSuccess?.({ dag_id: "upstream_dag", dag_run_id: "materialize__run"
} as DAGRunResponse);
diff --git a/airflow-core/src/airflow/ui/src/pages/Dag/Calendar/Calendar.tsx
b/airflow-core/src/airflow/ui/src/pages/Dag/Calendar/Calendar.tsx
index 2bf5d2d7b79..35f2b4d0fb1 100644
--- a/airflow-core/src/airflow/ui/src/pages/Dag/Calendar/Calendar.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Dag/Calendar/Calendar.tsx
@@ -215,9 +215,9 @@ export const Calendar = () => {
fontWeight="bold"
minWidth="120px"
onClick={() => {
- if (!(
- selectedDate.isSame(currentDate, "month") &&
selectedDate.isSame(currentDate, "year")
- )) {
+ if (
+ !(selectedDate.isSame(currentDate, "month") &&
selectedDate.isSame(currentDate, "year"))
+ ) {
setSelectedDate(currentDate.startOf("month"));
}
}}
diff --git a/airflow-core/src/airflow/ui/src/pages/ReactPlugin.tsx
b/airflow-core/src/airflow/ui/src/pages/ReactPlugin.tsx
index 5299afdaf51..6a428e3c4d0 100644
--- a/airflow-core/src/airflow/ui/src/pages/ReactPlugin.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/ReactPlugin.tsx
@@ -74,7 +74,8 @@ export const loadPlugin = (
// Store components in globalThis[reactApp.name] to avoid conflicts with
the shared globalThis.AirflowPlugin
// global variable.
let pluginComponent = (globalThis as Record<string,
unknown>)[reactApp.name] as
- PluginComponentType | undefined;
+ | PluginComponentType
+ | undefined;
if (pluginComponent === undefined) {
pluginComponent = (globalThis as Record<string,
unknown>).AirflowPlugin as PluginComponentType;
diff --git a/airflow-core/src/airflow/ui/src/queries/useCreateBackfill.test.tsx
b/airflow-core/src/airflow/ui/src/queries/useCreateBackfill.test.tsx
index 2abc9a8019d..4f4deaeeddd 100644
--- a/airflow-core/src/airflow/ui/src/queries/useCreateBackfill.test.tsx
+++ b/airflow-core/src/airflow/ui/src/queries/useCreateBackfill.test.tsx
@@ -75,7 +75,8 @@ describe("useCreateBackfill", () => {
renderHook(() => useCreateBackfill({ onSuccessConfirm: vi.fn() }), {
wrapper: Wrapper });
const onSuccess =
vi.mocked(useBackfillServiceCreateBackfill).mock.calls.at(-1)?.[0]?.onSuccess as
- ((backfill: BackfillResponse, variables: CreateBackfillData) =>
Promise<void>) | undefined;
+ | ((backfill: BackfillResponse, variables: CreateBackfillData) =>
Promise<void>)
+ | undefined;
expect(onSuccess).toBeTypeOf("function");
await onSuccess?.({ dag_id: DAG_ID } as BackfillResponse,
buildRequest(drainDag));
diff --git a/airflow-core/src/airflow/ui/src/queries/useTrigger.test.tsx
b/airflow-core/src/airflow/ui/src/queries/useTrigger.test.tsx
index ed9a8087afc..b08d26bacd3 100644
--- a/airflow-core/src/airflow/ui/src/queries/useTrigger.test.tsx
+++ b/airflow-core/src/airflow/ui/src/queries/useTrigger.test.tsx
@@ -79,7 +79,8 @@ describe("useTrigger", () => {
renderHook(() => useTrigger({ dagId: DAG_ID, onSuccessConfirm: vi.fn() }),
{ wrapper: Wrapper });
const onSuccess =
vi.mocked(useDagRunServiceTriggerDagRun).mock.calls.at(-1)?.[0]?.onSuccess as
- ((dagRun: TriggerDagRunResponse, variables: TriggerDagRunData) =>
Promise<void>) | undefined;
+ | ((dagRun: TriggerDagRunResponse, variables: TriggerDagRunData) =>
Promise<void>)
+ | undefined;
expect(onSuccess).toBeTypeOf("function");
await onSuccess?.({ dag_id: DAG_ID, dag_run_id: "manual__run" } as
TriggerDagRunResponse, {
diff --git a/contributing-docs/15_node_environment_setup.rst
b/contributing-docs/15_node_environment_setup.rst
index 334d8f1ed5a..3bcb15be124 100644
--- a/contributing-docs/15_node_environment_setup.rst
+++ b/contributing-docs/15_node_environment_setup.rst
@@ -66,9 +66,12 @@ Follow the `nvm docs <https://github.com/nvm-sh/nvm>`__ to
manage your node vers
# Generate production build files will be at airflow/ui/dist
pnpm build
- # Format code in .ts, .tsx, .json, .css, .html files
+ # Format code in .ts, .tsx, .js, .json, .css, .html files (oxfmt)
pnpm format
+ # Check formatting without writing changes
+ pnpm format:check
+
# Check JS/TS code in .ts, .tsx, .html files and report any errors/warnings
pnpm lint
diff --git a/scripts/ci/prek/ts_compile_lint_ui.py
b/scripts/ci/prek/ts_compile_lint_ui.py
index 06bd3349306..7786b041919 100755
--- a/scripts/ci/prek/ts_compile_lint_ui.py
+++ b/scripts/ci/prek/ts_compile_lint_ui.py
@@ -81,7 +81,9 @@ if __name__ == "__main__":
run_command(["pnpm", "codegen"], cwd=dir)
if all_non_yaml_files:
run_command(["pnpm", "eslint", "--fix", *all_non_yaml_files], cwd=dir)
- run_command(["pnpm", "prettier", "--write", *all_non_yaml_files],
cwd=dir)
+ run_command(
+ ["pnpm", "oxfmt", "--write", "--no-error-on-unmatched-pattern",
*all_non_yaml_files], cwd=dir
+ )
if all_ts_files:
with temporary_tsc_project(dir / "tsconfig.app.json", all_ts_files) as
tsc_project:
run_command(["pnpm", "tsc", "--p", tsc_project.name], cwd=dir)