-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (43 loc) · 1.46 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: Linters
# https://github.com/marketplace/actions/prettier-check
# This action works with pull requests and pushes on the main branch
on:
pull_request:
push:
branches: [development]
jobs:
prettier:
name: Prettier Check
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Run Prettier
id: prettier-run
uses: rutajdash/[email protected]
with:
config_path: ./.prettierrc.js
ignore_path: ./.prettierignore
# This step only runs if prettier finds errors causing the previous step to fail
# This steps lists the files where errors were found
- name: Prettier Output
if: ${{ failure() }}
shell: bash
run: |
echo "The following files are not formatted:"
echo "${{steps.prettier-run.outputs.prettier_output}}"
sort-package-json:
name: Sort package.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout
- uses: actions/setup-node@v4
name: Install Node.js
with:
cache-dependency-path: '**/config/rush/pnpm-lock.yaml'
registry-url: https://npm.pkg.github.com/
- name: Install Rush
run: node common/scripts/install-run-rush.js install
- name: Sort package.json
run: node common/scripts/install-run-rush.js sort-package-json