From 9ce801d474eccc467ca6fca3a91f7f01ad0e307c Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Tue, 30 Jul 2024 14:00:01 -0400 Subject: [PATCH] Fix typescript pre-commit hook file inclusion #11249 --- .pre-commit-config.yaml | 8 ++++++-- arches/install/arches-templates/.pre-commit-config.yaml | 8 ++++++-- arches/install/arches-templates/pyproject.toml | 2 +- .../arches-templates/tests/search_indexes/__init__.py | 2 +- pyproject.toml | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 91fc17a1c32..c2c95464ddc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,10 @@ --- repos: + - repo: meta + hooks: + - id: check-hooks-apply + - repo: https://github.com/psf/black rev: 24.4.2 hooks: @@ -22,9 +26,9 @@ repos: files: arches/app/src - id: typescript name: typescript - entry: npm run ts:check + entry: bash -c 'npm run ts:check' language: system - types: [ + types_or: [ "ts", "vue", ] diff --git a/arches/install/arches-templates/.pre-commit-config.yaml b/arches/install/arches-templates/.pre-commit-config.yaml index e74a5a43edf..31afa382ce1 100644 --- a/arches/install/arches-templates/.pre-commit-config.yaml +++ b/arches/install/arches-templates/.pre-commit-config.yaml @@ -1,6 +1,10 @@ --- repos: + - repo: meta + hooks: + - id: check-hooks-apply + - repo: https://github.com/psf/black rev: 24.4.2 hooks: @@ -22,9 +26,9 @@ repos: files: {{ project_name }}/src - id: typescript name: typescript - entry: npm run ts:check + entry: bash -c 'npm run ts:check' language: system - types: [ + types_or: [ "ts", "vue", ] diff --git a/arches/install/arches-templates/pyproject.toml b/arches/install/arches-templates/pyproject.toml index b9b7dd0bc91..2e35688bb9a 100644 --- a/arches/install/arches-templates/pyproject.toml +++ b/arches/install/arches-templates/pyproject.toml @@ -34,7 +34,7 @@ dev = [ "sst", "coverage", "django-silk==5.1.0", - "pre-commit", + "pre-commit==3.8.0", "black==24.4.2", ] diff --git a/arches/install/arches-templates/tests/search_indexes/__init__.py b/arches/install/arches-templates/tests/search_indexes/__init__.py index 727eb9af19e..ba52505535a 100644 --- a/arches/install/arches-templates/tests/search_indexes/__init__.py +++ b/arches/install/arches-templates/tests/search_indexes/__init__.py @@ -1,2 +1,2 @@ # these tests can be run from the command line via -# python manage.py test tests/views --pattern="*.py" --settings="tests.test_settings" +# python manage.py test tests.search_indexes --pattern="*.py" --settings="tests.test_settings" diff --git a/pyproject.toml b/pyproject.toml index 7bf6b1784d3..07e9da362c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,7 @@ dev = [ "coverage", "django-silk==5.1.0", "livereload", - "pre-commit", + "pre-commit==3.8.0", "sst", ]