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

refactor(yaml): prepare for noUncheckedIndexedAccess #4457

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

gabelluardo
Copy link
Contributor

Ref: #4040

@gabelluardo gabelluardo requested a review from kt3k as a code owner March 9, 2024 00:53
@github-actions github-actions bot added the yaml label Mar 9, 2024
Copy link
Collaborator

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please justify non-trivial non-null assertions? No comment is needed for trivial ones.

Also, I think we can omit some non-null assertions within loops by instead changing the loop conditions.

Sidenote: looking through this module makes me realise how much room for improvement there is.

yaml/_dumper/dumper.ts Outdated Show resolved Hide resolved
yaml/_dumper/dumper.ts Outdated Show resolved Hide resolved
yaml/_dumper/dumper.ts Outdated Show resolved Hide resolved
yaml/_dumper/dumper.ts Outdated Show resolved Hide resolved
yaml/_dumper/dumper.ts Outdated Show resolved Hide resolved
yaml/_dumper/dumper.ts Outdated Show resolved Hide resolved
yaml/_dumper/dumper_state.ts Outdated Show resolved Hide resolved
yaml/_type/timestamp.ts Outdated Show resolved Hide resolved
@gabelluardo
Copy link
Contributor Author

I refactored a bit the for-loops to improve readability, removing some let variables that can be const

yaml/_dumper/dumper.ts Show resolved Hide resolved
Copy link
Collaborator

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore my previous request for changes. LGTM! Thank you.

@iuioiua iuioiua merged commit de23a76 into denoland:main Mar 11, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants