Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 55f55de

Browse files
🔄 Synced file(s) with WordPress/openverse (#1016)
* 🔄 Created local 'prettier.config.js' from remote 'prettier.config.js.jinja' * 🔄 Synced local '.pre-commit-config.yaml' with remote '.pre-commit-config.yaml.jinja' * Fix lint problems in CSS Co-authored-by: openverse-bot <null> Co-authored-by: Dhruv Bhanushali <dhruv_b@live.com>
1 parent d6a7a12 commit 55f55de

File tree

3 files changed

+38
-20
lines changed

3 files changed

+38
-20
lines changed

.pre-commit-config.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This file is being synced from WordPress/openverse. Any changes made to it
2+
# here will be overwritten. Please make any necessary edits to these files:
3+
# - https://github.com/WordPress/openverse/blob/main/.pre-commit-config.yaml.jinja
4+
15
exclude: Pipfile\.lock|migrations|\.idea|node_modules|archive
26

37
repos:
@@ -6,36 +10,34 @@ repos:
610
hooks:
711
- id: trailing-whitespace
812
args: [--markdown-linebreak-ext=md]
9-
- id: check-docstring-first
1013
- id: check-executables-have-shebangs
1114
- id: check-json
15+
exclude: tsconfig.json # contains comments
1216
- id: check-case-conflict
1317
- id: check-toml
1418
- id: check-merge-conflict
1519
- id: check-xml
1620
- id: check-yaml
1721
- id: end-of-file-fixer
22+
exclude: test/tapes/.+\.json5
1823
- id: check-symlinks
1924
- id: mixed-line-ending
2025
- id: fix-encoding-pragma
2126
args:
2227
- --remove
28+
- id: check-docstring-first
2329
- id: requirements-txt-fixer
2430

31+
# Use the `.isort.cfg` file to configure additional project-specific requirements.
2532
- repo: https://github.com/PyCQA/isort
2633
rev: 5.9.1
2734
hooks:
2835
- id: isort
2936
files: \.py$
3037
exclude: ^build/.*$|^.tox/.*$|^venv/.*$
3138
args:
39+
- --profile=black
3240
- --lines-after-imports=2
33-
- --multi-line=3
34-
- --trailing-comma
35-
- --force-grid-wrap=0
36-
- --use-parentheses
37-
- --ensure-newline-before-comments
38-
- --line-length=88
3941

4042
- repo: https://github.com/asottile/pyupgrade
4143
rev: v3.2.2
@@ -44,10 +46,14 @@ repos:
4446
args:
4547
- --py310-plus
4648

49+
# Use the `.flake8` file to configure additional project-specific requirements.
4750
- repo: https://github.com/PyCQA/flake8
4851
rev: 3.9.2
4952
hooks:
5053
- id: flake8
54+
args:
55+
- --extend-ignore=E203,W503
56+
- --max-line-length=88
5157

5258
- repo: https://github.com/ambv/black
5359
rev: 22.3.0
@@ -56,20 +62,14 @@ repos:
5662
args:
5763
- --safe
5864

59-
- repo: https://github.com/pre-commit/mirrors-eslint
60-
rev: v8.3.0
61-
hooks:
62-
- id: eslint
63-
files: ^js/.*$
64-
additional_dependencies:
65-
- eslint@8.3.0
66-
- eslint-config-prettier@8.3.0
67-
65+
# Use the `.prettierignore` and `.prettier.config.js` files to configure project-specific requirements.
6866
- repo: https://github.com/pre-commit/mirrors-prettier
69-
rev: v2.5.0
67+
rev: v2.6.0
7068
hooks:
7169
- id: prettier
72-
exclude: .*\.md$
70+
exclude: \.md$ # TODO: https://github.com/WordPress/openverse/issues/333
71+
additional_dependencies:
72+
- prettier@2.6.0
7373

7474
- repo: https://github.com/koalaman/shellcheck-precommit
7575
rev: v0.8.0

api/docs/_static/_css/brand.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
color: black;
33
}
44

5-
body[data-theme="dark"] .sidebar-logo-container {
5+
body[data-theme='dark'] .sidebar-logo-container {
66
color: white;
77
}
88

99
@media (prefers-color-scheme: dark) {
10-
body:not([data-theme="light"]) .sidebar-logo-container {
10+
body:not([data-theme='light']) .sidebar-logo-container {
1111
color: white;
1212
}
1313
}

prettier.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This file is being synced from WordPress/openverse. Any changes made to it
2+
// here will be overwritten. Please make any necessary edits to these files:
3+
// - https://github.com/WordPress/openverse/blob/main/prettier.config.js.jinja
4+
5+
module.exports = {
6+
trailingComma: 'es5',
7+
tabWidth: 2,
8+
semi: false,
9+
singleQuote: true,
10+
overrides: [
11+
{
12+
files: '*.yml',
13+
options: {
14+
singleQuote: false,
15+
},
16+
},
17+
],
18+
}

0 commit comments

Comments
 (0)