Choices/.github/workflows/lint.yml

41 lines
979 B
YAML
Raw Normal View History

name: Code linting
on:
pull_request:
paths:
- 'src/scripts/**'
2022-01-14 02:16:49 +01:00
- 'src/styles/**'
- package-lock.json
- '.browserslistrc'
jobs:
lint:
runs-on: ubuntu-latest
steps:
2021-12-31 02:16:52 +01:00
- uses: actions/checkout@v2
with:
fetch-depth: 1
2021-12-31 02:16:52 +01:00
- uses: actions/setup-node@v2
with:
2021-12-17 22:39:16 +01:00
node-version: 12
- name: Install dependencies
2021-12-20 00:09:41 +01:00
run: npm ci
env:
CYPRESS_INSTALL_BINARY: 0
HUSKY_SKIP_INSTALL: true
- name: run eslint
2021-12-20 00:09:41 +01:00
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
2021-12-19 23:43:03 +01:00
- name: run stylelint
run: npm run lint:scss