pierrejeambrun commented on code in PR #76472:
URL: https://github.com/apache/airflow/pull/76472#discussion_r4513725827
##########
scripts/ci/prek/ts_compile_lint_ui.py:
##########
@@ -81,7 +81,7 @@
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", *all_non_yaml_files], cwd=dir)
Review Comment:
I think this breaks commits whose only UI changes are translation files. The
hook passes `public/i18n/locales/*.json`, oxfmt ignores them via
`ignorePatterns`, and with no target left it exits 2 ("Expected at least one
target file"), so `prek run ts-compile-lint-ui --files
airflow-core/src/airflow/ui/public/i18n/locales/de/common.json` fails. Prettier
silently skipped ignored files there. Could we pass
`--no-error-on-unmatched-pattern`?
```suggestion
run_command(["pnpm", "oxfmt", "--write",
"--no-error-on-unmatched-pattern", *all_non_yaml_files], cwd=dir)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]