Added lint and format checker for jsonld files #30
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |