41 lines
890 B
YAML
41 lines
890 B
YAML
![]() |
name: Linting
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches: [main]
|
||
|
pull_request:
|
||
|
branches: [main]
|
||
|
|
||
|
jobs:
|
||
|
lint-eslint:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||
|
uses: actions/setup-node@v3
|
||
|
with:
|
||
|
node-version: ${{ matrix.node-version }}
|
||
|
cache: 'npm'
|
||
|
|
||
|
- name: Install dependencies
|
||
|
run: npm ci
|
||
|
|
||
|
- name: Run ESLint
|
||
|
run: npm run eslint -- "**/*.js"
|
||
|
|
||
|
lint-prettier:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||
|
uses: actions/setup-node@v3
|
||
|
with:
|
||
|
node-version: ${{ matrix.node-version }}
|
||
|
cache: 'npm'
|
||
|
|
||
|
- name: Install dependencies
|
||
|
run: npm ci
|
||
|
|
||
|
- name: Run Prettier
|
||
|
run: npm run prettier -- --check "**/*.{js,css,md}"
|