-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (30 loc) · 737 Bytes
/
format.yml
File metadata and controls
38 lines (30 loc) · 737 Bytes
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
name: Format
on:
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
- 'public/**'
permissions:
contents: read
jobs:
format:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install formatters
run: pip install black
- name: Run formatters
run: |
black .
npx --yes prettier@3 '**/*.{js,mjs}' --ignore-path .gitignore --write
git --no-pager diff --patch --exit-code