Skip to content
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

Improve typescript output #4505

Merged
merged 6 commits into from
Sep 27, 2023
Merged

Improve typescript output #4505

merged 6 commits into from
Sep 27, 2023

Conversation

klinkby
Copy link
Contributor

@klinkby klinkby commented Aug 31, 2023

Based on Sonar rules mentioned in commit descriptions PR improves the readability of Typescript generated from liquid templates.

Fixes #3552

@RicoSuter RicoSuter merged commit 9895d24 into RicoSuter:master Sep 27, 2023
1 check passed
lahma pushed a commit to lahma/NSwag that referenced this pull request Jan 20, 2024
* Declare variables with const

https://rules.sonarsource.com/javascript/RSPEC-3504/

* Unnecessary undefined optional property type

https://rules.sonarsource.com/typescript/RSPEC-4782/

* Prefer nullish coalescing operator to ternary

https://rules.sonarsource.com/typescript/RSPEC-6606/

* Prefer logical or operator to ternary

https://rules.sonarsource.com/typescript/RSPEC-6644/

* Remove redundant undefined

https://rules.sonarsource.com/typescript/RSPEC-6571/

* Remove redundant undefined from test

---------

Co-authored-by: Klinkby <m@kli.dk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NSwag Generated TypeScript Client Code reports many errors by ts compiler
2 participants