From 55d84dad604d78b537d42609edf8e9eabc05bbd8 Mon Sep 17 00:00:00 2001 From: openverse-bot Date: Tue, 29 Nov 2022 16:21:35 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=94=84=20Created=20local=20'prettier.?= =?UTF-8?q?config.js'=20from=20remote=20'prettier.config.js.jinja'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prettier.config.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 prettier.config.js diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 000000000..b48775a1a --- /dev/null +++ b/prettier.config.js @@ -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, + }, + }, + ], +} From ea316d28d2e43620d1bedf97345accde070eed6d Mon Sep 17 00:00:00 2001 From: openverse-bot Date: Tue, 29 Nov 2022 16:21:35 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=94=84=20Synced=20local=20'.pre-commi?= =?UTF-8?q?t-config.yaml'=20with=20remote=20'.pre-commit-config.yaml.jinja?= =?UTF-8?q?'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e8b6d14f8..4ba3de21b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: @@ -6,22 +10,25 @@ 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: @@ -29,13 +36,8 @@ repos: 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 @@ -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 @@ -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 From f84f428436b7d8b85404eba4ceb64d56418d7b5d Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Tue, 29 Nov 2022 22:02:58 +0400 Subject: [PATCH 3/3] Fix lint problems in CSS --- api/docs/_static/_css/brand.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/docs/_static/_css/brand.css b/api/docs/_static/_css/brand.css index c5c7b8dfe..eaf865706 100644 --- a/api/docs/_static/_css/brand.css +++ b/api/docs/_static/_css/brand.css @@ -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; } }