File tree Expand file tree Collapse file tree 3 files changed +903
-1634
lines changed
Expand file tree Collapse file tree 3 files changed +903
-1634
lines changed Original file line number Diff line number Diff line change 1- name : Lint JSON-LD and Python Script
1+ name : Prettier Formatting Check & Fix
22
33on :
44 push :
5- branches : ["*"]
5+ branches :
6+ - " *"
67 pull_request :
7- branches : ["*"]
8+ branches :
9+ - " *"
810 workflow_dispatch :
911
1012jobs :
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
You can’t perform that action at this time.
0 commit comments