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(utils): clean up semicolons and improve ternary operations #1602

Closed
wants to merge 1 commit into from

Conversation

MisTraleuh
Copy link

@MisTraleuh MisTraleuh commented Aug 20, 2024

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Provide a description in this PR that addresses what the PR is solving. If this PR is going to solve an existing issue, please reference the issue (e.g. close #123).

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Documentation update
  • Other

Description

This PR refactors several parts of the packages/utils/src/ directory to improve code readability and maintainability. Specifically:

  • Added semicolons.
  • Refactored ternary operations to make the logic clearer and more concise.

These changes aim to enhance the overall code quality without altering the functionality.

Screenshots

Not applicable, as this PR does not introduce any UI changes.

@Mister-Hope
Copy link
Member

We had our own team config, and I will show you why this is not acceptable by running the ci.

Basically, only the first function change is a bit useful, for the second one, I did not see why creating a after variable and using it immediately make any sense to improve "quality", the result of current timestamp minus a previous one is obvious.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10474002058

Details

  • 21 of 21 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.03%) to 38.536%

Totals Coverage Status
Change from base Build 10471817085: -0.03%
Covered Lines: 634
Relevant Lines: 1670

💛 - Coveralls

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.

3 participants