Skip to content

Add GitHub Action to check linter and formatter #1

Add GitHub Action to check linter and formatter

Add GitHub Action to check linter and formatter #1

Workflow file for this run

name: Test linter and code formatter
on:
pull_request:
push:
branches:
- main
jobs:
lint:
strategy:
fail-fast: true
name: Run ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install Dependencies
run: npm ci
- name: Run ESLint
run: npm run eslint
formatting:
strategy:
fail-fast: true
name: Run Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install Dependencies
run: npm ci
- name: Run Prettier
run: npm run prettier