Skip to content

Commit fd3452d

Browse files
authored
Fix precommit (#2936)
* Remove husky * Remove husky * Added installing package * Remove double linting on CI * Remove double linting on CI
1 parent 5b8ce35 commit fd3452d

File tree

5 files changed

+56
-81
lines changed

5 files changed

+56
-81
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
PIP_PROGRESS_BAR: off
2525

2626
jobs:
27-
python-lint:
27+
code-lint:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- uses: actions/checkout@v4
@@ -35,18 +35,6 @@ jobs:
3535
- run: uv tool install pre-commit
3636
- run: pre-commit run -a --show-diff-on-failure
3737

38-
frontend-lint:
39-
runs-on: ubuntu-latest
40-
defaults:
41-
run:
42-
working-directory: frontend
43-
steps:
44-
- uses: actions/checkout@v4
45-
- name: Install modules
46-
run: npm install
47-
- name: Run Eslint
48-
run: npm run precommit
49-
5038
frontend-build:
5139
runs-on: ubuntu-latest
5240
defaults:
@@ -80,7 +68,7 @@ jobs:
8068
path: frontend/build
8169

8270
python-test:
83-
needs: [python-lint, frontend-build]
71+
needs: [code-lint, frontend-build]
8472
runs-on: ${{ matrix.os }}
8573
strategy:
8674
matrix:

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ repos:
1717
rev: v5.0.0
1818
hooks:
1919
- id: end-of-file-fixer
20+
- repo: local
21+
hooks:
22+
- id: frontend-pre-commit
23+
name: frontend-pre-commit
24+
entry: bash -c "cd frontend && npm install && npm run precommit"
25+
language: system
26+
pass_filenames: false

frontend/.husky/pre-commit

Lines changed: 0 additions & 2 deletions
This file was deleted.

frontend/package-lock.json

Lines changed: 46 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"test": "jest",
1717
"test:update-snapshots": "jest -u",
1818
"generate-api": "npx @rtk-query/codegen-openapi openapi-config.ts",
19-
"prepare": "cd .. && husky frontend/.husky",
2019
"precommit": "lint-staged"
2120
},
2221
"devDependencies": {
@@ -59,7 +58,7 @@
5958
"cross-env": "^7.0.3",
6059
"css-loader": "^6.7.3",
6160
"enzyme": "^3.11.0",
62-
"eslint": "^9.28.0",
61+
"eslint": "^9.32.0",
6362
"eslint-config-prettier": "^10.1.5",
6463
"eslint-plugin-i18n": "^2.4.0",
6564
"eslint-plugin-prettier": "^5.4.1",
@@ -69,7 +68,6 @@
6968
"file-loader": "^6.2.0",
7069
"html-webpack-plugin": "^5.6.3",
7170
"http-proxy-middleware": "^2.0.6",
72-
"husky": "^9.1.7",
7371
"identity-obj-proxy": "^3.0.0",
7472
"jest": "^29.7.0",
7573
"jest-styled-components": "^7.2.0",

0 commit comments

Comments
 (0)