Skip to content

Commit ab67f34

Browse files
committed
frontend: require semicolons
1 parent b0f63a2 commit ab67f34

File tree

69 files changed

+194
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+194
-194
lines changed

frontend/src/actions/clientActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ export function handleClientSocketEvents(eventType: SocketEventTypes, eventPaylo
5151
default:
5252
throw new Error(`${eventType} not supported for client.`);
5353
}
54-
}
54+
};
5555
}

frontend/src/actions/configActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ export function handleConfigSocketEvents(eventType: SocketEventTypes, eventPaylo
4141
default:
4242
throw new Error(`${eventType} not supported for config.`);
4343
}
44-
}
44+
};
4545
}

frontend/src/actions/consultantActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ export function handleConsultantSocketEvents(
5757
default:
5858
throw new Error(`${eventType} not supported for consultant.`);
5959
}
60-
}
60+
};
6161
}

frontend/src/actions/holidays.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class HolidaysService {
1212
if (!this.cache[monthKey])
1313
this.cache[monthKey] = getWorkDaysInMonth(month);
1414

15-
return this.cache[monthKey]
15+
return this.cache[monthKey];
1616
}
1717
}
1818

frontend/src/actions/initialLoad.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,5 +210,5 @@ export function initialLoad(loadNextMonth?: number): any {
210210

211211
return promise
212212
.then(() => dispatch({type: ACTION_TYPES.INITIAL_LOAD, lastMonthsDownloaded: monthsToLoad}));
213-
}
213+
};
214214
}

frontend/src/actions/invoiceActions.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const syncCreditNotas = (invoice: InvoiceModel, previousCreditNotas: stri
9494
invoiceToUpdate.creditNotas = [];
9595
dispatch(updateInvoiceRequest(invoiceToUpdate, null, false) as any);
9696
}
97-
})
97+
});
9898

9999
invoice.creditNotas.forEach(creditNota => {
100100
const invoiceToUpdate = new InvoiceModel(invoice.config, invoices.find(i => i._id === creditNota));
@@ -109,9 +109,9 @@ export const syncCreditNotas = (invoice: InvoiceModel, previousCreditNotas: stri
109109
dispatch(updateInvoiceRequest(invoiceToUpdate, null, false) as any);
110110
}
111111
}
112-
})
113-
}
114-
}
112+
});
113+
};
114+
};
115115

116116

117117

@@ -140,7 +140,7 @@ export function toggleInvoiceVerify(data: InvoiceModel, toggleBusy = true) {
140140
.catch(catchHandler)
141141
.then(() => {
142142
if (toggleBusy)
143-
dispatch(busyToggle.off())
143+
dispatch(busyToggle.off());
144144
});
145145
};
146146
}
@@ -198,5 +198,5 @@ export function handleInvoiceSocketEvents(eventType: SocketEventTypes, eventPayl
198198
default:
199199
throw new Error(`${eventType} not supported for project month.`);
200200
}
201-
}
201+
};
202202
}

frontend/src/actions/projectActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export function handleProjectSocketEvents(eventType: SocketEventTypes, eventPayl
273273
default:
274274
throw new Error(`${eventType} not supported for project.`);
275275
}
276-
}
276+
};
277277
}
278278

279279
export function handleProjectMonthSocketEvents(eventType: SocketEventTypes, eventPayload: EntityEventPayload) {
@@ -326,5 +326,5 @@ export function handleProjectMonthSocketEvents(eventType: SocketEventTypes, even
326326
default:
327327
throw new Error(`${eventType} not supported for project month.`);
328328
}
329-
}
329+
};
330330
}

frontend/src/actions/userActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function handleUserSocketEvents(eventType: SocketEventTypes, eventPayload
5252
default:
5353
throw new Error(`${eventType} not supported for user.`);
5454
}
55-
}
55+
};
5656
}
5757

5858

@@ -96,5 +96,5 @@ export function handleRoleSocketEvents(eventType: SocketEventTypes, eventPayload
9696
default:
9797
throw new Error(`${eventType} not supported for role.`);
9898
}
99-
}
99+
};
100100
}

frontend/src/components/admin/DataLoaded.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ const DataLoadedComponent = () => {
5555
)}
5656
</div>
5757
);
58-
}
58+
};
5959

6060
export const DataLoaded = EnhanceWithClaim(DataLoadedComponent);

frontend/src/components/admin/audit/spec/AuditChangeEntry.spec.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {render} from '@testing-library/react';
2-
import '@testing-library/jest-dom'
2+
import '@testing-library/jest-dom';
33
import {AuditLog, AuditModelTypes} from '../audit-models';
44
import {AuditChangeEntry} from '../AuditChangeEntry';
55

@@ -14,10 +14,10 @@ describe('AuditChangeEntry', () => {
1414
model: 'client',
1515
diff: [],
1616
};
17-
const modelType: AuditModelTypes = 'client'
18-
render(<AuditChangeEntry change={change} modelType={modelType} />)
19-
})
17+
const modelType: AuditModelTypes = 'client';
18+
render(<AuditChangeEntry change={change} modelType={modelType} />);
19+
});
2020

21-
})
21+
});
2222

2323

frontend/src/components/admin/audit/spec/AuditChangeEntryIcon.spec.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { AuditChangeEntryIcon } from '../AuditChangeEntryIcon';
55
describe('AuditChangeEntryIcon', () => {
66
it('creates a fa-plus for NEW entries', () => {
77
const diff = {kind: 'N'} as AuditChange;
8-
const tree = renderer.create(<AuditChangeEntryIcon diff={diff} />)
8+
const tree = renderer.create(<AuditChangeEntryIcon diff={diff} />);
99

1010
expect(tree).toMatchInlineSnapshot(`
1111
<i
@@ -16,12 +16,12 @@ describe('AuditChangeEntryIcon', () => {
1616
}
1717
}
1818
/>
19-
`)
20-
})
19+
`);
20+
});
2121

2222
it('creates a fa-trash for deleted entries', () => {
2323
const diff = {kind: 'D'} as AuditChange;
24-
const tree = renderer.create(<AuditChangeEntryIcon diff={diff} />)
24+
const tree = renderer.create(<AuditChangeEntryIcon diff={diff} />);
2525

2626
expect(tree).toMatchInlineSnapshot(`
2727
<i
@@ -33,6 +33,6 @@ describe('AuditChangeEntryIcon', () => {
3333
}
3434
}
3535
/>
36-
`)
37-
})
38-
})
36+
`);
37+
});
38+
});

frontend/src/components/client/EditClient.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ const EditClient = () => {
7575
</StickyFooter>
7676
</Container>
7777
);
78-
}
78+
};
7979

8080
export default EditClient;

frontend/src/components/client/client-helpers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const useClientAlreadyExists = (client: ClientModel | null) => {
3535

3636
const clientAlreadyExists = !!clientWithSameKbo && client?.btw && client.btw !== t('taxRequest');
3737
return clientAlreadyExists;
38-
}
38+
};
3939

4040

4141

@@ -63,7 +63,7 @@ const checkIfCanSaveClient = (client: ClientModel | null): boolean => {
6363
return false;
6464

6565
return true;
66-
}
66+
};
6767

6868

6969
export const useClientState = (clientId: string) => {
@@ -104,4 +104,4 @@ export const useClientState = (clientId: string) => {
104104
clientAlreadyExists,
105105
canSaveClient: checkIfCanSaveClient(client) && (client?._id || !clientAlreadyExists),
106106
};
107-
}
107+
};

frontend/src/components/client/contract/ContractBadge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function getBadgeStyle(status: ContractStatus): BadgeStyle {
2424
case ContractStatus.Sent:
2525
case ContractStatus.Verified:
2626
case ContractStatus.NoContract:
27-
return {bg: 'danger', text: 'white'}
27+
return {bg: 'danger', text: 'white'};
2828

2929
default:
3030
console.error(`Unexpected ContractStatus '${status}'`);

frontend/src/components/client/contract/ContractStatusWithNotes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ const ContractStatusWithNotesComponent = ({value, label, onChange, ...props}: Ba
4848
/>
4949
</div>
5050
);
51-
}
51+
};
5252

5353
export const ContractStatusWithNotes = EnhanceInputWithLabel(ContractStatusWithNotesComponent);

frontend/src/components/client/controls/ClientDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ const ClientDetails = ({client, onOpenDetails, onOpenDetailsTitle}: ClientDetail
4242
<div>{client.btw}</div>
4343
</>
4444
);
45-
}
45+
};
4646

4747
export default ClientDetails;

frontend/src/components/client/controls/ClientSearch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ export const ClientSearch = ({values, options, onChange, ...props}: ClientSearch
2727
isMulti
2828
{...props}
2929
/>
30-
)};
30+
);};

frontend/src/components/client/models/getClientFeature.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ const getFilteredClients = (config: ClientFeatureBuilderConfig): ClientModel[] =
2525
return clients;
2626

2727
if (config.filters.types.length > 0) {
28-
clients = clients.filter(client => config.filters.types.every(type => client.types.includes(type)))
28+
clients = clients.filter(client => config.filters.types.every(type => client.types.includes(type)));
2929
}
3030

3131
if (clients.length === 0)
3232
return clients;
3333

3434
if (config.filters.years.length > 0) {
3535
clients = clients.filter(client => {
36-
const invoices = config.invoices.filter(i => i.client._id === client._id)
36+
const invoices = config.invoices.filter(i => i.client._id === client._id);
3737
const years = getInvoiceYears(invoices);
38-
return config.filters.years.every(year => years.includes(year))
39-
})
38+
return config.filters.years.every(year => years.includes(year));
39+
});
4040
}
4141

4242
return clients;
43-
}
43+
};
4444

4545
const getClientInvoices = (client: ClientModel, config: ClientFeatureBuilderConfig): InvoiceModel[] => {
4646
let clientInvoices = config.invoices.filter(i => i.client._id === client._id);
@@ -49,7 +49,7 @@ const getClientInvoices = (client: ClientModel, config: ClientFeatureBuilderConf
4949
}
5050

5151
return clientInvoices;
52-
}
52+
};
5353

5454
const clientListConfig = (config: ClientFeatureBuilderConfig): IList<ClientModel, ClientListFilters> => {
5555
const cells: IListCell<ClientModel>[] = [{
@@ -146,7 +146,7 @@ const getFilterOptions = (config: ClientFeatureBuilderConfig): ClientFilterOptio
146146
value: y,
147147
label: y.toString()
148148
})));
149-
}
149+
};
150150

151151
export const clientFeature = (config: ClientFeatureBuilderConfig): IFeature<ClientModel, ClientListFilters> => {
152152
const feature: IFeature<ClientModel, ClientListFilters> = {

frontend/src/components/consultant/ConsultantProjectsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function useConsultantProjects(): ConsultantProject[] {
4141
}));
4242

4343
const result = consultants.reduce((acc, consultant) => {
44-
const consultantProjects = projects.filter(x => x.consultantId === consultant._id)
44+
const consultantProjects = projects.filter(x => x.consultantId === consultant._id);
4545

4646
if (consultantProjects.length) {
4747
acc = acc.concat(consultantProjects.map(project => ({

frontend/src/components/controls/Icon.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const IconComponent = ({fa, onClick, href, dispatch, className, label, labelStyl
9696
}
9797

9898
return FinalIcon;
99-
}
99+
};
100100

101101

102102
export const SpinnerIcon = ({...props}: IconProps) => (
@@ -113,7 +113,7 @@ export const ExpandIcon = ({...props}: IconProps) => <Icon className="tst-expand
113113

114114
const ClaimSpan = EnhanceWithClaim(({children, ...props}: any) => {
115115
return <span {...props}>{children}</span>;
116-
})
116+
});
117117

118118
export const NotEmailedIcon = ({...props}) => (
119119
<ClaimSpan

frontend/src/components/controls/attachments/AttachmentDownloadIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const InvoicePreviewIcon = ({ invoice, ...props }: InvoiceModelProps & Ic
3939
const configInvoiceFileName = useSelector((state: ConfacState) => state.config.invoiceFileName);
4040
const defaultInvoiceFileName = invoice.client?.invoiceFileName || configInvoiceFileName;
4141
const fileType = invoice.isQuotation ? 'quotation' : 'invoice';
42-
const url = getInvoiceDownloadUrl(defaultInvoiceFileName, invoice, 'pdf', undefined)
42+
const url = getInvoiceDownloadUrl(defaultInvoiceFileName, invoice, 'pdf', undefined);
4343
return (
4444
<Icon
4545
title={t(`${fileType}.viewPdf`)}

frontend/src/components/controls/comments/CommentModel.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { IComment } from "../../../models"
1+
import { IComment } from "../../../models";
22
import { Claim } from "../../users/models/UserModel";
33
import { formatDate, t } from "../../utils";
4-
import { Features, IFeature } from "../feature/feature-models"
4+
import { Features, IFeature } from "../feature/feature-models";
55
import { EditIcon } from "../Icon";
66
import { DeleteIcon } from "../icons/DeleteIcon";
77
import { CommentsListFilters, IList, IListCell, ListFilters } from "../table/table-models";
@@ -98,7 +98,7 @@ const userCanManageComment = (claims: Claim[], commentAuthor: string): boolean =
9898
return true;
9999

100100
return claims.includes(Claim.ManageComments);
101-
}
101+
};
102102

103103
export const getCommentsFeature = (config: CommentFeatureBuilderConfig): IFeature<IComment, CommentsListFilters> => {
104104
const feature: IFeature<IComment, CommentsListFilters> = {
@@ -109,4 +109,4 @@ export const getCommentsFeature = (config: CommentFeatureBuilderConfig): IFeatur
109109
};
110110

111111
return feature;
112-
}
112+
};

frontend/src/components/controls/comments/CommentsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ export const CommentList = ({value, onChange, claim, ...config}: CommentsListPro
5959
)}
6060
</>
6161
);
62-
}
62+
};

frontend/src/components/controls/form-controls/button/NotesWithCommentsModalButton.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ export const NotesWithCommentsModalButton = ({claim, value, onChange, title, dis
4040
createdBy: currentUser._id,
4141
createdOn: new Date().toISOString(),
4242
comment: ''
43-
}
43+
};
4444

4545
setEditComment(newComment);
46-
}
46+
};
4747

4848
const handleEditComment = (comment: IComment) => {
4949
const currentUser = authService.getUser()!;
@@ -55,7 +55,7 @@ export const NotesWithCommentsModalButton = ({claim, value, onChange, title, dis
5555
}
5656

5757
setEditComment({...comment, modifiedBy: currentUser._id, modifiedOn: new Date().toISOString()});
58-
}
58+
};
5959

6060
const handleSaveEditedComment = () => {
6161
if (!editComment)
@@ -74,7 +74,7 @@ export const NotesWithCommentsModalButton = ({claim, value, onChange, title, dis
7474

7575
onChange(updatedComments);
7676
setEditComment(null);
77-
}
77+
};
7878

7979

8080
const handleDeleteComment = (deletedComment: IComment) => {
@@ -176,7 +176,7 @@ const OpenModalButton = ({includeBorder, variant, style, setOpen, commentAndNote
176176
style={style}
177177
className="tst-add-note"
178178
/>
179-
)
179+
);
180180
}
181181

182182
return (
@@ -189,4 +189,4 @@ const OpenModalButton = ({includeBorder, variant, style, setOpen, commentAndNote
189189
fa={icon}
190190
/>
191191
);
192-
}
192+
};

0 commit comments

Comments
 (0)