Skip to content

Commit c53f515

Browse files
authored
Merge pull request #2937 from FloEdelmann/patch-1
Swap order of format and lint processing
2 parents 4c72db6 + 4fac7d2 commit c53f515

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.changeset/clever-spies-confess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hey-api/openapi-ts": patch
3+
---
4+
5+
**output**: run lint before format

packages/openapi-ts/src/processOutput.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ const linters: Record<Linters, OutputProcessor> = {
5353
};
5454

5555
export const processOutput = ({ config }: { config: Config }) => {
56-
if (config.output.format) {
57-
const module = formatters[config.output.format];
56+
if (config.output.lint) {
57+
const module = linters[config.output.lint];
5858
console.log(`✨ Running ${module.name}`);
5959
sync(module.command, module.args(config.output.path));
6060
}
6161

62-
if (config.output.lint) {
63-
const module = linters[config.output.lint];
62+
if (config.output.format) {
63+
const module = formatters[config.output.format];
6464
console.log(`✨ Running ${module.name}`);
6565
sync(module.command, module.args(config.output.path));
6666
}

0 commit comments

Comments
 (0)