Skip to content

Commit

Permalink
Fix pre-commit config
Browse files Browse the repository at this point in the history
  • Loading branch information
fjsj committed Nov 29, 2023
1 parent 5e0a525 commit 483d46f
Showing 1 changed file with 45 additions and 39 deletions.
84 changes: 45 additions & 39 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,47 @@
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
args: ['--maxkb=500']
exclude: >
(?x)^(
package-lock\.json
)$
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.6
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.54.0
hooks:
- id: eslint
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
types: [file]
- repo: local
hooks:
- id: missing-migrations
name: missing-migrations-local
entry: poetry run python backend/manage.py makemigrations --check
language: system
# Only run missing migration check if migration-generating files have changed:
files: (.*/?(settings|migrations|models)/.+|.+models\.py|.+constants\.py|.+choices\.py|.+pyproject\.toml)
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
args: ["--maxkb=500"]
exclude: >
(?x)^(
package-lock\.json
)$
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.6
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: eslint
name: eslint-local
entry: npm run lint
language: system
types: [javascript]
exclude: >
(?x)^(
.+\.config\.js|
.+\.setup\.js|
\.eslintrc\.js
)$
pass_filenames: true
- id: missing-migrations
name: missing-migrations-local
entry: poetry run python backend/manage.py makemigrations --check
language: system
# Only run missing migration check if migration-generating files have changed:
files: (.*/?(settings|migrations|models)/.+|.+models\.py|.+constants\.py|.+choices\.py|.+pyproject\.toml)
pass_filenames: false

0 comments on commit 483d46f

Please sign in to comment.