Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update eslint #1279

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
9 changes: 5 additions & 4 deletions applications/accounts/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,25 @@
"luxon": "3.5.0"
},
"devDependencies": {
"@kesills/eslint-config-airbnb-typescript": "20.0.0",
"@motech-development/eslint-config-motech-base": "workspace:*",
"@motech-development/prettier-motech-config": "workspace:*",
"@motech-development/semantic-release": "workspace:*",
"@motech-development/serverless-outputs-env": "workspace:*",
"@stylistic/eslint-plugin": "2.9.0",
"@swc/core": "1.10.4",
"@swc/jest": "0.2.37",
"@types/aws-lambda": "8.10.147",
"@types/jest": "29.5.14",
"@types/luxon": "3.4.2",
"@typescript-eslint/eslint-plugin": "6.2.1",
"@typescript-eslint/parser": "6.2.1",
"@typescript-eslint/eslint-plugin": "8.8.1",
"@typescript-eslint/parser": "8.8.1",
"aws-lambda-mock-context": "3.2.1",
"aws-sdk-client-mock": "4.1.0",
"aws-sdk-client-mock-jest": "4.1.0",
"eslint": "8.57.1",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-prettier": "10.0.1",
"eslint-import-resolver-node": "0.3.9",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jest": "28.9.0",
Expand Down
9 changes: 5 additions & 4 deletions applications/accounts/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@
"devDependencies": {
"@graphql-codegen/cli": "5.0.3",
"@graphql-codegen/typescript-apollo-client-helpers": "3.0.0",
"@kesills/eslint-config-airbnb-typescript": "20.0.0",
"@motech-development/eslint-config-motech-base": "workspace:*",
"@motech-development/eslint-config-motech-react": "workspace:*",
"@motech-development/prettier-motech-config": "workspace:*",
"@motech-development/semantic-release": "workspace:*",
"@parcel/watcher": "2.5.0",
"@sentry/vite-plugin": "2.22.7",
"@stylistic/eslint-plugin": "2.9.0",
"@swc/core": "1.10.4",
"@swc/jest": "0.2.37",
"@testing-library/cypress": "10.0.2",
Expand All @@ -87,8 +89,8 @@
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"@types/styled-components": "5.1.34",
"@typescript-eslint/eslint-plugin": "6.2.1",
"@typescript-eslint/parser": "6.2.1",
"@typescript-eslint/eslint-plugin": "8.8.1",
"@typescript-eslint/parser": "8.8.1",
"@vitejs/plugin-react-swc": "3.7.2",
"axe-core": "4.10.2",
"cypress": "12.0.2",
Expand All @@ -101,8 +103,7 @@
"cypress-wait-until": "3.0.2",
"eslint": "8.57.1",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-prettier": "10.0.1",
"eslint-plugin-cypress": "3.6.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jest": "28.9.0",
Expand Down
2 changes: 1 addition & 1 deletion applications/accounts/client/src/components/ClientForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface IClientFormProps {
companyId?: string;
initialValues?: FormSchema;
loading: boolean;
onSave(value: FormSchema): void;
onSave: (value: FormSchema) => void;
}

function ClientForm({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface ICompanyFormProps {
backTo: string;
initialValues: FormSchema;
loading: boolean;
onSave(value: FormSchema): void;
onSave: (value: FormSchema) => void;
}

function CompanyForm({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export type FormSchema = typeof formSchema;
export interface ICompanyWizardProps {
backTo: string;
loading: boolean;
onSave(value: FormSchema): void;
onSave: (value: FormSchema) => void;
}

function CompanyWizard({ backTo, loading, onSave }: ICompanyWizardProps) {
Expand Down
4 changes: 2 additions & 2 deletions applications/accounts/client/src/components/ConfirmDelete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export type FormSchema = typeof formSchema;
export interface IConfirmDeleteProps {
loading: boolean;
name: string;
onCancel(): void;
onDelete(input: FormSchema): void;
onCancel: () => void;
onDelete: (input: FormSchema) => void;
}

function ConfirmDelete({
Expand Down
4 changes: 2 additions & 2 deletions applications/accounts/client/src/components/DeleteItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export interface IDeleteItemProps {
name: string;
title: string;
warning: string;
onDelete(): void;
onDismiss(): void;
onDelete: () => void;
onDismiss: () => void;
}

function DeleteItem({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect } from 'react';

export interface IFileDownload {
loading: boolean;
onDownload(): Promise<void>;
onDownload: () => Promise<void>;
}

function FileDownload({ loading, onDownload }: IFileDownload) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface ISettingsFormProps {
backTo: string;
initialValues: FormSchema;
loading: boolean;
onSave(value: FormSchema): void;
onSave: (value: FormSchema) => void;
}

function SettingsForm({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export interface ITransactionForm {
suppliers?: string[] | null;
uploader: ReactNode;
vat: number;
onSave(value: FormSchema): void;
onSave: (value: FormSchema) => void;
}

interface IFormValues extends FormSchema {
Expand Down
2 changes: 1 addition & 1 deletion applications/accounts/client/src/components/UserBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface IUserBarProps {
name: string;
notifications: ReactNode;
picture?: string;
logOut(): void;
logOut: () => void;
}

function UserBar({ logOut, name, notifications, picture }: IUserBarProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const REQUEST_DOWNLOAD = gql(/* GraphQL */ `
export interface IDeleteTransactionProps {
id: string;
path: string;
onDelete(name: string): void;
onDelete: (name: string) => void;
}

function DeleteTransaction({ id, onDelete, path }: IDeleteTransactionProps) {
Expand Down
8 changes: 4 additions & 4 deletions applications/accounts/data-restore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
"@motech-development/eslint-config-motech-base": "workspace:*",
"@motech-development/prettier-motech-config": "workspace:*",
"@motech-development/semantic-release": "workspace:*",
"@stylistic/eslint-plugin": "2.9.0",
"@swc/core": "1.10.4",
"@swc/helpers": "0.5.15",
"@swc/jest": "0.2.37",
"@types/aws-lambda": "8.10.147",
"@types/jest": "29.5.14",
"@typescript-eslint/eslint-plugin": "6.2.1",
"@typescript-eslint/parser": "6.2.1",
"@typescript-eslint/eslint-plugin": "8.8.1",
"@typescript-eslint/parser": "8.8.1",
"aws-cdk": "2.174.0",
"aws-lambda-mock-context": "3.2.1",
"aws-sdk-client-mock": "4.1.0",
"aws-sdk-client-mock-jest": "4.1.0",
"esbuild": "0.24.2",
"eslint": "8.57.1",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-prettier": "10.0.1",
"eslint-import-resolver-node": "0.3.9",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jest": "28.9.0",
Expand Down
9 changes: 5 additions & 4 deletions applications/accounts/data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,25 @@
"uuid": "9.0.1"
},
"devDependencies": {
"@kesills/eslint-config-airbnb-typescript": "20.0.0",
"@motech-development/eslint-config-motech-base": "workspace:*",
"@motech-development/prettier-motech-config": "workspace:*",
"@motech-development/semantic-release": "workspace:*",
"@stylistic/eslint-plugin": "2.9.0",
"@swc/core": "1.10.4",
"@swc/jest": "0.2.37",
"@types/aws-lambda": "8.10.147",
"@types/jest": "29.5.14",
"@types/luxon": "3.4.2",
"@types/uuid": "9.0.8",
"@typescript-eslint/eslint-plugin": "6.2.1",
"@typescript-eslint/parser": "6.2.1",
"@typescript-eslint/eslint-plugin": "8.8.1",
"@typescript-eslint/parser": "8.8.1",
"aws-lambda-mock-context": "3.2.1",
"aws-sdk-client-mock": "4.1.0",
"aws-sdk-client-mock-jest": "4.1.0",
"eslint": "8.57.1",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-prettier": "10.0.1",
"eslint-import-resolver-node": "0.3.9",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jest": "28.9.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ describe('confirm-transactions', () => {
clear();
});

it('should return update with the correct params', () => {
confirmTransactions(documentClient, tableName, records);
it('should return update with the correct params', async () => {
await Promise.all(confirmTransactions(documentClient, tableName, records));

expect(ddb).toReceiveCommandWith(UpdateCommand, {
ExpressionAttributeNames: {
Expand All @@ -106,8 +106,8 @@ describe('confirm-transactions', () => {
});
});

it('should create notification', () => {
confirmTransactions(documentClient, tableName, records);
it('should create notification', async () => {
await Promise.all(confirmTransactions(documentClient, tableName, records));

expect(ddb).toReceiveCommandWith(UpdateCommand, {
ExpressionAttributeNames: {
Expand All @@ -134,8 +134,8 @@ describe('confirm-transactions', () => {
});
});

it('should call update the correct number of times', () => {
confirmTransactions(documentClient, tableName, records);
it('should call update the correct number of times', async () => {
await Promise.all(confirmTransactions(documentClient, tableName, records));

expect(ddb).toReceiveCommandTimes(UpdateCommand, 2);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,10 @@ describe('insert-scheduled-transactions', () => {
clear();
});

it('should return update with the correct params', () => {
insertScheduledTransactions(documentClient, tableName, records);
it('should return update with the correct params', async () => {
await Promise.all(
insertScheduledTransactions(documentClient, tableName, records),
);

expect(ddb).toReceiveCommandWith(UpdateCommand, {
ExpressionAttributeNames: {
Expand Down Expand Up @@ -370,8 +372,10 @@ describe('insert-scheduled-transactions', () => {
});
});

it('should call update the correct number of times', () => {
insertScheduledTransactions(documentClient, tableName, records);
it('should call update the correct number of times', async () => {
await Promise.all(
insertScheduledTransactions(documentClient, tableName, records),
);

expect(ddb).toReceiveCommandTimes(UpdateCommand, 2);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ describe('insert-transactions', () => {
clear();
});

it('should return update with the correct params', () => {
insertTransactions(documentClient, tableName, records);
it('should return update with the correct params', async () => {
await Promise.all(insertTransactions(documentClient, tableName, records));

expect(ddb).toReceiveCommandWith(UpdateCommand, {
ExpressionAttributeNames: {
Expand Down Expand Up @@ -307,8 +307,8 @@ describe('insert-transactions', () => {
});
});

it('should call update the correct number of times', () => {
insertTransactions(documentClient, tableName, records);
it('should call update the correct number of times', async () => {
await Promise.all(insertTransactions(documentClient, tableName, records));

expect(ddb).toReceiveCommandTimes(UpdateCommand, 3);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ describe('insert-typeahead', () => {
clear();
});

it('should return update with the correct params', () => {
insertTypeahead(documentClient, tableName, records);
it('should return update with the correct params', async () => {
await Promise.all(insertTypeahead(documentClient, tableName, records));

expect(ddb).toReceiveCommandWith(UpdateCommand, {
ExpressionAttributeNames: {
Expand Down Expand Up @@ -414,8 +414,8 @@ describe('insert-typeahead', () => {
});
});

it('should call update the correct number of times', () => {
insertTypeahead(documentClient, tableName, records);
it('should call update the correct number of times', async () => {
await Promise.all(insertTypeahead(documentClient, tableName, records));

expect(ddb).toReceiveCommandTimes(UpdateCommand, 4);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,10 @@ describe('remove-scheduled-transactions', () => {
clear();
});

it('should return update with the correct params', () => {
removeScheduledTransactions(documentClient, tableName, records);
it('should return update with the correct params', async () => {
await Promise.all(
removeScheduledTransactions(documentClient, tableName, records),
);

expect(ddb).toReceiveCommandWith(UpdateCommand, {
ConditionExpression: 'attribute_exists(id)',
Expand Down Expand Up @@ -356,8 +358,10 @@ describe('remove-scheduled-transactions', () => {
});
});

it('should call update the correct number of times', () => {
removeScheduledTransactions(documentClient, tableName, records);
it('should call update the correct number of times', async () => {
await Promise.all(
removeScheduledTransactions(documentClient, tableName, records),
);

expect(ddb).toReceiveCommandTimes(UpdateCommand, 2);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ describe('remove-transactions', () => {
clear();
});

it('should return update with the correct params', () => {
removeTransactions(documentClient, tableName, records);
it('should return update with the correct params', async () => {
await Promise.all(removeTransactions(documentClient, tableName, records));

expect(ddb).toReceiveCommandWith(UpdateCommand, {
ExpressionAttributeNames: {
Expand Down Expand Up @@ -307,8 +307,8 @@ describe('remove-transactions', () => {
});
});

it('should call update the correct number of times', () => {
removeTransactions(documentClient, tableName, records);
it('should call update the correct number of times', async () => {
await Promise.all(removeTransactions(documentClient, tableName, records));

expect(ddb).toReceiveCommandTimes(UpdateCommand, 3);
});
Expand Down
Loading
Loading