You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
I have a custom AWS CDK Construct that extends a class and implements another.
Rome is incorrectly telling me that I'm calling super() in a loop.
Here is an example that fails Rome's lint/correctness/noUnreachableSuper lint rule
export class S3Event extends Construct implements EventBridgeEvent {
public readonly bucketNames?: string[];
public readonly keyPrefixes?: string[];
public readonly eventType?: string[];
public readonly targetProps: {
message: RuleTargetInput;
};
public readonly eventPattern: KeyedRequired<EventPattern, 'source'>;
/**
*
* @param scope The stack from which you are instantiating a MonitoredQueue
* @param name A name for the event
*/
constructor(scope: Stack, name: string, options: S3EventOptions) {
super(scope, name);
this.bucketNames = options.bucketNames;
this.keyPrefixes = options.keyPrefixes;
this.eventType = options.eventType;
// We don't want _all_ the fields, but we do at least the detail-type in
// addition the event details itself, as it contains the S3 event-type.
this.targetProps = {
message: RuleTargetInput.fromObject({
s3Event: EventField.fromPath('$.detail'),
s3EventType: EventField.detailType,
}),
};
// See supported event patterns: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html
const details: S3DetailPattern = {};
if (this.bucketNames) {
details.bucket = { name: this.bucketNames };
}
if (this.keyPrefixes) {
const rules = this.keyPrefixes.map((p) => ({
prefix: p,
}));
details.object = { key: rules };
}
this.eventPattern = {
source: ['aws.s3'],
detailType: this.eventType,
detail: Object.keys(details).length === 0 ? undefined : details,
};
}
}
Expected result
It should not give me a lint error
Code of Conduct
I agree to follow Rome's Code of Conduct
The text was updated successfully, but these errors were encountered:
Environment information
Running
rome rage
reveals some sensitive information. Instead, I'll share some system and environment information.arch: arm64
Node version:
16.18.0
Rome version:
12.1.3
Rome.json:
I also have Rome's VSCode extension installed.
What happened?
I have a custom AWS CDK Construct that extends a class and implements another.
Rome is incorrectly telling me that I'm calling
super()
in a loop.Here is an example that fails Rome's
lint/correctness/noUnreachableSuper
lint ruleExpected result
It should not give me a lint error
Code of Conduct
The text was updated successfully, but these errors were encountered: