Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Commit

Permalink
Unify pre-commit config across repos (#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Nov 14, 2022
1 parent 1bee01c commit 2998509
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ body:
attributes:
label: Checklist to complete before beginning development
description: |
Please do not modify this section. No development should be done on a Provider API Script until the following info is gathered:
Please do not modify this section. No development should be done on a Provider API Script until the following info is gathered:
options:
- label: Verify there is a way to retrieve the entire relevant portion of the provider's collection in a systematic way via their API.
required: false
Expand Down
39 changes: 27 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
exclude: archive
exclude: Pipfile\.lock|migrations|\.idea|node_modules|archive

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
Expand All @@ -20,6 +21,7 @@ repos:
args:
- --remove
- id: pretty-format-json
exclude: package(-lock)?\.json
args:
- --autofix
- id: requirements-txt-fixer
Expand All @@ -28,7 +30,6 @@ repos:
rev: 5.9.1
hooks:
- id: isort
name: Run isort to sort imports
files: \.py$
exclude: ^build/.*$|^.tox/.*$|^venv/.*$
args:
Expand All @@ -47,22 +48,36 @@ repos:
args:
- --py310-plus

- repo: https://gitlab.com/pycqa/flake8
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
args:
- --per-file-ignores=test_*:E501
- --max-line-length=88
- --ignore=E203,W503
- id: flake8

- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
args:
- --safe
- id: black
args:
- --safe

- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.3.0
hooks:
- id: eslint
files: ^js/.*$
additional_dependencies:
- eslint@8.3.0
- eslint-config-prettier@8.3.0

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.0
hooks:
- id: prettier
files: ^js/.*$
- id: prettier
types: [yaml]

- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.8.0
hooks:
- id: shellcheck
- id: shellcheck
2 changes: 1 addition & 1 deletion docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3'
version: "3"

services:
# Services only needed for local development
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3'
version: "3"

services:

webserver:
image: ghcr.io/wordpress/openverse-catalog:${DOCKER_IMAGE_TAG:-latest}
env_file: .env
Expand Down

0 comments on commit 2998509

Please sign in to comment.