Skip to content

Added lint and format checker for jsonld files #28

Added lint and format checker for jsonld files

Added lint and format checker for jsonld files #28

Workflow file for this run

name: Prettier Formatting Check
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
workflow_dispatch:
jobs:
lint_and_format:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
- uses: actions/cache@v4
with:
path: |
~/.npm
.node_modules
key: ${{ runner.os }}-techradar-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm install
- name: Check tools jsonld formatting with Prettier
id: check_format
run: |
npm run lint-prettier:check
# - name: Fix code formatting with Prettier
# if: steps.check_format.outcome == 'failure' # Run only if check_format failed
# run: |
# npm run lint-prettier:fix