Skip to content

Commit 077c75f

Browse files
committed
style(batch): apply stricter linting
1 parent e2c96c6 commit 077c75f

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

packages/batch/src/BasePartialProcessor.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,7 @@ abstract class BasePartialProcessor {
239239
/**
240240
* Processes records in parallel using `Promise.all`.
241241
*/
242-
async #processRecordsInParallel(): Promise<
243-
(SuccessResponse | FailureResponse)[]
244-
> {
242+
#processRecordsInParallel(): Promise<(SuccessResponse | FailureResponse)[]> {
245243
return Promise.all(
246244
this.records.map((record) => this.processRecord(record))
247245
);

packages/batch/src/BatchProcessorSync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ import type { BaseRecord, FailureResponse, SuccessResponse } from './types.js';
8888
*
8989
* @param _record The record to be processed
9090
*/
91-
public async processRecord(
91+
public processRecord(
9292
_record: BaseRecord
9393
): Promise<SuccessResponse | FailureResponse> {
9494
throw new BatchProcessingError('Not implemented. Use process() instead.');

packages/batch/tests/helpers/handlers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const dynamodbRecordHandler = (record: DynamoDBRecord): object => {
3939
return body;
4040
};
4141

42-
const asyncDynamodbRecordHandler = async (
42+
const asyncDynamodbRecordHandler = (
4343
record: DynamoDBRecord
4444
): Promise<object> => {
4545
return Promise.resolve(dynamodbRecordHandler(record));
@@ -57,7 +57,7 @@ const handlerWithContext = (record: SQSRecord, context: Context): string => {
5757
return record.body;
5858
};
5959

60-
const asyncHandlerWithContext = async (
60+
const asyncHandlerWithContext = (
6161
record: SQSRecord,
6262
context: Context
6363
): Promise<string> => {

packages/batch/tests/unit/BasePartialProcessor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('Class: BasePartialBatchProcessor', () => {
2525
super(EventType.SQS);
2626
}
2727

28-
public async processRecord(
28+
public processRecord(
2929
_record: BaseRecord
3030
): Promise<SuccessResponse | FailureResponse> {
3131
throw new Error('Not implemented');

packages/batch/tests/unit/SqsFifoPartialProcessor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ describe('SQS FIFO Processors', () => {
186186
});
187187
}
188188

189-
it('continues processing and moves to the next group when `skipGroupOnError` is true', async () => {
189+
it('continues processing and moves to the next group when `skipGroupOnError` is true', () => {
190190
// Prepare
191191
const firstRecord = sqsRecordFactory('fail', '1');
192192
const secondRecord = sqsRecordFactory('success', '2');

packages/batch/tests/unit/processPartialResponse.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('Function: processPartialResponse()', () => {
3636
context,
3737
};
3838

39-
const handlerWithSqsEvent = async (
39+
const handlerWithSqsEvent = (
4040
event: SQSEvent,
4141
options: BatchProcessingOptions
4242
) => {
@@ -51,7 +51,7 @@ describe('Function: processPartialResponse()', () => {
5151
return handler(event, context);
5252
};
5353

54-
const handlerWithKinesisEvent = async (
54+
const handlerWithKinesisEvent = (
5555
event: KinesisStreamEvent,
5656
options: BatchProcessingOptions
5757
) => {
@@ -71,7 +71,7 @@ describe('Function: processPartialResponse()', () => {
7171
return handler(event, context);
7272
};
7373

74-
const handlerWithDynamoDBEvent = async (
74+
const handlerWithDynamoDBEvent = (
7575
event: DynamoDBStreamEvent,
7676
options: BatchProcessingOptions
7777
) => {

0 commit comments

Comments
 (0)