forked from TheWidlarzGroup/react-native-video
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.35 KB
/
check-js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Check JS
on:
push:
branches:
- master
paths:
- '.github/workflows/check-js.yml'
- 'src/**'
- '*.json'
- '*.js'
- '*.jsx'
- '*.ts'
- '*.tsx'
- '*.lock'
pull_request:
paths:
- '.github/workflows/check-js.yml'
- 'src/**'
- '*.json'
- '*.js'
- '*.jsx'
- '*.ts'
- '*.tsx'
- '*.lock'
jobs:
TypeScript-Check:
name: Check TS (tsc)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install node_modules
uses: ./.github/actions/setup-node
- name: Install reviewdog
uses: reviewdog/action-setup@v1
- name: Check TypeScript
run: |
yarn tsc | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JS-Lint:
name: Lint JS (eslint, prettier)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install node_modules
uses: ./.github/actions/setup-node
- name: Run ESLint
run: yarn lint -f @jamesacarr/github-actions
- name: Run ESLint with auto-fix
run: yarn lint --fix
- name: Verify no files have changed after auto-fix
run: git diff --exit-code HEAD