-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (48 loc) · 1.56 KB
/
lint.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
name: Lint
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
# Replace pull_request with pull_request_target if you
# plan to use this action with forks, see the Limitations section
pull_request:
jobs:
javascript:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Node.js dependencies Management UI
run: npm install
- name: ESLint Management UI
run: npx --no-install eslint src/ --cache --fix
- name: Install Node.js dependencies Configuration API
run: npm install
working-directory: configuration-api
- name: ESLint Configuration API
run: npx --no-install eslint main/ --cache --fix
working-directory: configuration-api
- name: Install Node.js dependencies Documentation
run: npm install
working-directory: documentation
- name: ESLint Documentation
run: npx --no-install eslint . --ext .js,.jsx --cache --fix
working-directory: documentation
markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Lint
uses: docker://avtodev/markdown-lint:v1 # fastest way
with:
config: '.github/lint/config.json'
args: '**/*.md'