Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Describe what this PR changes and why.
- [ ] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Code improvement / refactoring
- [ ] Other (please describe)

## Breaking change
- [ ] Yes
Expand All @@ -15,4 +17,3 @@ Describe what this PR changes and why.
- [ ] Unit tests added/updated
- [ ] E2E tests added/updated (if applicable)
- [ ] Documentation updated if needed
- [ ] Build and tests pass locally
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check formatting
name: Check code

on:
pull_request:
Expand All @@ -14,8 +14,8 @@ concurrency:
cancel-in-progress: true

jobs:
prettier:
name: check formatting
check:
name: check prettier and eslint
runs-on: ubuntu-latest

steps:
Expand All @@ -35,3 +35,6 @@ jobs:

- name: Check formatting
run: yarn format:check

- name: Check linting
run: yarn lint
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export default tseslint.config(
sourceType: 'module',
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
Expand Down
2 changes: 1 addition & 1 deletion packages/messaging/src/consumer/consumer-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export class ConsumerMessage {
constructor(
public readonly message: object | string,
public readonly routingKey: string,
public readonly metadata: {} = {},
public readonly metadata: Record<string, any> = {},
) {
this.message = message;
this.routingKey = routingKey;
Expand Down
14 changes: 7 additions & 7 deletions packages/messaging/src/dependency-injection/decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,37 @@ export const MESSAGING_EXCEPTION_LISTENER_METADATA =
export const MESSAGING_MESSAGE_METADATA = 'MESSAGING_MESSAGE_METADATA';

export const MessageHandler = (...routingKey: string[]): ClassDecorator => {
return (target: Function) => {
return (target) => {
Reflect.defineMetadata(MESSAGE_HANDLER_METADATA, routingKey, target);
};
};

export const ChannelFactory = (
channelConfig: ChannelConfig,
): ClassDecorator => {
return (target: Function) => {
return (target) => {
Reflect.defineMetadata(CHANNEL_FACTORY_METADATA, channelConfig, target);
};
};

export const MessageBusFactory = (channel: any): ClassDecorator => {
classValidator(channel, 'Channel');

return (target: Function) => {
return (target) => {
Reflect.defineMetadata(MESSAGE_BUS_FACTORY_METADATA, channel, target);
};
};

export const MessageConsumer = (channel: any): ClassDecorator => {
classValidator(channel, 'Channel');

return (target: Function) => {
return (target) => {
Reflect.defineMetadata(MESSAGE_CONSUMER_METADATA, channel, target);
};
};

export const MessagingMiddleware = (name?: string): ClassDecorator => {
return (target: Function) => {
return (target) => {
Reflect.defineMetadata(
MESSAGING_MIDDLEWARE_METADATA,
name ?? target.name,
Expand All @@ -51,7 +51,7 @@ export const MessagingMiddleware = (name?: string): ClassDecorator => {
};

export const MessagingNormalizer = (name?: string): ClassDecorator => {
return (target: Function) => {
return (target) => {
Reflect.defineMetadata(
MESSAGING_NORMALIZER_METADATA,
name ?? target.name,
Expand All @@ -61,7 +61,7 @@ export const MessagingNormalizer = (name?: string): ClassDecorator => {
};

export const MessagingExceptionListener = (): ClassDecorator => {
return (target: Function) => {
return (target) => {
Reflect.defineMetadata(
MESSAGING_EXCEPTION_LISTENER_METADATA,
target.name,
Expand Down
Loading