From 2bfe99e3eee911b4d41615be425901ccff0a40fd Mon Sep 17 00:00:00 2001 From: openverse-bot Date: Tue, 29 Nov 2022 16:21:46 +0000 Subject: [PATCH 1/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.frontend.y?= =?UTF-8?q?aml.jinja'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 66 +++++++++++++---------------------------- 1 file changed, 21 insertions(+), 45 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 871e3f05c8..5fc82d80fb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,9 @@ -exclude: Pipfile\.lock|migrations|\.idea|node_modules +# 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 +# - https://github.com/WordPress/openverse/blob/main/.pre-commit-config.frontend.yaml.jinja + +exclude: Pipfile\.lock|migrations|\.idea|node_modules|archive repos: - repo: local # More local hooks are defined at the bottom. @@ -31,66 +36,26 @@ repos: - id: fix-encoding-pragma args: - --remove - - id: requirements-txt-fixer - - - repo: https://github.com/PyCQA/isort - rev: 5.9.1 - hooks: - - id: isort - files: \.py$ - exclude: ^build/.*$|^.tox/.*$|^venv/.*$ - args: - - --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/PyCQA/flake8 - rev: 3.9.2 - hooks: - - id: flake8 - args: - - --config=automations/.flake8 - - - repo: https://github.com/ambv/black - rev: 22.3.0 - hooks: - - id: black - args: - - --safe - - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.6.0 - hooks: - - id: prettier - exclude: \.vue$ - additional_dependencies: - - prettier@2.6.0 - - prettier-plugin-tailwindcss@0.1.12 - - typescript@4.6.2 - repo: https://github.com/pre-commit/mirrors-eslint rev: v8.15.0 hooks: - id: eslint files: \.(js|ts|vue)$ - exclude: ^nuxt-template-overrides/.*$ - 'types': [file] # ESLint only accepts [javascript] by default + exclude: ^nuxt-template-overrides/.*$ # ESLint raises warnings for ignored files. + 'types': [file] # ESLint only accepts [javascript] by default. args: - --ignore-path=.gitignore - --ignore-path=.eslintignore - --max-warnings=0 additional_dependencies: + - eslint@8.15.0 + - eslint-config-prettier@8.5.0 - '@babel/eslint-parser@7.17.0' - '@intlify/eslint-plugin-vue-i18n@1.4.0' - '@nuxtjs/eslint-module@3.1.0' - '@typescript-eslint/eslint-plugin@5.23.0' - '@typescript-eslint/parser@5.23.0' - - eslint@8.15.0 - - eslint-config-prettier@8.5.0 - eslint-import-resolver-custom-alias@1.3.0 - eslint-plugin-eslint-comments@3.2.0 - eslint-plugin-import@2.26.0 @@ -100,6 +65,17 @@ repos: - eslint-plugin-vue@9.4.0 - eslint-plugin-vuejs-accessibility@1.1.1 + # 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$ # TODO: https://github.com/WordPress/openverse/issues/333 + additional_dependencies: + - prettier@2.6.0 + - prettier-plugin-tailwindcss@0.1.12 + - typescript@4.6.2 + - repo: https://github.com/koalaman/shellcheck-precommit rev: v0.8.0 hooks: From d710a563c06f3a82e83f6149b7258286619d0064 Mon Sep 17 00:00:00 2001 From: openverse-bot Date: Tue, 29 Nov 2022 16:21:46 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=94=84=20Synced=20local=20'prettier.c?= =?UTF-8?q?onfig.js'=20with=20remote=20'prettier.config.frontend.js.jinja'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prettier.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/prettier.config.js b/prettier.config.js index 359e05627e..6b28007e98 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -1,9 +1,13 @@ +// 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 +// - https://github.com/WordPress/openverse/blob/main/prettier.config.frontend.js.jinja + module.exports = { trailingComma: 'es5', tabWidth: 2, semi: false, singleQuote: true, - vueIndentScriptAndStyle: false, overrides: [ { files: '*.yml', @@ -12,6 +16,7 @@ module.exports = { }, }, ], + vueIndentScriptAndStyle: false, plugins: [require('prettier-plugin-tailwindcss')], tailwindConfig: 'tailwind.config.js', } From 3a68d73c2e3e7ff687430c917bf1e55f37f83a10 Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Tue, 29 Nov 2022 22:06:17 +0400 Subject: [PATCH 3/3] Fix Prettier violations --- src/components/VFourOhFour.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/VFourOhFour.vue b/src/components/VFourOhFour.vue index a0865bcf8f..f498492766 100644 --- a/src/components/VFourOhFour.vue +++ b/src/components/VFourOhFour.vue @@ -3,7 +3,7 @@ class="error relative flex min-h-screen flex-col overflow-x-hidden bg-yellow" >