Skip to content

Commit cda4f1a

Browse files
Use of prettier module
1 parent 6a323f5 commit cda4f1a

File tree

3 files changed

+903
-1634
lines changed

3 files changed

+903
-1634
lines changed

.github/workflows/lint.yaml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
name: Lint JSON-LD and Python Script
1+
name: Prettier Formatting Check & Fix
22

33
on:
44
push:
5-
branches: ["*"]
5+
branches:
6+
- "*"
67
pull_request:
7-
branches: ["*"]
8+
branches:
9+
- "*"
810
workflow_dispatch:
911

1012
jobs:
11-
lint:
13+
prettier:
1214
runs-on: ubuntu-latest
15+
1316
steps:
1417
- name: Checkout the code
1518
uses: actions/checkout@v4
@@ -18,26 +21,21 @@ jobs:
1821
uses: actions/setup-node@v4
1922
with:
2023
node-version: '16'
24+
2125
- uses: actions/cache@v4
2226
with:
2327
path: |
2428
~/.npm
25-
.techradar
29+
.node_modules
2630
key: ${{ runner.os }}-techradar-${{ hashFiles('**/package-lock.json') }}
27-
- run: npm install
28-
- run: npm run lint
29-
30-
31-
# - name: Set up Python 3.12
32-
# uses: actions/setup-python@v5
33-
# with:
34-
# python-version: "3.12"
3531

36-
# - name: Install Python dependencies
37-
# run: |
38-
# python -m pip install --upgrade pip
39-
# pip install pylint
32+
- name: Install dependencies
33+
run: npm install
34+
35+
- name: Check code formatting with Prettier
36+
run: npn run lint-prettier:check
4037

41-
# - name: Run Python lint checks
42-
# run: |
43-
# pylint ../scripts/*.py
38+
- name: Fix code formatting with Prettier
39+
run: npn run lint-prettier:fix
40+
# Optional: Only run if the check fails (to avoid always formatting)
41+
continue-on-error: true

0 commit comments

Comments
 (0)