Skip to content

Commit

Permalink
18536 Fixed lint warnings before further development (bcgov#581)
Browse files Browse the repository at this point in the history
* - app version = 5.6.0
- fixed a whack of lint warnings

* - imported CorpTypeCd directly from module to avoid type confusion
  • Loading branch information
severinbeauvais authored Nov 16, 2023
1 parent 909a18c commit 700a8b4
Show file tree
Hide file tree
Showing 51 changed files with 185 additions and 201 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-create-ui",
"version": "5.5.8",
"version": "5.6.0",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand Down
18 changes: 9 additions & 9 deletions src/components/Dissolution/CompleteResolution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
</header>

<span
v-for="(item, index) in getCreateResolutionResource.helpSection.helpText.section1.items"
:key="index"
v-for="(item, index1) in getCreateResolutionResource.helpSection.helpText.section1.items"
:key="index1"
>
<p
v-if="item.type === ItemTypes.TEXT"
Expand All @@ -74,8 +74,8 @@
<v-row v-if="item.type === ItemTypes.PARTIAL_ITEMS">
<v-col cols="11">
<span
v-for="(partialItem, index) in item.value"
:key="index"
v-for="(partialItem, index2) in item.value"
:key="index2"
>
<span
v-if="partialItem.type === ItemTypes.TEXT"
Expand Down Expand Up @@ -426,8 +426,8 @@
</v-checkbox>
<ul>
<li
v-for="(item, index) in getCreateResolutionResource.confirmSection.items"
:key="index"
v-for="(item, index1) in getCreateResolutionResource.confirmSection.items"
:key="index1"
class="mt-4"
>
<v-row
Expand All @@ -450,8 +450,8 @@
</v-col>
<v-col cols="11">
<span
v-for="(partialItem, index) in item.value"
:key="index"
v-for="(partialItem, index2) in item.value"
:key="index2"
>
<span
v-if="partialItem.type === ItemTypes.TEXT"
Expand Down Expand Up @@ -846,7 +846,7 @@ export default class CompleteResolution extends Mixins(CommonMixin, DateMixin) {
// v-observe-visibility property, we are able to force a re-calculation of the text area height when a user navigates
// to the complete resolution step from another step for the first time. This results in the text area being rendered
// to the appropriate height.
onResolutionVisibilityChanged (isVisible: boolean, _entry): void {
onResolutionVisibilityChanged (isVisible: boolean): void {
if (isVisible) {
this.$refs.resolutionTextRef.calculateInputHeight()
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dissolution/CompleteResolutionSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export default class CompleteResolutionSummary extends Mixins(DateMixin) {
// v-observe-visibility property, we are able to force a re-calculation of the text area height when a user navigates
// to the complete resolution summary step from another step for the first time. This results in the text area being
// rendered to the appropriate height.
onResolutionVisibilityChanged (isVisible: boolean, _entry): void {
onResolutionVisibilityChanged (isVisible: boolean): void {
if (isVisible && this.resolutionTextHeightUpdateRequired) {
this.resolutionTextHeightUpdateRequired = false
this.$refs.resolutionTextRef.calculateInputHeight()
Expand Down
12 changes: 6 additions & 6 deletions src/components/Incorporation/IncorporationDateTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export default class IncorporationDateTime extends Mixins(DateMixin) {
* @param val The date input
*/
@Watch('dateText')
private onEffectiveDateManual (val: string): void {
private onEffectiveDateManual (): void {
this.constructDate()
}
Expand All @@ -349,7 +349,7 @@ export default class IncorporationDateTime extends Mixins(DateMixin) {
* @param val The hour selected
*/
@Watch('selectHour')
private onHourUpdate (val: string): void {
private onHourUpdate (): void {
this.constructDate()
}
Expand All @@ -358,7 +358,7 @@ export default class IncorporationDateTime extends Mixins(DateMixin) {
* @param val The minute selected
*/
@Watch('selectMinute')
private onMinuteUpdate (val: string): void {
private onMinuteUpdate (): void {
this.constructDate()
}
Expand All @@ -367,7 +367,7 @@ export default class IncorporationDateTime extends Mixins(DateMixin) {
* @param val The time period selected
*/
@Watch('selectPeriod')
private onPeriodUpdate (val: string): void {
private onPeriodUpdate (): void {
this.constructDate()
}
Expand All @@ -376,8 +376,8 @@ export default class IncorporationDateTime extends Mixins(DateMixin) {
* @param val The value of the selected radio button
*/
@Watch('selectDate')
private setDateTimeChoice (val) {
this.isFutureEffective = val === ISFUTUREEFFECTIVE
private setDateTimeChoice (val: string) {
this.isFutureEffective = (val === ISFUTUREEFFECTIVE)
this.isImmediate = !this.isFutureEffective
// Clear DateTimes when immediate is selected
Expand Down
4 changes: 4 additions & 0 deletions src/components/Incorporation/ShareStructure.vue
Original file line number Diff line number Diff line change
Expand Up @@ -387,15 +387,19 @@ export default class ShareStructure extends Mixins(CurrencyLookupMixin) {
// Events
@Emit('addEditClass')
// eslint-disable-next-line @typescript-eslint/no-unused-vars
private emitAddEditShareClassEvent (shareClass: ShareClassIF): void {}
@Emit('addEditSeries')
// eslint-disable-next-line @typescript-eslint/no-unused-vars
private emitAddEditShareSeriesEvent (shareSeries: ShareClassIF): void {}
@Emit('removeClass')
// eslint-disable-next-line @typescript-eslint/no-unused-vars
private emitRemoveShareClassEvent (shareClassIndex: number): void {}
@Emit('removeSeries')
// eslint-disable-next-line @typescript-eslint/no-unused-vars
private emitRemoveShareSeriesEvent (parentIndex: number, shareSeriesIndex: number): void {}
@Emit('resetEvent')
Expand Down
10 changes: 5 additions & 5 deletions src/components/Incorporation/UploadRules.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,23 @@
</p>
<ul class="bulleted-list mt-4">
<li
v-for="(item, index) in getCreateRulesResource.helpSection.helpText.section2.items"
:key="index"
v-for="(item, index1) in getCreateRulesResource.helpSection.helpText.section2.items"
:key="index1"
>
<span
v-if="item.type === ItemTypes.TEXT"
v-html="item.value"
/>
<template v-if="item.type === ItemTypes.PARTIAL_ITEMS">
<template v-for="(partialItem, index) in item.value">
<template v-for="(partialItem, index2) in item.value">
<span
v-if="partialItem.type === ItemTypes.TEXT"
:key="index"
:key="index2"
v-html="partialItem.value"
/>
<a
v-if="partialItem.type === ItemTypes.LINK"
:key="index"
:key="index2"
:href="partialItem.value.href"
target="_blank"
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Restoration/BusinessName.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default class BusinessName extends Mixins(CommonMixin, DateMixin, NameReq
// Global actions
@Action(useStore) setBusinessNameValid!: (x: boolean) => void
@Action(useStore) setCorrectNameOption!: (x: CorrectNameOptions) => void
@Action(useStore) setNameRequest!: (x: string) => void
@Action(useStore) setNameRequest!: (x: NameRequestIF) => void
@Action(useStore) setNameRequestApprovedName!: (x: string) => void
// Local variable
Expand Down Expand Up @@ -180,7 +180,7 @@ export default class BusinessName extends Mixins(CommonMixin, DateMixin, NameReq
/** Updates component validity initially and when correct name option has changed. */
@Watch('getCorrectNameOption', { immediate: true })
private updateComponentValidity (val: boolean): void {
private updateComponentValidity (): void {
this.setBusinessNameValid(!!this.getCorrectNameOption)
}
}
Expand Down
14 changes: 7 additions & 7 deletions src/components/common/ListPeopleAndRoles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@

<!-- List Content -->
<v-row
v-for="(orgPerson, index) in personList"
:key="index"
v-for="(orgPerson, index1) in personList"
:key="index1"
class="people-roles-content"
no-gutters
>
Expand Down Expand Up @@ -124,8 +124,8 @@
class="roles-column"
>
<p
v-for="(role, index) in orgPerson.roles"
:key="index"
v-for="(role, index2) in orgPerson.roles"
:key="index2"
>
{{ role.roleType }}
</p>
Expand All @@ -149,11 +149,11 @@
<div class="float-right">
<span class="edit-action">
<v-btn
:id="`officer-${index}-change-btn`"
:id="`officer-${index1}-change-btn`"
text
color="primary"
:tabindex="disabled ? -1 : 0"
@click="disabled ? null : emitPersonInfo(index)"
@click="disabled ? null : emitPersonInfo(index1)"
>
<v-icon small>mdi-pencil</v-icon>
<span>Edit</span>
Expand All @@ -180,7 +180,7 @@
</v-btn>
</template>
<v-list class="more-actions-list">
<v-list-item @click="emitRemovePerson(index)">
<v-list-item @click="emitRemovePerson(index1)">
<v-list-item-title>
<v-icon
small
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/OfficeAddresses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ export default class OfficeAddresses extends Mixins(CommonMixin) {
// Watchers
@Watch('formValid')
private onFormValidityChange (val: boolean): void {
private onFormValidityChange (): void {
this.emitValid()
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/RegAddEditOrgPerson.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
class="item first-name"
label="First Name"
:rules="enableRules ?
(isCompletingParty ? Rules.FirstNameRulesFirmsCP :
Rules.FirstNameRulesFirms) : []"
(isCompletingParty ? Rules.FirstNameRulesFirmsCP :
Rules.FirstNameRulesFirms) : []"
:readonly="isCompletingParty && !(isRoleStaff || isSbcStaff)"
/>
<v-text-field
Expand Down
1 change: 1 addition & 0 deletions src/dialogs/FilingSurveyDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default class FilingSurveyDialog extends Vue {
// Pass events to parent.
@Emit() no (): void {}
@Emit() yes (): void {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
@Emit('doNotShow') doNotShow (val: boolean): void {}
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/filing-interfaces/filing-data-interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FilingCodes } from '@/enums'
import { CorpTypeCd } from '@bcrs-shared-components/enums/'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/'

/** Filing data for SBC Fee Summary component. */
export interface FilingDataIF {
Expand Down
9 changes: 5 additions & 4 deletions src/interfaces/filing-interfaces/filing-interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { BusinessAddressIF, CourtOrderIF, RegisteredRecordsAddressesIF, NaicsIF,
OfficeAddressIF, PartyIF, ShareClassIF, SpecialResolutionIF } from '@/interfaces'
import { ApprovalTypes, BusinessTypes, DissolutionStatementTypes, DissolutionTypes, FilingTypes,
RestorationTypes, RelationshipTypes } from '@/enums'
import { CorpTypeCd, CorrectNameOptions } from '@bcrs-shared-components/enums/'
import { CorrectNameOptions } from '@bcrs-shared-components/enums/'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/'
import { ContactPointIF } from '@bcrs-shared-components/interfaces'

/**
Expand Down Expand Up @@ -78,7 +79,7 @@ export interface IncorporationFilingIF {
/** Interface for registration filing data saved to the Legal API. */
export interface RegistrationFilingIF {
header: {
name: string
name: FilingTypes
certifiedBy: string
date: string
effectiveDate?: string // not saved by UI but may be provided by API
Expand Down Expand Up @@ -118,7 +119,7 @@ export interface RegistrationFilingIF {
/** Interface for dissolution filing data saved to the Legal API. */
export interface DissolutionFilingIF {
header: {
name: string
name: FilingTypes
certifiedBy: string
date: string
effectiveDate?: string // Optional and should be set only for future effective filings
Expand Down Expand Up @@ -168,7 +169,7 @@ export interface DissolutionFilingIF {
/** Interface for restoration filing data saved to the Legal API. */
export interface RestorationFilingIF {
header: {
name: string
name: FilingTypes
certifiedBy: string
date: string
effectiveDate?: string // not saved by UI but may be provided by API
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/resource-interfaces/resource-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
PeopleAndRolesResourceIF, StepIF, CreateRulesResourceIF, CreateMemorandumResourceIF,
CreateResolutionResourceIF, CustodianResourceIF, CompletingPartyStatementIF
} from '@/interfaces'
import { CorpTypeCd } from '@bcrs-shared-components/enums/'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module'

/** Dissolution resource interface. */
export interface DissolutionResourceIF {
Expand Down
3 changes: 2 additions & 1 deletion src/interfaces/store-interfaces/state-interface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { CorpTypeCd, CorrectNameOptions } from '@bcrs-shared-components/enums/'
import { CorrectNameOptions } from '@bcrs-shared-components/enums/'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module'
import {
AccountInformationIF,
ContactPointIF,
Expand Down
3 changes: 2 additions & 1 deletion src/mixins/filing-template-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
import { ApprovalTypes, BusinessTypes, CoopTypes, DissolutionTypes, EffectOfOrders, FilingTypes,
PartyTypes, RelationshipTypes, RestorationTypes, RoleTypes, StaffPaymentOptions
} from '@/enums'
import { CorpTypeCd, CorrectNameOptions } from '@bcrs-shared-components/enums/'
import { CorrectNameOptions } from '@bcrs-shared-components/enums/'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/'

/**
* Mixin that provides the integration with the Legal API.
Expand Down
5 changes: 2 additions & 3 deletions src/resources/BreadCrumbResource.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { FilingTypes } from '@/enums'
import { CorpTypeCd } from '@bcrs-shared-components/enums/'
import { GetCorpNumberedDescription } from '@bcrs-shared-components/corp-type-module'
import { BreadcrumbIF } from '@/interfaces'
import { createPinia, setActivePinia } from 'pinia'
import { useStore } from '@/store/store'
import { GetCorpNumberedDescription } from '@bcrs-shared-components/corp-type-module'

setActivePinia(createPinia())
const store = useStore()
Expand All @@ -24,7 +23,7 @@ function getLegalName (): string {

/** Returns numbered entity name. */
function getNumberedEntityName (): string {
const getEntityType = store.getEntityType as CorpTypeCd
const getEntityType = store.getEntityType
return GetCorpNumberedDescription(getEntityType)
}

Expand Down
3 changes: 1 addition & 2 deletions src/resources/Dissolution/BC.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { DissolutionResourceIF } from '@/interfaces'
import { BulletListTypes, FilingCodes, ItemTypes } from '@/enums'
import { CorpTypeCd } from '@bcrs-shared-components/enums/'
import { GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module'
import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module'
import { DissolutionStepsCorp } from './steps'

export const DissolutionResourceBc: DissolutionResourceIF = {
Expand Down
3 changes: 1 addition & 2 deletions src/resources/Dissolution/BEN.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { DissolutionResourceIF } from '@/interfaces'
import { BulletListTypes, FilingCodes, ItemTypes } from '@/enums'
import { CorpTypeCd } from '@bcrs-shared-components/enums/'
import { GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module'
import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module'
import { DissolutionStepsCorp } from './steps'

export const DissolutionResourceBen: DissolutionResourceIF = {
Expand Down
3 changes: 1 addition & 2 deletions src/resources/Dissolution/CC.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { DissolutionResourceIF } from '@/interfaces'
import { BulletListTypes, FilingCodes, ItemTypes } from '@/enums'
import { CorpTypeCd } from '@bcrs-shared-components/enums/'
import { GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module'
import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module'
import { DissolutionStepsCorp } from './steps'

export const DissolutionResourceCc: DissolutionResourceIF = {
Expand Down
3 changes: 1 addition & 2 deletions src/resources/Dissolution/CP.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { DissolutionResourceIF } from '@/interfaces'
import { BulletListTypes, DissolutionStatementTypes, FilingCodes, ItemTypes } from '@/enums'
import { CorpTypeCd } from '@bcrs-shared-components/enums/'
import { GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module'
import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module'
import { DissolutionStepsCoop } from './steps'

export const DissolutionResourceCp: DissolutionResourceIF = {
Expand Down
Loading

0 comments on commit 700a8b4

Please sign in to comment.