Skip to content

Commit 9077c8a

Browse files
dhruvkbMeet Parekh
authored and
Meet Parekh
committed
Unify pre-commit config across repos (WordPress#867)
1 parent 0683ab9 commit 9077c8a

4 files changed

+30
-16
lines changed

.github/ISSUE_TEMPLATE/image_provider_api_integration_request.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ body:
4040
attributes:
4141
label: Checklist to complete before beginning development
4242
description: |
43-
Please do not modify this section. No development should be done on a Provider API Script until the following info is gathered:
43+
Please do not modify this section. No development should be done on a Provider API Script until the following info is gathered:
4444
options:
4545
- label: Verify there is a way to retrieve the entire relevant portion of the provider's collection in a systematic way via their API.
4646
required: false

.pre-commit-config.yaml

+27-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
exclude: archive
1+
exclude: Pipfile\.lock|migrations|\.idea|node_modules|archive
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
55
rev: v4.0.1
66
hooks:
77
- id: trailing-whitespace
8+
args: [--markdown-linebreak-ext=md]
89
- id: check-docstring-first
910
- id: check-executables-have-shebangs
1011
- id: check-json
@@ -20,6 +21,7 @@ repos:
2021
args:
2122
- --remove
2223
- id: pretty-format-json
24+
exclude: package(-lock)?\.json
2325
args:
2426
- --autofix
2527
- id: requirements-txt-fixer
@@ -28,7 +30,6 @@ repos:
2830
rev: 5.9.1
2931
hooks:
3032
- id: isort
31-
name: Run isort to sort imports
3233
files: \.py$
3334
exclude: ^build/.*$|^.tox/.*$|^venv/.*$
3435
args:
@@ -47,22 +48,36 @@ repos:
4748
args:
4849
- --py310-plus
4950

50-
- repo: https://gitlab.com/pycqa/flake8
51+
- repo: https://github.com/PyCQA/flake8
5152
rev: 3.9.2
5253
hooks:
53-
- id: flake8
54-
args:
55-
- --per-file-ignores=test_*:E501
56-
- --max-line-length=88
57-
- --ignore=E203,W503
54+
- id: flake8
5855

5956
- repo: https://github.com/ambv/black
6057
rev: 22.3.0
6158
hooks:
62-
- id: black
63-
args:
64-
- --safe
59+
- id: black
60+
args:
61+
- --safe
62+
63+
- repo: https://github.com/pre-commit/mirrors-eslint
64+
rev: v8.3.0
65+
hooks:
66+
- id: eslint
67+
files: ^js/.*$
68+
additional_dependencies:
69+
- eslint@8.3.0
70+
- eslint-config-prettier@8.3.0
71+
72+
- repo: https://github.com/pre-commit/mirrors-prettier
73+
rev: v2.5.0
74+
hooks:
75+
- id: prettier
76+
files: ^js/.*$
77+
- id: prettier
78+
types: [yaml]
79+
6580
- repo: https://github.com/koalaman/shellcheck-precommit
6681
rev: v0.8.0
6782
hooks:
68-
- id: shellcheck
83+
- id: shellcheck

docker-compose.override.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '3'
1+
version: "3"
22

33
services:
44
# Services only needed for local development

docker-compose.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
version: '3'
1+
version: "3"
22

33
services:
4-
54
webserver:
65
image: ghcr.io/wordpress/openverse-catalog:${DOCKER_IMAGE_TAG:-latest}
76
env_file: .env

0 commit comments

Comments
 (0)