From bcd45ce8a6eb07cae0b7723d8cae5cbe4a8f7c98 Mon Sep 17 00:00:00 2001 From: Favour Olayinka Date: Mon, 15 Apr 2024 18:39:03 +0100 Subject: [PATCH 1/3] 0351d front end linting (#377) * feat: disable custom script for trial users * after lint fix * frontend linting --------- Co-authored-by: Julien Nahum --- client/.eslintrc.cjs | 19 + client/app.vue | 110 +- client/components/forms/CheckboxInput.vue | 31 +- client/components/forms/CodeInput.client.vue | 41 +- client/components/forms/ColorInput.vue | 30 +- client/components/forms/FileInput.vue | 167 +- client/components/forms/FlatSelectInput.vue | 77 +- client/components/forms/ImageInput.vue | 214 +- client/components/forms/PhoneInput.vue | 166 +- client/components/forms/RatingInput.vue | 77 +- .../forms/RichTextAreaInput.client.vue | 66 +- client/components/forms/ScaleInput.vue | 62 +- client/components/forms/SelectInput.vue | 82 +- client/components/forms/SignatureInput.vue | 52 +- client/components/forms/SliderInput.vue | 38 +- client/components/forms/TextAreaInput.vue | 51 +- client/components/forms/TextInput.vue | 67 +- client/components/forms/ToggleSwitchInput.vue | 31 +- .../forms/components/CameraUpload.vue | 327 +- .../components/forms/components/InputHelp.vue | 10 +- .../forms/components/InputLabel.vue | 2 +- .../forms/components/InputWrapper.vue | 6 +- .../forms/components/UploadedFile.vue | 43 +- .../components/forms/components/VCheckbox.vue | 22 +- .../components/forms/components/VSelect.vue | 152 +- .../components/forms/components/VSwitch.vue | 9 +- client/components/forms/useFormInput.js | 40 +- client/components/forms/validation/Alert.js | 12 +- .../forms/validation/AlertError.vue | 34 +- .../forms/validation/AlertSuccess.vue | 45 +- .../components/forms/validation/HasError.vue | 49 +- client/components/global/Badge.vue | 51 +- client/components/global/Breadcrumb.vue | 95 +- client/components/global/Card.vue | 20 +- client/components/global/Collapse.vue | 40 +- client/components/global/Dropdown.vue | 48 +- client/components/global/EditableDiv.vue | 60 +- client/components/global/Loader.vue | 26 +- client/components/global/Modal.vue | 178 +- client/components/global/Navbar.vue | 281 +- client/components/global/Notifications.vue | 115 +- client/components/global/NotionPage.vue | 24 +- client/components/global/ProTag.vue | 58 +- client/components/global/ScrollShadow.vue | 83 +- client/components/global/Steps.vue | 40 +- client/components/global/VButton.vue | 218 +- .../components/global/WorkspaceDropdown.vue | 113 +- .../global/transitions/Collapsible.vue | 37 +- .../global/transitions/VTransition.vue | 19 +- .../open/components/EditSubmissionModal.vue | 80 +- .../open/components/RecordOperations.vue | 120 +- .../open/editors/EditorOptionsPanel.vue | 35 +- .../open/editors/EditorRightSidebar.vue | 34 +- .../open/forms/OpenCompleteForm.vue | 160 +- client/components/open/forms/OpenForm.vue | 101 +- .../components/open/forms/OpenFormButton.vue | 63 +- .../components/open/forms/OpenFormField.vue | 140 +- .../components/AdvancedFormUrlSettings.vue | 80 +- .../open/forms/components/CopyContent.vue | 42 +- .../open/forms/components/FormEditor.vue | 315 +- .../forms/components/FormFieldsEditor.vue | 268 +- .../open/forms/components/FormStats.vue | 105 +- .../open/forms/components/FormSubmissions.vue | 105 +- .../open/forms/components/FormUrlPrefill.vue | 76 +- .../forms/components/FormWorkspaceModal.vue | 206 +- .../form-components/AddFormBlock.vue | 315 +- .../form-components/FormAboutSubmission.vue | 282 +- .../components/form-components/FormAccess.vue | 108 +- .../form-components/FormCustomCode.vue | 51 +- .../form-components/FormCustomSeo.vue | 91 +- .../form-components/FormCustomization.vue | 185 +- .../form-components/FormEditorPreview.vue | 87 +- .../form-components/FormEditorSidebar.vue | 50 +- .../form-components/FormErrorModal.vue | 35 +- .../form-components/FormInformation.vue | 235 +- .../form-components/FormSecurityPrivacy.vue | 59 +- .../form-components/FormStructure.vue | 53 +- .../form-logic-components/ColumnCondition.vue | 169 +- .../ConditionEditor.client.vue | 122 +- .../FormBlockLogicEditor.vue | 254 +- .../GroupControlSlot.vue | 44 +- .../templates/FormTemplateModal.vue | 241 +- .../components/templates/QuestionsEditor.vue | 139 +- .../open/forms/fields/FormFieldEdit.vue | 222 +- .../forms/fields/components/BlockOptions.vue | 199 +- .../fields/components/ChangeFieldType.vue | 118 +- .../forms/fields/components/FieldOptions.vue | 489 +- .../open/integrations/DiscordIntegration.vue | 40 +- .../open/integrations/EmailIntegration.vue | 37 +- .../integrations/GoogleSheetsIntegration.vue | 10 +- .../open/integrations/SlackIntegration.vue | 41 +- .../SubmissionConfirmationIntegration.vue | 77 +- .../open/integrations/WebhookIntegration.vue | 18 +- .../open/integrations/ZapierIntegration.vue | 10 +- .../components/IntegrationCard.vue | 200 +- .../components/IntegrationEventsModal.vue | 73 +- .../components/IntegrationListOption.vue | 65 +- .../components/IntegrationModal.vue | 110 +- .../components/IntegrationWrapper.vue | 69 +- .../NotificationsMessageActions.vue | 81 +- client/components/open/tables/OpenTable.vue | 277 +- .../open/tables/components/OpenCheckbox.vue | 44 +- .../open/tables/components/OpenFile.vue | 88 +- .../open/tables/components/OpenSelect.vue | 30 +- .../open/tables/components/OpenTag.vue | 27 +- .../open/tables/components/OpenText.vue | 5 +- .../open/tables/components/OpenUrl.vue | 17 +- .../open/tables/components/ResizableTh.vue | 42 +- client/components/pages/OpenFormFooter.vue | 59 +- .../pages/auth/ForgotPasswordModal.vue | 216 +- .../pages/auth/components/LoginForm.vue | 142 +- .../pages/auth/components/QuickRegister.vue | 88 +- .../pages/auth/components/RegisterForm.vue | 160 +- client/components/pages/forms/NewFeatures.vue | 117 +- .../forms/create/CreateFormBaseModal.vue | 216 +- .../components/pages/forms/show/EmbedCode.vue | 59 +- .../forms/show/EmbedFormAsPopupModal.vue | 187 +- .../components/pages/forms/show/ExtraMenu.vue | 378 +- .../pages/forms/show/FormCleanings.vue | 130 +- .../pages/forms/show/FormQrCode.vue | 42 +- .../pages/forms/show/RegenerateFormLink.vue | 119 +- .../components/pages/forms/show/ShareLink.vue | 76 +- .../pages/forms/show/UrlFormPrefill.vue | 103 +- .../pages/pricing/CheckoutDetailsModal.vue | 106 +- .../components/pages/pricing/CustomPlan.vue | 30 +- .../pages/pricing/MonthlyYearlySelector.vue | 17 +- .../components/pages/pricing/PricingTable.vue | 184 +- .../pages/templates/SingleTemplate.vue | 64 +- .../pages/templates/TemplateTags.vue | 75 +- .../pages/templates/TemplatesList.vue | 218 +- client/components/pages/welcome/AiFeature.vue | 222 +- client/components/pages/welcome/Features.vue | 250 +- .../components/pages/welcome/MoreFeatures.vue | 297 +- .../pages/welcome/TemplatesSlider.vue | 69 +- .../components/pages/welcome/Testimonials.vue | 2 - client/components/tools/StopImpersonation.vue | 43 +- client/components/vendor/FeatureBase.vue | 66 +- .../vendor/appsumo/AppSumoBilling.vue | 96 +- .../vendor/appsumo/AppSumoRegister.vue | 69 +- client/composables/forms/initForm.js | 55 +- client/composables/forms/pendingSubmission.js | 14 +- .../forms/validatePropertiesLogic.js | 6 +- client/composables/lib/vForm/Errors.js | 43 +- client/composables/lib/vForm/Form.js | 156 +- client/composables/stores/useContentStore.js | 14 +- client/composables/useAlert.js | 31 +- client/composables/useAmplitude.js | 17 +- client/composables/useConfetti.js | 12 +- client/composables/useCrisp.js | 26 +- client/composables/useOpnApi.js | 40 +- client/composables/useOpnSeoMeta.js | 28 +- client/error.vue | 13 +- client/layouts/basic.vue | 4 +- client/layouts/default.vue | 3 +- client/lib/file-uploads.js | 47 +- client/lib/forms/FormLogicConditionChecker.js | 319 +- client/lib/forms/FormLogicPropertyResolver.js | 77 +- client/lib/forms/FormPropertyLogicRule.js | 128 +- client/lib/utils.js | 61 +- client/middleware/01.check-auth.global.js | 12 +- client/middleware/admin.js | 4 +- client/middleware/api-redirect.global.js | 13 +- client/middleware/auth.js | 6 +- client/middleware/custom-domain.global.js | 31 +- client/middleware/guest.js | 7 +- client/middleware/moderator.js | 4 +- client/middleware/subscribed.js | 4 +- client/mixins/forms/input.js | 42 +- client/mixins/forms/saveUpdateAlert.js | 12 +- client/opnform.config.js | 38 +- client/package-lock.json | 3976 ++++++++++------- client/package.json | 14 +- client/pages/ai-form-builder.vue | 951 ++-- client/pages/forms/[slug]/edit.vue | 54 +- client/pages/forms/[slug]/index.vue | 61 +- client/pages/forms/[slug]/show.vue | 283 +- client/pages/forms/[slug]/show/index.vue | 6 +- .../forms/[slug]/show/integrations/index.vue | 94 +- client/pages/forms/[slug]/show/share.vue | 70 +- client/pages/forms/[slug]/show/stats.vue | 10 +- .../pages/forms/[slug]/show/submissions.vue | 13 +- client/pages/forms/create/guest.vue | 81 +- client/pages/forms/create/index.vue | 99 +- client/pages/home.vue | 229 +- client/pages/index.vue | 289 +- client/pages/login.vue | 55 +- client/pages/password/email.vue | 43 +- client/pages/password/reset/[token].vue | 68 +- client/pages/pricing.vue | 369 +- client/pages/privacy-policy.vue | 19 +- client/pages/register.vue | 64 +- client/pages/settings.vue | 155 +- client/pages/settings/account.vue | 49 +- client/pages/settings/admin.vue | 101 +- client/pages/settings/billing.vue | 42 +- client/pages/settings/index.vue | 6 +- client/pages/settings/password.vue | 52 +- client/pages/settings/profile.vue | 41 +- client/pages/settings/workspace.vue | 268 +- client/pages/subscriptions/error.vue | 31 +- client/pages/subscriptions/success.vue | 60 +- client/pages/templates/[slug].vue | 262 +- client/pages/templates/index.vue | 20 +- client/pages/templates/industries/[slug].vue | 80 +- client/pages/templates/my-templates.vue | 24 +- client/pages/templates/types/[slug].vue | 78 +- client/pages/terms-conditions.vue | 21 +- client/plugins/amplitude.js | 17 +- client/plugins/crisp.client.js | 7 +- client/plugins/sentry.js | 29 +- client/plugins/vue-confetti.client.js | 6 +- client/public/widgets/embed-min.js | 56 +- client/public/widgets/embed.js | 53 +- client/public/widgets/iframeResize.min.js | 850 +++- .../iframeResizer.contentWindow.min.js | 774 +++- client/server/plugins/embeddable.js | 10 +- client/sitemap.js | 8 +- client/stores/app.js | 55 +- client/stores/auth.js | 24 +- client/stores/errors.js | 14 +- client/stores/form_integrations.js | 35 +- client/stores/forms.js | 41 +- client/stores/notion_pages.js | 15 +- client/stores/records.js | 12 +- client/stores/templates.js | 39 +- client/stores/working_form.js | 36 +- client/stores/workspaces.js | 22 +- client/tailwind.config.js | 107 +- 228 files changed, 17142 insertions(+), 8850 deletions(-) create mode 100644 client/.eslintrc.cjs diff --git a/client/.eslintrc.cjs b/client/.eslintrc.cjs new file mode 100644 index 000000000..bae286281 --- /dev/null +++ b/client/.eslintrc.cjs @@ -0,0 +1,19 @@ +module.exports = { + root: true, + extends: ['@nuxt/eslint-config'], + parser: 'vue-eslint-parser', + env: { + browser: true, + node: true, + }, + extends: ['@nuxt/eslint-config'], + rules: { + 'vue/require-default-prop': 'off', + 'vue/no-mutating-props': 'off', + semi: ['error', 'never'], + 'vue/no-v-html': 'off', + 'prefer-rest-params': 'off', + 'vue/valid-template-root': 'off', + 'no-undef': 'off', + }, +} \ No newline at end of file diff --git a/client/app.vue b/client/app.vue index 558d33ad8..f3a3ec6a2 100644 --- a/client/app.vue +++ b/client/app.vue @@ -1,103 +1,123 @@ diff --git a/client/components/forms/CheckboxInput.vue b/client/components/forms/CheckboxInput.vue index 42f40933f..bec304556 100644 --- a/client/components/forms/CheckboxInput.vue +++ b/client/components/forms/CheckboxInput.vue @@ -4,9 +4,18 @@ - + - {{ label }} * + {{ label }} + * @@ -21,28 +30,28 @@ diff --git a/client/components/forms/CodeInput.client.vue b/client/components/forms/CodeInput.client.vue index 507045744..75e4189b9 100644 --- a/client/components/forms/CodeInput.client.vue +++ b/client/components/forms/CodeInput.client.vue @@ -1,7 +1,5 @@
-
@@ -27,25 +36,25 @@ diff --git a/client/components/forms/ColorInput.vue b/client/components/forms/ColorInput.vue index 3bfa0e8f1..491afd28b 100644 --- a/client/components/forms/ColorInput.vue +++ b/client/components/forms/ColorInput.vue @@ -5,12 +5,20 @@
- - {{ label }} * + {{ label }} + *
@@ -25,21 +33,21 @@ diff --git a/client/components/forms/FileInput.vue b/client/components/forms/FileInput.vue index bb78f5058..45e7f3688 100644 --- a/client/components/forms/FileInput.vue +++ b/client/components/forms/FileInput.vue @@ -3,60 +3,117 @@ -