Choices/.github/workflows/lint.yml
2022-01-13 20:16:49 -05:00

41 lines
979 B
YAML

name: Code linting
on:
pull_request:
paths:
- 'src/scripts/**'
- 'src/styles/**'
- package-lock.json
- '.browserslistrc'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-node@v2
with:
node-version: 12
- name: Install dependencies
run: npm ci
env:
CYPRESS_INSTALL_BINARY: 0
HUSKY_SKIP_INSTALL: true
- name: run eslint
run: npm run lint:js
## Can't use same eslint config for TypeScript and JavaScript
## TypeScript rules cause rule definition not found errors
## Can be re-enabled if this is resolved: https://github.com/eslint/eslint/issues/14851
# - name: Lint JS bundle
# run: |
# npm run js:build
# npx eslint --no-ignore ./public/assets/scripts/*.js
- name: run stylelint
run: npm run lint:scss