Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,18 @@ repos:
language_version: python3
additional_dependencies: ['flynt']
files: \.py$
- id: ui-lint
name: Lint React UI
language: node
entry: bash
args: ["-c", "cd airflow/ui && yarn install && yarn lint"]
files: ^airflow/ui/.*\.(ts|tsx)$
- id: ui-test
name: Test React UI
language: node
entry: bash
args: ["-c", "cd airflow/ui && yarn install && yarn test"]
files: ^airflow/ui/.*\.(ts|tsx)$
## ADD MOST PRE-COMMITS ABOVE THAT LINE
# The below pre-commits are those requiring CI image to be built
- id: build
Expand Down
4 changes: 2 additions & 2 deletions BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2318,8 +2318,8 @@ This is the current syntax for `./breeze <./breeze>`_:
pre-commit-hook-names provide-create-sessions providers-init-file provider-yamls
pydevd pydocstyle pylint pylint-tests python-no-log-warn pyupgrade
restrict-start_date rst-backticks setup-order setup-extra-packages shellcheck
sort-in-the-wild sort-spelling-wordlist stylelint trailing-whitespace
update-breeze-file update-extras update-local-yml-file update-setup-cfg-file
sort-in-the-wild sort-spelling-wordlist stylelint trailing-whitespace ui-lint
ui-test update-breeze-file update-extras update-local-yml-file update-setup-cfg-file
version-sync yamllint

You can pass extra arguments including options to the pre-commit framework as
Expand Down
4 changes: 4 additions & 0 deletions STATIC_CODE_CHECKS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ require Breeze Docker images to be installed locally:
----------------------------------- ---------------------------------------------------------------- ------------
``trailing-whitespace`` Removes trailing whitespace at end of line
----------------------------------- ---------------------------------------------------------------- ------------
``ui-lint`` Lint the React UI
----------------------------------- ---------------------------------------------------------------- ------------
``ui-test`` Test the React UI
----------------------------------- ---------------------------------------------------------------- ------------
``update-breeze-file`` Update output of breeze command in BREEZE.rst
----------------------------------- ---------------------------------------------------------------- ------------
``update-extras`` Updates extras in the documentation
Expand Down
2 changes: 2 additions & 0 deletions airflow/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"@types/react-dom": "^17.0.2",
"eslint": "^7",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"jest": "^26",
"neutrino": "^9.5.0",
"neutrinojs-typescript": "^1.1.6",
Expand Down
Loading