From 8efffd58686033cb2d171dacc3f6dd9eddd83b28 Mon Sep 17 00:00:00 2001 From: avifenesh Date: Wed, 6 Mar 2024 13:10:03 +0000 Subject: [PATCH] Edited lint-ts to check for ts folders and to run globally --- .github/workflows/lint-ts.yml | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/lint-ts.yml b/.github/workflows/lint-ts.yml index d691dec002..fb6ab0a6f6 100644 --- a/.github/workflows/lint-ts.yml +++ b/.github/workflows/lint-ts.yml @@ -1,4 +1,5 @@ name: lint-ts + on: push: branches: ["main"] @@ -16,30 +17,23 @@ on: env: CARGO_TERM_COLOR: always + jobs: - job: + lint: runs-on: ubuntu-latest timeout-minutes: 10 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/workflows/lint-ts - with: - package-folder: ./node - name: lint node - - - uses: ./.github/workflows/lint-ts - with: - package-folder: ./benchmarks/node - name: lint benchmark + steps: + - name: Checkout code + uses: actions/checkout@v4 - - uses: ./.github/workflows/lint-ts - with: - package-folder: ./benchmarks/utilities - name: lint benchmark utilities + - name: Install dependencies + run: | + npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-tsdoc eslint typescript eslint-plugin-import@latest eslint-config-prettier prettier - - name: lint ts + - name: Run linting and prettier run: | - npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-tsdoc eslint typescript eslint-plugin-import@latest eslint-config-prettier - npm i - npx eslint . + for folder in node benchmarks/node benchmarks/utilities; do + npx eslint ${{ github.workspace }}/$folder + npx prettier --check ${{ github.workspace }}/$folder + done