Skip to content

Commit

Permalink
Adding JSON linter (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne authored Sep 1, 2024
1 parent 20c0272 commit 16bc75a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ jobs:
run: python -m mypy --config-file mypy.ini -p ethstaker_deposit
- name: Run linter
run: flake8 --config=flake8.ini ./ethstaker_deposit ./tests
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Install jsonlint
run: npm install -g @prantlf/jsonlint
- name: Validate JSON files
run: |
for file in $(find ./ethstaker_deposit/intl -name "*.json"); do
jsonlint --no-duplicate-keys --quiet --compact $file
done
ci-runner:
needs: lint
if: |
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ repos:
- ssz==0.5.0
files: ^ethstaker_deposit/
args: [--config-file, mypy.ini]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.6.0'
hooks:
- id: check-json
files: ^ethstaker_deposit/intl

0 comments on commit 16bc75a

Please sign in to comment.