Skip to content

Commit

Permalink
Merge pull request #375 from hey-api/fix/eslint-not-fixing-output
Browse files Browse the repository at this point in the history
fix: eslint properly fixes output
  • Loading branch information
jordanshatford authored Apr 12, 2024
2 parents 26a8914 + 1923028 commit 5d500bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-cobras-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hey-api/openapi-ts": patch
---

fix: eslint properly fixes output
8 changes: 3 additions & 5 deletions packages/openapi-ts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ const processOutput = (dependencies: Dependencies) => {
}
}

if (config.lint) {
if (dependencies.eslint) {
console.log('✨ Running ESLint');
sync('eslint', [config.output, '--fix', '--quiet', '--ignore-path', './.eslintignore']);
}
if (config.lint && dependencies.eslint) {
console.log('✨ Running ESLint');
sync('eslint', [config.output, '--fix']);
}
};

Expand Down

0 comments on commit 5d500bf

Please sign in to comment.