bookwyrm/.github/workflows/lint-frontend.yaml
2021-03-31 18:02:11 +02:00

30 lines
728 B
YAML

# @url https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Lint Frontend
on:
push:
branches: [ main, ci ]
paths:
- '.github/workflows/**'
- 'static/**'
pull_request:
branches: [ main, ci ]
jobs:
lint:
name: Lint with stylelint and ESLint.
runs-on: ubuntu-20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install modules
run: yarn
- name: Run stylelint
run: yarn stylelint **/static/**/*.css --report-needless-disables --report-invalid-scope-disables
- name: Run ESLint
run: yarn eslint . --ext .js,.jsx,.ts,.tsx