Skip to content

Commit

Permalink
Move lint + format to pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-w-gries committed Nov 11, 2024
1 parent 50d89a7 commit 570b3ed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Run eslint + format
run: |
npm i
npm run lint
- name: Install dependencies
run: |
npm i
python -m pip install --upgrade pip wheel
pip install pre-commit==3.6.2
- name: Run pre-commit
Expand Down
17 changes: 13 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,17 @@ repos:
- id: black
language_version: python3.12
args: [--config=./pyproject.toml]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
- repo: local
hooks:
- id: prettier
args: [--config=./.prettierrc]
- id: format
name: Run formatter (prettier)
language: system
entry: npx prettier --write --ignore-unknown
pass_filenames: true
- id: lint
name: Run linter (eslint)
language: system
entry: npx eslint --fix
files: ".*\\.(js|jsx)$"
pass_filenames: true

0 comments on commit 570b3ed

Please sign in to comment.