From de70127b67ac9f86aead2cb8553e43bb92052286 Mon Sep 17 00:00:00 2001 From: Lucas Marques Date: Fri, 25 Oct 2024 16:47:31 +0200 Subject: [PATCH] feat(ci): add ts linting and prettier --- .github/workflows/ci.yaml | 30 +++++++++++++++++++++++++++--- ui/eslint.config.mjs | 2 +- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 529098a1..d69d24cb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -58,8 +58,8 @@ jobs: run: | git diff --exit-code ./manifests - lint: - name: Lint + lint-go: + name: Lint Go runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -73,5 +73,29 @@ jobs: version: v1.55 args: --timeout=5m + lint-ts: + name: Lint TS + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Run install + uses: borales/actions-yarn@v4 + with: + cmd: install + dir: ui + - name: Run eslint + uses: borales/actions-yarn@v5 + with: + cmd: lint + dir: ui + - name: Run prettier + uses: borales/actions-yarn@v5 + with: + cmd: format-check + dir: ui + build-and-push: - uses: ./.github/workflows/build-and-push.yaml \ No newline at end of file + uses: ./.github/workflows/build-and-push.yaml diff --git a/ui/eslint.config.mjs b/ui/eslint.config.mjs index 33e3d2bc..1280e55a 100644 --- a/ui/eslint.config.mjs +++ b/ui/eslint.config.mjs @@ -13,7 +13,7 @@ export default [ }, settings: { react: { - version: 'detect', // You can add this if you get a warning about the React version when you lint + version: 'detect', }, }, },