Skip to content

Commit

Permalink
Add helpful comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Nov 23, 2022
1 parent 5e4cbee commit 7bf50f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
11 changes: 5 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@ repos:
- id: fix-encoding-pragma
args:
- --remove

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-docstring-first
- id: requirements-txt-fixer

# Use the `.isort.cfg` file to configure project-specific requirements.
- repo: https://github.com/PyCQA/isort
rev: 5.9.1
hooks:
Expand All @@ -54,6 +51,7 @@ repos:
args:
- --py310-plus

# Use the `.flake8` file to configure project-specific requirements.
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
Expand All @@ -71,7 +69,7 @@ repos:
hooks:
- id: eslint
files: ^js/.*$
'types': [file] # ESLint only accepts [javascript] by default
'types': [file] # ESLint only accepts [javascript] by default.
args:
- --ignore-path=.gitignore
- --ignore-path=.eslintignore
Expand All @@ -80,11 +78,12 @@ repos:
- [email protected]
- [email protected]

# Use the `.prettierignore` and `.prettier.config.js` files to configure project-specific requirements.
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.0
hooks:
- id: prettier
exclude: \.md$
exclude: \.md$ # TODO: https://github.com/WordPress/openverse/issues/333
additional_dependencies:
- [email protected]

Expand Down
17 changes: 9 additions & 8 deletions .pre-commit-config.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ repos:
- id: fix-encoding-pragma
args:
- --remove

{% if contains_python_code | default(true) %}
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
{% if contains_python_code | default(true) %}
- id: check-docstring-first
- id: requirements-txt-fixer
{% endif %}

{% if contains_python_code | default(true) %}
# Use the `.isort.cfg` file to configure project-specific requirements.
- repo: https://github.com/PyCQA/isort
rev: 5.9.1
hooks:
Expand All @@ -59,6 +58,7 @@ repos:
args:
- --py310-plus

# Use the `.flake8` file to configure project-specific requirements.
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
Expand All @@ -79,9 +79,9 @@ repos:
- id: eslint
files: {{ eslint_files | default('^js/.*$') }}
{% if eslint_exclude %}
exclude: {{ eslint_exclude }}
exclude: {{ eslint_exclude }} # ESLint raises warnings for ignored files.
{% endif %}
'types': [file] # ESLint only accepts [javascript] by default
'types': [file] # ESLint only accepts [javascript] by default.
args:
- --ignore-path=.gitignore
- --ignore-path=.eslintignore
Expand All @@ -93,11 +93,12 @@ repos:
{% endblock %}

{% endif %}
# Use the `.prettierignore` and `.prettier.config.js` files to configure project-specific requirements.
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.0
hooks:
- id: prettier
exclude: \.md$
exclude: \.md$ # TODO: https://github.com/WordPress/openverse/issues/333
additional_dependencies:
{% block prettier_dependencies %}
- [email protected]
Expand Down

0 comments on commit 7bf50f9

Please sign in to comment.