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

🔄 Synced file(s) with WordPress/openverse #2017

Merged
merged 3 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 21 additions & 45 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
7 changes: 6 additions & 1 deletion prettier.config.js
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -12,6 +16,7 @@ module.exports = {
},
},
],
vueIndentScriptAndStyle: false,
plugins: [require('prettier-plugin-tailwindcss')],
tailwindConfig: 'tailwind.config.js',
}
7 changes: 2 additions & 5 deletions src/components/VFourOhFour.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="error relative flex min-h-screen flex-col overflow-x-hidden bg-yellow"
>
<svg
class="pointer-events-none absolute top-20 z-0 -mt-[10%] -ml-[20%] w-[140%] fill-dark-charcoal px-6 opacity-5 lg:mx-auto lg:ml-0 lg:w-full lg:px-16"
class="z-0 pointer-events-none absolute top-20 -mt-[10%] -ml-[20%] w-[140%] fill-dark-charcoal px-6 opacity-5 lg:mx-auto lg:ml-0 lg:w-full lg:px-16"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 1320 569"
aria-hidden="true"
Expand Down Expand Up @@ -41,10 +41,7 @@
</div>
</main>

<VFooter
v-if="isNewHeaderEnabled"
mode="internal"
/>
<VFooter v-if="isNewHeaderEnabled" mode="internal" />
</div>
</template>

Expand Down