2019-10-31 18:28:12 +01:00
|
|
|
name: Code linting
|
2019-10-21 18:20:39 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'src/scripts/**'
|
2022-01-14 02:16:49 +01:00
|
|
|
- 'src/styles/**'
|
2019-10-22 23:20:40 +02:00
|
|
|
- package-lock.json
|
|
|
|
- '.browserslistrc'
|
2019-10-21 18:20:39 +02:00
|
|
|
|
|
|
|
jobs:
|
2019-10-23 10:32:25 +02:00
|
|
|
lint:
|
2019-10-21 18:20:39 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-12-31 02:16:52 +01:00
|
|
|
- uses: actions/checkout@v2
|
2019-10-21 18:20:39 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
|
2021-12-31 02:16:52 +01:00
|
|
|
- uses: actions/setup-node@v2
|
2019-10-21 18:20:39 +02:00
|
|
|
with:
|
2021-12-17 22:39:16 +01:00
|
|
|
node-version: 12
|
2019-10-21 18:20:39 +02:00
|
|
|
|
|
|
|
- name: Install dependencies
|
2021-12-20 00:09:41 +01:00
|
|
|
run: npm ci
|
2019-10-21 18:20:39 +02:00
|
|
|
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
|
2019-10-29 19:19:19 +01:00
|
|
|
|
2021-12-19 04:07:37 +01:00
|
|
|
## 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
|