Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSaini101 committed Nov 19, 2024
1 parent dc7df95 commit 7a9f975
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions src/commands/pretty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ export default class Pretty extends Command {
let formatted: string;

try {
const yamlDoc = yaml.parseDocument(content);
const yamlDoc = yaml.parseDocument(content);

formatted = yamlDoc.toString({
lineWidth: 0,
});

formatted = yamlDoc.toString({
lineWidth: 0,
});
} catch (err) {
this.error(`Error formatting file: ${err}`);
}
Expand All @@ -58,4 +57,4 @@ export default class Pretty extends Command {
this.log(`Asyncapi document ${filePath} has been beautified in-place.`);
}
}
}
}
2 changes: 1 addition & 1 deletion src/core/flags/pretty.flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ export const prettyFlags = () => {
description: 'Output file path',
}),
};
};
};
4 changes: 2 additions & 2 deletions test/integration/pretty.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ describe('pretty', () => {
expect(ctx.stderr).to.equal('');
done();
});

})})
});
});

0 comments on commit 7a9f975

Please sign in to comment.