From 7737d2b07eba7148570d59fec6273138af5f2154 Mon Sep 17 00:00:00 2001 From: cameron-eyds Date: Tue, 24 Oct 2023 11:20:36 -0700 Subject: [PATCH] Modernized Linting for Vue and Typescript -- Applied non functional fixes --- ppr-ui/.eslintrc.js | 12 +- ppr-ui/package.json | 2 +- ppr-ui/src/App.vue | 39 +- .../src/assets/svgs/ExecutorBusinessIcon.vue | 33 +- ppr-ui/src/assets/svgs/ExecutorPersonIcon.vue | 17 +- ppr-ui/src/assets/svgs/HomeLocationIcon.vue | 37 +- ppr-ui/src/assets/svgs/HomeOwnersIcon.vue | 37 +- .../src/components/collateral/Collateral.vue | 79 ++- .../generalCollateral/GenColAmend.vue | 40 +- .../generalCollateral/GenColEdit.vue | 19 +- .../generalCollateral/GenColSummary.vue | 271 +++++--- .../generalCollateral/GeneralCollateral.vue | 16 +- .../vehicleCollateral/EditCollateral.vue | 94 +-- .../vehicleCollateral/VehicleCollateral.vue | 365 ++++++----- ppr-ui/src/components/common/AccountInfo.vue | 20 +- ppr-ui/src/components/common/Attention.vue | 29 +- ppr-ui/src/components/common/BaseSnackbar.vue | 2 +- ppr-ui/src/components/common/Breadcrumb.vue | 34 +- ppr-ui/src/components/common/ButtonFooter.vue | 49 +- .../src/components/common/ButtonsStacked.vue | 70 ++- ppr-ui/src/components/common/CautionBox.vue | 5 +- .../components/common/CertifyInformation.vue | 126 ++-- .../components/common/ContactInformation.vue | 113 ++-- .../src/components/common/ContactUsToggle.vue | 10 +- ppr-ui/src/components/common/CourtOrder.vue | 368 ++++++++--- ppr-ui/src/components/common/DatePicker.vue | 15 +- .../common/DischargeConfirmSummary.vue | 34 +- ppr-ui/src/components/common/DocumentId.vue | 38 +- ppr-ui/src/components/common/ErrorContact.vue | 30 +- ppr-ui/src/components/common/FolioNumber.vue | 5 +- .../components/common/FolioNumberSummary.vue | 48 +- .../common/FolioOrReferenceNumber.vue | 29 +- ppr-ui/src/components/common/FormCard.vue | 11 +- ppr-ui/src/components/common/FormField.vue | 6 +- .../components/common/HomeLocationInfo.vue | 140 +++-- ppr-ui/src/components/common/InfoChip.vue | 10 +- .../src/components/common/OrgNameLookup.vue | 14 +- ppr-ui/src/components/common/PartyForm.vue | 135 ++-- ppr-ui/src/components/common/PartyReview.vue | 58 +- ppr-ui/src/components/common/PidNumber.vue | 46 +- ppr-ui/src/components/common/QsAccessBtn.vue | 22 +- .../common/RegistrationsWrapper.vue | 130 ++-- ppr-ui/src/components/common/Remarks.vue | 15 +- ppr-ui/src/components/common/ReviewCard.vue | 52 +- .../components/common/SharedDatePicker.vue | 105 ++-- .../components/common/SimpleHelpToggle.vue | 21 +- ppr-ui/src/components/common/StaffPayment.vue | 69 ++- ppr-ui/src/components/common/Stepper.vue | 82 ++- .../src/components/common/StickyContainer.vue | 35 +- .../components/common/SubProductSelector.vue | 31 +- .../src/components/common/WysiwygEditor.vue | 44 +- .../components/dashboard/DashboardTabs.vue | 42 +- ppr-ui/src/components/dialogs/BaseDialog.vue | 40 +- .../dialogs/ChangeSecuredPartyDialog.vue | 40 +- .../components/dialogs/ConfirmationDialog.vue | 14 +- .../dialogs/LargeSearchDelayDialog.vue | 14 +- .../dialogs/LargeSearchResultDialog.vue | 14 +- .../dialogs/RegistrationConfirmation.vue | 44 +- .../dialogs/RegistrationOtherDialog.vue | 73 ++- .../components/dialogs/SecuredPartyDialog.vue | 158 +++-- .../components/dialogs/StaffPaymentDialog.vue | 32 +- .../dialogs/common/DialogButtons.vue | 22 +- .../dialogs/common/DialogContent.vue | 31 +- .../HomeLocation/HomeCivicAddress.vue | 56 +- .../HomeLocation/HomeLandOwnership.vue | 26 +- .../HomeLocation/HomeLocationDescription.vue | 96 ++- .../HomeLocation/HomeLocationType.vue | 70 ++- .../HomeOwners/AddEditHomeOwner.vue | 106 ++-- .../HomeOwners/FractionalOwnership.vue | 16 +- .../HomeOwners/HomeOwnerGroups.vue | 37 +- .../HomeOwners/HomeOwnerRoles.vue | 22 +- .../HomeOwners/HomeOwnersMixedRolesError.vue | 16 +- .../HomeOwners/HomeOwnersTable.vue | 585 +++++++++++------- .../HomeOwners/TableGroupHeader.vue | 230 +++++-- .../ReviewConfirm/HomeLocationReview.vue | 545 +++++++++------- .../ReviewConfirm/HomeOwnersReview.vue | 56 +- .../ReviewConfirm/SubmittingPartyReview.vue | 128 +++- .../ReviewConfirm/YourHomeReview.vue | 169 +++-- .../YourHome/AddEditHomeSections.vue | 55 +- .../YourHome/HomeCertification.vue | 93 ++- .../mhrRegistration/YourHome/HomeSections.vue | 43 +- .../YourHome/ManufacturedYearInput.vue | 32 +- .../YourHome/ManufacturedYearSelect.vue | 2 +- .../YourHome/ManufacturerMakeModel.vue | 23 +- .../YourHome/OtherInformation.vue | 19 +- .../YourHome/RebuiltStatus.vue | 28 +- .../mhrTransfers/ConfirmCompletion.vue | 156 +++-- .../mhrTransfers/DeathCertificate.vue | 154 ++--- .../mhrTransfers/HomeOwnersGroupError.vue | 52 +- .../mhrTransfers/SupportingDocuments.vue | 33 +- .../mhrTransfers/TransferDetails.vue | 37 +- .../mhrTransfers/TransferDetailsReview.vue | 28 +- .../components/mhrTransfers/TransferType.vue | 46 +- ppr-ui/src/components/parties/Parties.vue | 76 ++- .../src/components/parties/PartySummary.vue | 63 +- .../src/components/parties/debtor/Debtors.vue | 215 ++++--- .../components/parties/debtor/EditDebtor.vue | 159 +++-- .../components/parties/party/EditParty.vue | 135 ++-- .../parties/party/PartyAutocomplete.vue | 93 +-- .../components/parties/party/PartySearch.vue | 52 +- .../parties/party/RegisteringParty.vue | 72 ++- .../parties/party/RegisteringPartyChange.vue | 96 +-- .../parties/party/SecuredParties.vue | 227 ++++--- .../parties/summaries/BasePartySummary.vue | 77 ++- .../parties/summaries/DebtorSummary.vue | 6 +- .../summaries/RegisteringPartySummary.vue | 6 +- .../parties/summaries/SecuredPartySummary.vue | 6 +- .../registration/AmendmentDescription.vue | 58 +- .../registration/RegistrationBar.vue | 30 +- .../RegistrationBarButtonList.vue | 22 +- .../RegistrationBarTypeAheadList.vue | 72 ++- .../length-trust/EditTrustIndenture.vue | 62 +- .../length-trust/RegistrationLengthTrust.vue | 163 +++-- .../RegistrationLengthTrustAmendment.vue | 139 +++-- .../RegistrationLengthTrustSummary.vue | 114 +++- .../RegistrationRepairersLien.vue | 201 ++++-- .../search/BusinessSearchAutocomplete.vue | 67 +- ppr-ui/src/components/search/SearchBar.vue | 134 ++-- .../src/components/search/SearchBarList.vue | 24 +- .../components/tables/RegistrationTable.vue | 128 ++-- .../src/components/tables/SearchHistory.vue | 87 ++- .../components/tables/common/SortingIcon.vue | 6 +- .../tables/common/TableObserver.vue | 2 +- .../src/components/tables/common/TableRow.vue | 294 ++++++--- .../tables/mhr/HomeSectionsTable.vue | 99 ++- .../components/tables/mhr/SearchedResults.vue | 185 ++++-- .../components/tables/ppr/SearchedResults.vue | 115 +++- ppr-ui/src/components/tombstone/Tombstone.vue | 4 +- .../components/tombstone/TombstoneDefault.vue | 68 +- .../tombstone/TombstoneDischarge.vue | 90 ++- .../components/unitNotes/EffectiveDate.vue | 44 +- .../src/components/unitNotes/ExpiryDate.vue | 37 +- .../src/components/unitNotes/UnitNoteAdd.vue | 56 +- .../unitNotes/UnitNoteContentInfo.vue | 104 +++- .../unitNotes/UnitNoteHeaderInfo.vue | 5 +- .../components/unitNotes/UnitNotePanel.vue | 66 +- .../components/unitNotes/UnitNotePanels.vue | 72 ++- .../components/unitNotes/UnitNoteReview.vue | 79 ++- .../unitNotes/UnitNoteReviewDetailsTable.vue | 64 +- .../ReviewConfirm/Authorization.vue | 13 +- .../ReviewConfirm/ConfirmRequirements.vue | 6 +- .../ReviewConfirm/ListRequirements.vue | 44 +- .../ReviewConfirm/QsInformationReview.vue | 38 +- .../userAccess/ServiceAgreement.vue | 42 +- .../src/composables/address/BaseAddress.vue | 69 ++- ppr-ui/src/composables/fees/FeeSummary.vue | 110 +++- .../mhrRegistration/useHomeOwners.ts | 2 +- .../MhrRegistrationFractionalOwnershipIF.ts | 2 +- ppr-ui/src/utils/registration-helper.ts | 4 +- ppr-ui/src/views/Dashboard.vue | 160 +++-- ppr-ui/src/views/Search.vue | 90 ++- .../src/views/amendment/AmendRegistration.vue | 152 +++-- .../src/views/amendment/ConfirmAmendment.vue | 193 ++++-- ppr-ui/src/views/auth/Login.vue | 2 +- ppr-ui/src/views/auth/Signin.vue | 2 +- .../src/views/discharge/ConfirmDischarge.vue | 92 ++- .../views/discharge/DischargeRegistration.vue | 94 ++- .../src/views/exemption/ExemptionDetails.vue | 100 ++- .../src/views/exemption/ExemptionReview.vue | 92 ++- ppr-ui/src/views/exemption/Exemptions.vue | 54 +- .../views/mhrInformation/MhrInformation.vue | 280 ++++++--- .../src/views/mhrInformation/MhrUnitNote.vue | 68 +- .../src/views/mhrSearch/ConfirmMHRSearch.vue | 102 +-- ppr-ui/src/views/mhrSearch/MHRSearch.vue | 57 +- .../views/newMhrRegistration/HomeLocation.vue | 15 +- .../views/newMhrRegistration/HomeOwners.vue | 230 +++++-- .../newMhrRegistration/MhrRegistration.vue | 59 +- .../newMhrRegistration/MhrReviewConfirm.vue | 72 ++- .../newMhrRegistration/SubmittingParty.vue | 68 +- .../src/views/newMhrRegistration/YourHome.vue | 44 +- .../views/newRegistration/AddCollateral.vue | 63 +- .../src/views/newRegistration/AddParties.vue | 55 +- .../src/views/newRegistration/LengthTrust.vue | 55 +- .../views/newRegistration/ReviewConfirm.vue | 138 +++-- ppr-ui/src/views/renew/ConfirmRenewal.vue | 96 ++- ppr-ui/src/views/renew/RenewRegistration.vue | 105 ++-- ppr-ui/src/views/userAccess/QsInformation.vue | 18 +- .../src/views/userAccess/QsReviewConfirm.vue | 80 ++- .../src/views/userAccess/QsSelectAccess.vue | 28 +- ppr-ui/src/views/userAccess/UserAccess.vue | 74 ++- 180 files changed, 9347 insertions(+), 4290 deletions(-) diff --git a/ppr-ui/.eslintrc.js b/ppr-ui/.eslintrc.js index a70d7b45e..e971d1646 100644 --- a/ppr-ui/.eslintrc.js +++ b/ppr-ui/.eslintrc.js @@ -5,12 +5,9 @@ module.exports = { es2022: true }, extends: [ - 'plugin:vue/essential', - '@vue/standard', - '@vue/typescript', - 'plugin:vue/base', 'plugin:vuetify/base', - 'plugin:vuetify/recommended' + 'plugin:vue/vue3-recommended', + '@vue/typescript/recommended' ], rules: { 'standard/computed-property-even-spacing': 'off', @@ -21,8 +18,9 @@ module.exports = { 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'max-len': ['warn', { code: 120, ignoreRegExpLiterals: true }] }, + parser: "vue-eslint-parser", parserOptions: { - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'] + parser: "@typescript-eslint/parser", + sourceType: "module" } } diff --git a/ppr-ui/package.json b/ppr-ui/package.json index 7cfd31bcf..ad5d18bc0 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -8,7 +8,7 @@ "dev": "vite", "build": "vite build", "serve": "vite preview", - "lint": "eslint . --ext .js,.ts,.vue", + "lint": "eslint --fix . --ext .js,.ts,.vue", "test:unit": "vitest run", "test:coverage": "vitest run --coverage" }, diff --git a/ppr-ui/src/App.vue b/ppr-ui/src/App.vue index 30be9a6e3..760f310ad 100644 --- a/ppr-ui/src/App.vue +++ b/ppr-ui/src/App.vue @@ -1,32 +1,35 @@ diff --git a/ppr-ui/src/assets/svgs/ExecutorBusinessIcon.vue b/ppr-ui/src/assets/svgs/ExecutorBusinessIcon.vue index 2cd6aaecc..e5f1933bc 100644 --- a/ppr-ui/src/assets/svgs/ExecutorBusinessIcon.vue +++ b/ppr-ui/src/assets/svgs/ExecutorBusinessIcon.vue @@ -1,14 +1,35 @@ diff --git a/ppr-ui/src/assets/svgs/ExecutorPersonIcon.vue b/ppr-ui/src/assets/svgs/ExecutorPersonIcon.vue index bbf91bfc1..aa4db58b2 100644 --- a/ppr-ui/src/assets/svgs/ExecutorPersonIcon.vue +++ b/ppr-ui/src/assets/svgs/ExecutorPersonIcon.vue @@ -1,7 +1,18 @@ diff --git a/ppr-ui/src/assets/svgs/HomeLocationIcon.vue b/ppr-ui/src/assets/svgs/HomeLocationIcon.vue index 3dbe5d2ed..a26017de5 100644 --- a/ppr-ui/src/assets/svgs/HomeLocationIcon.vue +++ b/ppr-ui/src/assets/svgs/HomeLocationIcon.vue @@ -8,24 +8,41 @@ xmlns:xlink="http://www.w3.org/1999/xlink" > home location - - - - + + + - - - - + 23.6738432,10.0097198 L23.6738432,10.0097198 Z" + /> + diff --git a/ppr-ui/src/assets/svgs/HomeOwnersIcon.vue b/ppr-ui/src/assets/svgs/HomeOwnersIcon.vue index 165ffe79a..7e32520cc 100644 --- a/ppr-ui/src/assets/svgs/HomeOwnersIcon.vue +++ b/ppr-ui/src/assets/svgs/HomeOwnersIcon.vue @@ -8,24 +8,41 @@ xmlns:xlink="http://www.w3.org/1999/xlink" > home owner - - - - + + + - - - - + 22.7237123,19.0147572 Z" + /> + diff --git a/ppr-ui/src/components/collateral/Collateral.vue b/ppr-ui/src/components/collateral/Collateral.vue index de1982e68..0b4faaafc 100644 --- a/ppr-ui/src/components/collateral/Collateral.vue +++ b/ppr-ui/src/components/collateral/Collateral.vue @@ -1,14 +1,26 @@ diff --git a/ppr-ui/src/components/collateral/generalCollateral/GenColAmend.vue b/ppr-ui/src/components/collateral/generalCollateral/GenColAmend.vue index cf24bbd59..2a5b20e33 100644 --- a/ppr-ui/src/components/collateral/generalCollateral/GenColAmend.vue +++ b/ppr-ui/src/components/collateral/generalCollateral/GenColAmend.vue @@ -1,18 +1,24 @@