Skip to content

Commit a677c63

Browse files
committed
chore: more lint issues
1 parent 264320f commit a677c63

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

packages/event-handler/tests/unit/rest/Router/basic-routing.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,9 @@ describe('Class: Router - Basic Routing', () => {
153153
await next();
154154
});
155155
todoRouter.get('/', async () => ({ api: 'listTodos' }));
156-
todoRouter.notFound(async () => {
157-
return {
158-
error: 'Route not found',
159-
};
160-
});
156+
todoRouter.notFound(async () => ({
157+
error: 'Route not found',
158+
}));
161159
const consoleLogSpy = vi.spyOn(console, 'log');
162160
const consoleWarnSpy = vi.spyOn(console, 'warn');
163161

packages/idempotency/tests/unit/idempotencyDecorator.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { BasePersistenceLayer } from '../../src/persistence/BasePersistenceLayer
77
import { PersistenceLayerTestClass } from '../helpers/idempotencyUtils.js';
88

99
describe('Given a class with a function to decorate', () => {
10-
it('maintains the scope of the decorated function', async () => {
10+
it('maintains the scope of the decorated function', () => {
1111
// Prepare
1212
class TestClass implements LambdaInterface {
1313
private readonly foo = 'foo';
@@ -28,13 +28,13 @@ describe('Given a class with a function to decorate', () => {
2828
const handler = handlerClass.handler.bind(handlerClass);
2929

3030
// Act
31-
const result = await handler({}, context);
31+
const result = handler({}, context);
3232

3333
// Assess
3434
expect(result).toBe('private foo');
3535
});
3636

37-
it('passes the custom keyPrefix to the persistenceStore', async () => {
37+
it('passes the custom keyPrefix to the persistenceStore', () => {
3838
// Prepare
3939
const configureSpy = vi.spyOn(BasePersistenceLayer.prototype, 'configure');
4040
const idempotencyConfig = new IdempotencyConfig({});
@@ -54,7 +54,7 @@ describe('Given a class with a function to decorate', () => {
5454
const handler = handlerClass.handler.bind(handlerClass);
5555

5656
// Act
57-
const result = await handler({}, context);
57+
const result = handler({}, context);
5858

5959
// Assess
6060
expect(result).toBeTruthy();

packages/parameters/src/ssm/SSMProvider.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,7 @@ class SSMProvider extends BaseProvider {
671671
let errors: string[] = [];
672672

673673
// Fetch each possible batch param from cache and return if entire batch is cached
674-
const { cached, toFetch } =
675-
await this.getParametersByNameFromCache(parameters);
674+
const { cached, toFetch } = this.getParametersByNameFromCache(parameters);
676675
if (Object.keys(cached).length >= Object.keys(parameters).length) {
677676
response = cached;
678677

packages/tracer/tests/unit/Tracer.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,6 @@ describe('Class: Tracer', () => {
12881288
@tracer.captureMethod()
12891289
public async dummyMethod(): Promise<void> {
12901290
await setTimeout(0); // Simulate some async operation
1291-
return;
12921291
}
12931292

12941293
public async handler(
@@ -1297,12 +1296,10 @@ describe('Class: Tracer', () => {
12971296
): Promise<void> {
12981297
await this.dummyMethod();
12991298
this.otherDummyMethod();
1300-
1301-
return;
13021299
}
13031300

1304-
public otherDummyMethod(): void {
1305-
return;
1301+
public otherDummyMethod(): boolean {
1302+
return false;
13061303
}
13071304
}
13081305

0 commit comments

Comments
 (0)