Skip to content

Commit 8b6007a

Browse files
committed
Added prettier to GH workflows
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
1 parent db4bf1d commit 8b6007a

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/lint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,18 @@ jobs:
2626
run: |
2727
python -m pip install --upgrade pip
2828
python -m pip install uv
29+
sudo apt-get install npm
30+
npm install --global prettier
2931
- name: Setup
3032
run: |
3133
uv venv
3234
uv sync
3335
- name: Check formatting with black
3436
run: |
3537
uv tool run black --check .
38+
- name: Check formatting with prettier
39+
run: |
40+
prettier . --check
3641
- name: Run flake8
3742
run: |
3843
uv tool run flake8 src/ --ignore=E203,W503,E722,E731 --max-complexity=100 --max-line-length=160

.github/workflows/update-syntax-description.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
run: |
3232
python -m pip install --upgrade pip
3333
python -m pip install cf-remote
34+
sudo apt-get install npm
35+
npm install --global prettier
3436
- name: Install cfengine
3537
run: |
3638
cf-remote --version master download --edition community ubuntu24 amd64 hub
@@ -41,7 +43,7 @@ jobs:
4143
(
4244
sudo cf-promises --syntax-description json
4345
) > new.json
44-
echo "" >> new.json
46+
prettier new.json --write
4547
- name: Set Git user
4648
run: |
4749
git config user.name 'github-actions[bot]'

src/cfengine_cli/syntax-description.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3258,13 +3258,7 @@
32583258
"status": "normal"
32593259
},
32603260
"common": {
3261-
"promiseTypes": [
3262-
"classes",
3263-
"defaults",
3264-
"meta",
3265-
"reports",
3266-
"vars"
3267-
],
3261+
"promiseTypes": ["classes", "defaults", "meta", "reports", "vars"],
32683262
"status": "normal"
32693263
},
32703264
"edit_line": {

0 commit comments

Comments
 (0)