-
Notifications
You must be signed in to change notification settings - Fork 8
API Generator: Improve performance by not formatting generated files with ESLint anymore #3789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… eslint anymore When scaffolding run eslint as first step. This switches eslint to TypeScript Compiler Api printer, which is very limited but very fast
…don't generate duplicated imports
ac16343
to
1ff9c58
Compare
in demo this close suddenly took 1 minute (did not before). And as we don't open a connection to a real database I don't see any need for a close, especially as the script exits anyway right after the close.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your plan for the generated files? Should we remove them from Git?
yes, we could do that - the initial reason why we added them is gone. But: we would loose the diff for the generated code, I'm really not sure what is best. |
Should we invest some effort to fix formatting (e.g., order imports)? |
Imho it is fine like that. Not perfect, but good enough. |
packages/api/api-generator/src/commands/generate/utils/write-generated-file.ts
Outdated
Show resolved
Hide resolved
packages/api/api-generator/src/commands/generate/utils/__tests__/remove-unused-imports.spec.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Johannes Obermair <[email protected]>
Co-authored-by: Johannes Obermair <[email protected]>
This switches eslint to TypeScript Compiler Api printer, which is very limited but very fast
Runtime in my machine is now 10s for demo
When scaffolding run eslint as first step.