From 203332934274d31bb060159627dad85a6f66ff0a Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 20 Jun 2022 15:35:38 +0200 Subject: [PATCH] linted all front code, excepted profile-completion/ and prrofile-custom-fields/ --- .eslintrc | 2 +- .../oauth2-data-mapping-form.tsx | 4 ++++ .../openid-connect-data-mapping-form.tsx | 4 ++++ .../openid-connect-form.tsx | 3 +++ .../components/base/text-editor/menu-bar.tsx | 4 ++-- .../components/events/event-card.tsx | 3 +++ .../components/group/change-group.tsx | 3 +++ .../components/machines/machine-card.tsx | 7 +++++-- .../components/machines/machines-filters.tsx | 3 +++ .../components/machines/reserve-button.tsx | 14 ++++++++------ .../payment-schedules-table.tsx | 3 +++ .../update-payment-mean-modal.tsx | 3 +++ .../components/payment/card-payment-modal.tsx | 10 ++++++---- .../local-payment/local-payment-modal.tsx | 10 ++++++---- .../payzen/payzen-card-update-modal.tsx | 3 +++ .../components/payment/payzen/payzen-form.tsx | 5 ++++- .../payment/payzen/payzen-keys-form.tsx | 8 +++++--- .../stripe/stripe-card-update-modal.tsx | 5 ++++- .../payment/stripe/stripe-keys-form.tsx | 8 +++++--- .../payment/stripe/stripe-modal.tsx | 2 +- .../components/payment/update-card-modal.tsx | 8 +++++--- .../plan-categories/delete-plan-category.tsx | 8 +++++--- .../plan-categories/manage-plan-category.tsx | 10 ++++++---- .../plan-categories/plan-category-form.tsx | 11 ++++++++--- .../components/plans/plans-filter.tsx | 3 +++ .../prepaid-packs/packs-summary.tsx | 19 +++++++++++++------ .../pricing/machines/delete-pack.tsx | 8 +++++--- .../profile-form-option.tsx | 7 +++++++ .../components/settings/boolean-setting.tsx | 8 ++++---- .../settings/user-validation-setting.tsx | 7 ++++--- .../components/socials/edit-socials.tsx | 10 ++++++++++ .../components/socials/fab-socials.tsx | 19 ++++++++++++++++--- .../components/user/user-validation.tsx | 7 ++++--- .../src/javascript/typings/date-iso.d.ts | 8 -------- app/frontend/src/stylesheets/application.scss | 3 +++ .../modules/base/fab-text-editor.scss | 2 +- .../payzen/payzen-card-update-modal.scss | 2 +- .../modules/payment/payzen/payzen-modal.scss | 2 +- .../stripe/stripe-card-update-modal.scss | 2 ++ .../modules/payment/stripe/stripe-modal.scss | 2 ++ .../plan-categories/manage-plan-category.scss | 6 ++++++ .../modules/prepaid-packs/packs-summary.scss | 7 +++++++ .../modules/settings/boolean-setting.scss | 18 ++++++++++++++++++ .../settings/user-validation-setting.scss | 8 ++++++++ .../modules/socials/fab-socials.scss | 7 +++++++ .../modules/user/user-validation.scss | 11 +++++++++++ package.json | 2 +- yarn.lock | 8 ++++---- 48 files changed, 238 insertions(+), 79 deletions(-) create mode 100644 app/frontend/src/stylesheets/modules/settings/boolean-setting.scss create mode 100644 app/frontend/src/stylesheets/modules/settings/user-validation-setting.scss create mode 100644 app/frontend/src/stylesheets/modules/socials/fab-socials.scss create mode 100644 app/frontend/src/stylesheets/modules/user/user-validation.scss diff --git a/.eslintrc b/.eslintrc index 089ae0a20..bd4107a0c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -6,7 +6,7 @@ ], "rules": { "semi": ["error", "always"], - "no-use-before-define": "off", + "no-use-before-define": "off" }, "globals": { "Application": true, diff --git a/app/frontend/src/javascript/components/authentication-provider/oauth2-data-mapping-form.tsx b/app/frontend/src/javascript/components/authentication-provider/oauth2-data-mapping-form.tsx index 24ede2224..5fd93d8d2 100644 --- a/app/frontend/src/javascript/components/authentication-provider/oauth2-data-mapping-form.tsx +++ b/app/frontend/src/javascript/components/authentication-provider/oauth2-data-mapping-form.tsx @@ -13,6 +13,10 @@ interface Oauth2DataMappingFormProps { index: number, } +/** + * Partial form to set the data mapping for an OAuth 2.0 provider. + * The data mapping is the way to bind data from the authentication provider API to the Fab-manager's database + */ export const Oauth2DataMappingForm = ({ register, control, index }: Oauth2DataMappingFormProps) => { const { t } = useTranslation('admin'); diff --git a/app/frontend/src/javascript/components/authentication-provider/openid-connect-data-mapping-form.tsx b/app/frontend/src/javascript/components/authentication-provider/openid-connect-data-mapping-form.tsx index 8a8eb410d..fad276dff 100644 --- a/app/frontend/src/javascript/components/authentication-provider/openid-connect-data-mapping-form.tsx +++ b/app/frontend/src/javascript/components/authentication-provider/openid-connect-data-mapping-form.tsx @@ -16,6 +16,10 @@ interface OpenidConnectDataMappingFormProps { index: number, } +/** + * Partial form to set the data mapping for an OpenID Connect provider. + * The data mapping is the way to bind data from the OIDC claims to the Fab-manager's database + */ export const OpenidConnectDataMappingForm = ({ register, setValue, currentFormValues, index }: OpenidConnectDataMappingFormProps) => { const { t } = useTranslation('admin'); diff --git a/app/frontend/src/javascript/components/authentication-provider/openid-connect-form.tsx b/app/frontend/src/javascript/components/authentication-provider/openid-connect-form.tsx index af8e29231..28532652d 100644 --- a/app/frontend/src/javascript/components/authentication-provider/openid-connect-form.tsx +++ b/app/frontend/src/javascript/components/authentication-provider/openid-connect-form.tsx @@ -20,6 +20,9 @@ interface OpenidConnectFormProps { setValue: UseFormSetValue, } +/** + * Partial form to fill the OpenID Connect (OIDC) settings for a new/existing authentication provider. + */ export const OpenidConnectForm = ({ register, control, currentFormValues, formState, setValue }: OpenidConnectFormProps) => { const { t } = useTranslation('admin'); diff --git a/app/frontend/src/javascript/components/base/text-editor/menu-bar.tsx b/app/frontend/src/javascript/components/base/text-editor/menu-bar.tsx index b28c7e476..503b71323 100644 --- a/app/frontend/src/javascript/components/base/text-editor/menu-bar.tsx +++ b/app/frontend/src/javascript/components/base/text-editor/menu-bar.tsx @@ -168,7 +168,7 @@ export const MenuBar: React.FC = ({ editor, paragraphTools, video, > - + ) } - { (video || image) && } + { (video || image) && } { video && (<>