This repository was archived by the owner on May 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (45 loc) · 1.57 KB
/
lint.yml
File metadata and controls
54 lines (45 loc) · 1.57 KB
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
name: Lint
on:
push:
branches: [ develop, feature/** ]
pull_request:
branches: [ main, develop ]
jobs:
lint:
name: "Lint code with ESLint and Remark"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
- name: Setup pnpm
uses: pnpm/action-setup@v1
with:
version: 5.16.0
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Get pnpm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(pnpm config get cache)"
- name: Cache
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: pnpm i
- name: ESLint review
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
- name: Remark Lint review
uses: reviewdog/action-remark-lint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
remark_args: "-r .remarkrc.js ."