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

Commit

Permalink
🔄 Synced file(s) with WordPress/openverse (#1016)
Browse files Browse the repository at this point in the history
* 🔄 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>
  • Loading branch information
openverse-bot and dhruvkb authored Nov 29, 2022
1 parent d6a7a12 commit 55f55de
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 deletions.
36 changes: 18 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# This file is being synced from WordPress/openverse. Any changes made to it
# here will be overwritten. Please make any necessary edits to these files:
# - https://github.com/WordPress/openverse/blob/main/.pre-commit-config.yaml.jinja

exclude: Pipfile\.lock|migrations|\.idea|node_modules|archive

repos:
Expand All @@ -6,36 +10,34 @@ repos:
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
exclude: tsconfig.json # contains comments
- id: check-case-conflict
- id: check-toml
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
exclude: test/tapes/.+\.json5
- id: check-symlinks
- id: mixed-line-ending
- id: fix-encoding-pragma
args:
- --remove
- id: check-docstring-first
- id: requirements-txt-fixer

# Use the `.isort.cfg` file to configure additional project-specific requirements.
- repo: https://github.com/PyCQA/isort
rev: 5.9.1
hooks:
- id: isort
files: \.py$
exclude: ^build/.*$|^.tox/.*$|^venv/.*$
args:
- --profile=black
- --lines-after-imports=2
- --multi-line=3
- --trailing-comma
- --force-grid-wrap=0
- --use-parentheses
- --ensure-newline-before-comments
- --line-length=88

- repo: https://github.com/asottile/pyupgrade
rev: v3.2.2
Expand All @@ -44,10 +46,14 @@ repos:
args:
- --py310-plus

# Use the `.flake8` file to configure additional project-specific requirements.
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
args:
- --extend-ignore=E203,W503
- --max-line-length=88

- repo: https://github.com/ambv/black
rev: 22.3.0
Expand All @@ -56,20 +62,14 @@ repos:
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

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

- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.8.0
Expand Down
4 changes: 2 additions & 2 deletions api/docs/_static/_css/brand.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
color: black;
}

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

@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) .sidebar-logo-container {
body:not([data-theme='light']) .sidebar-logo-container {
color: white;
}
}
18 changes: 18 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This file is being synced from WordPress/openverse. Any changes made to it
// here will be overwritten. Please make any necessary edits to these files:
// - https://github.com/WordPress/openverse/blob/main/prettier.config.js.jinja

module.exports = {
trailingComma: 'es5',
tabWidth: 2,
semi: false,
singleQuote: true,
overrides: [
{
files: '*.yml',
options: {
singleQuote: false,
},
},
],
}

0 comments on commit 55f55de

Please sign in to comment.