From 29d92539ccccc21021c10978948eb2dfa8c76713 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 21 Feb 2024 11:50:46 +0100 Subject: [PATCH] Use validation rule in password form --- .pre-commit-config.yaml | 31 +++-- frontend/.editorconfig | 2 +- .../form_steps/AccountPasswordSubForm.vue | 55 ++++----- frontend/src/components/tools/ChoiceField.vue | 107 ++++++++++-------- 4 files changed, 103 insertions(+), 92 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ee04d8d38..d35d33b40 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,29 +1,28 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: -- repo: local + - repo: local hooks: - - id: pylint + - id: pylint name: pylint entry: pylint language: system types: [python] - args: - [ - "-rn", - "-sn", - "--fail-under=5" - ] -- repo: https://github.com/psf/black - rev: '24.2.0' + args: ["-rn", "-sn", "--fail-under=5"] + - repo: https://github.com/psf/black + rev: "24.2.0" hooks: - - id: black -- repo: https://github.com/pre-commit/mirrors-eslint - rev: 'v9.0.0-beta.0' + - id: black + - repo: https://github.com/pre-commit/mirrors-eslint + rev: "v9.0.0-beta.0" hooks: - - id: eslint + - id: eslint files: \.(js|vue)$ types: [file] additional_dependencies: - - eslint - - eslint-plugin-vue + - eslint + - eslint-plugin-vue + - repo: https://github.com/pre-commit/mirrors-prettier + rev: "v4.0.0-alpha.8" # Use the sha / tag you want to point at + hooks: + - id: prettier diff --git a/frontend/.editorconfig b/frontend/.editorconfig index 7053c49a0..8d9a6c05e 100644 --- a/frontend/.editorconfig +++ b/frontend/.editorconfig @@ -1,5 +1,5 @@ [*.{js,jsx,ts,tsx,vue}] indent_style = space -indent_size = 2 +indent_size = 4 trim_trailing_whitespace = true insert_final_newline = true diff --git a/frontend/src/components/admin/identities/form_steps/AccountPasswordSubForm.vue b/frontend/src/components/admin/identities/form_steps/AccountPasswordSubForm.vue index 8df0d5c8a..ad23a8681 100644 --- a/frontend/src/components/admin/identities/form_steps/AccountPasswordSubForm.vue +++ b/frontend/src/components/admin/identities/form_steps/AccountPasswordSubForm.vue @@ -1,14 +1,15 @@ diff --git a/frontend/src/components/tools/ChoiceField.vue b/frontend/src/components/tools/ChoiceField.vue index 79e278755..58839f142 100644 --- a/frontend/src/components/tools/ChoiceField.vue +++ b/frontend/src/components/tools/ChoiceField.vue @@ -1,20 +1,31 @@