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: minor improvements #316

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

castarco
Copy link
Contributor

@castarco castarco commented Sep 19, 2024

I acknowledge that this project is in maintenance mode, but I think it could still benefit from some minor improvements:

  • Use const instead of let when possible.

    • It makes the code more easy to read, plus it can help to avoid potential future bugs.
    • Although it can worsen performance for one-time executions, it does the opposite for code that executes a sufficient number of times (which is likely when working on large projects).
  • Use node:* imports instead of "unqualified" imports for intrinsic modules.

    • They have been supported since Node v14.18, which is already marked as not supported.
    • These imports can help to avoid potential module naming conflicts and the associated risks.
  • Mark types imports as such (available since TS v3.8)

  • Use "normal" strings instead of interpolated strings when no variables are interpolated.

  • Use === comparisons where it makes sense (instead of ==)

  • Minor fixes on some return types

Signed-off-by: Andres Correa Casablanca <[email protected]>
@Swatinem Swatinem merged commit fa093f2 into Swatinem:master Sep 19, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants