diff --git a/.github/workflows/lint-ts.yml b/.github/workflows/lint-ts.yml index d691dec002..3b07f54ea1 100644 --- a/.github/workflows/lint-ts.yml +++ b/.github/workflows/lint-ts.yml @@ -1,45 +1,39 @@ name: lint-ts + on: - push: - branches: ["main"] - paths: - - benchmarks/node/** - - node/** - - benchmarks/utilities/* - - .github/workflows/lint-ts.yml - pull_request: - paths: - - benchmarks/node/** - - node/** - - benchmarks/utilities/* - - .github/workflows/lint-ts.yml + push: + branches: ["main"] + paths: + - benchmarks/node/** + - node/** + - benchmarks/utilities/* + - .github/workflows/lint-ts.yml + pull_request: + paths: + - benchmarks/node/** + - node/** + - benchmarks/utilities/* + - .github/workflows/lint-ts.yml env: - CARGO_TERM_COLOR: always -jobs: - job: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@v4 + CARGO_TERM_COLOR: always - - uses: ./.github/workflows/lint-ts - with: - package-folder: ./node - name: lint node +jobs: + lint: + runs-on: ubuntu-latest + timeout-minutes: 10 - - 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 - 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 . + - name: Run linting and prettier + run: | + for folder in node benchmarks/node benchmarks/utilities; do + npx eslint ${{ github.workspace }}/$folder + npx prettier --check ${{ github.workspace }}/$folder + done