feat: Add lint and prettier check in workflow #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Linting and Formatting (JS) | |
on: | |
push: | |
paths: | |
- '**/*.js' | |
- '**/*.ts' | |
pull_request: | |
paths: | |
- '**/*.js' | |
- '**/*.ts' | |
jobs: | |
lint-and-prettify: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
run: npm install -g pnpm@8.15.7 && pnpm install | |
- name: Install packages in js folder | |
run: cd js/ && pnpm install --frozen-lockfile | |
- name: Run ESLint | |
run: cd js/ && pnpm run eslint | |
continue-on-error: false | |
- name: Run Prettier | |
run: cd js/ && pnpm run prettier:check | |
continue-on-error: false |