Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RohinBhargava committed Dec 20, 2024
1 parent c045a5f commit e80d2fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions packages/parsers/src/__test__/createSnapshots.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,13 @@ describe("OpenAPI snapshot tests", () => {

// Create snapshot
if (errors.length > 0) {
// eslint-disable-next-line no-console
console.error("errors:", errors);
}
// expect(errors).toHaveLength(0);
if (warnings.length > 0) {
// eslint-disable-next-line no-console
// console.warn("warnings:", warnings);
console.warn("warnings:", warnings);
}
// @ts-expect-error id is not part of the expected output

converted.id = "test-uuid-replacement";
await expect(
replaceEndpointUUIDs(JSON.stringify(converted, null, 2))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class ResponsesObjectConverterNode extends BaseOpenApiV3_1ConverterNode<
}

parse(): void {
const defaultResponse = this.input["default"];
const defaultResponse = this.input.default;
Object.entries(this.input).forEach(([statusCode, response]) => {
if (parseInt(statusCode) >= 400) {
this.errorsByStatusCode ??= {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export abstract class BaseOpenApiV3_1ConverterNode<
safeParse(...additionalArgs: unknown[]): void {
try {
this.parse(...additionalArgs);
} catch (error: Error | unknown) {
} catch {
this.context.errors.error({
message:
"Error converting node. Please contact support if the error persists",
Expand Down

0 comments on commit e80d2fd

Please sign in to comment.