From 46123e5064ab8f20bb8cf259e0e90f95b6db89d0 Mon Sep 17 00:00:00 2001 From: Pamella Bezerra Date: Mon, 20 May 2024 17:20:50 -0300 Subject: [PATCH] Fix/upgrade pre-commit config --- .pre-commit-config.yaml | 93 +++++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b584ce0..db257ec 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,46 +1,49 @@ -- repo: git://github.com/pre-commit/pre-commit-hooks - sha: v0.9.2 - hooks: - - id: check-added-large-files - args: ['--maxkb=500'] - - id: check-byte-order-marker - - id: check-case-conflict - - id: check-merge-conflict - - id: check-symlinks - - id: debug-statements - - id: detect-private-key +fail_fast: true -- repo: local - hooks: - - id: isort - name: isort-local - entry : isort - language: python - types: [python] - exclude: .+/(settings|migrations)/.+ - pass_filenames: true - - id: eslint - name: eslint-local - entry: npm run lint - language: system - types: [javascript] - exclude: > - (?x)^( - .+\.config\.js| - server\.js| - \.eslintrc\.js - )$ - pass_filenames: true - - id: missing-migrations - name: missing-migrations-local - entry: pipenv run python manage.py has_missing_migrations - language: system - always_run: true - pass_filenames: false - - id: prospector - name: prospector-local - entry: prospector --messages-only - language: python - types: [python] - exclude: .+/(settings|migrations)/.+ - pass_filenames: true \ No newline at end of file +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-added-large-files + args: ["--maxkb=500"] + - id: check-byte-order-marker + - id: check-case-conflict + - id: check-merge-conflict + - id: check-symlinks + - id: debug-statements + - id: detect-private-key + + - repo: local + hooks: + - id: isort + name: isort-local + entry: isort + language: python + types: [python] + exclude: .+/(settings|migrations)/.+ + pass_filenames: true + - id: eslint + name: eslint-local + entry: npm run lint + language: system + types: [javascript] + exclude: > + (?x)^( + .+\.config\.js| + server\.js| + \.eslintrc\.js + )$ + pass_filenames: true + - id: missing-migrations + name: missing-migrations-local + entry: pipenv run python manage.py makemigrations --check + language: system + always_run: true + pass_filenames: false + - id: prospector + name: prospector-local + entry: prospector --messages-only + language: python + types: [python] + exclude: .+/(settings|migrations)/.+ + pass_filenames: true