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

Updated syntax in utils.js with async/await #1145

Closed
wants to merge 4 commits into from

Conversation

moksha-hub
Copy link

Problem

The current codebase contains several ESLint errors, primarily due to improper spacing, unused variables, and improper usage of promises instead of async/await syntax. This leads to reduced readability and maintainability.
Ticket No: #[BB-797] Convert promises in src/api/helpers/utils.js

Solution

  1. Fixed spacing issues (e.g., object-curly-spacing, indentation inconsistencies).
  2. Removed unused variables (e.g., props, log, handler).
  3. Replaced promises with async/await syntax for improved readability and error handling.
  4. Ensured proper error handling in asynchronous code using try-catch blocks.
  5. Cleaned up ESLint warnings (e.g., removed TODO comments, ensured import spacing).

Areas of Impact

  1. src/api/helpers/utils.js - Fixed indentation, spacing, and async/await issues.
  2. src/client/components/pages/revision.js - Removed TODO comments.
  3. src/client/entity-editor/common/entity-search-field-option.js - Removed unused props.
  4. src/server/helpers/collectionRouteUtils.js - Removed unused log.
  5. src/server/routes/register.js - Removed unused handler.
  6. Other files impacted by global async/await migration and ESLint corrections.

These changes improve code quality and maintainability while adhering to ESLint standards.

@moksha-hub moksha-hub closed this Dec 18, 2024
@MonkeyDo
Copy link
Member

Hi @moksha-hub !
Just a quick one to let you know you can always rework an open pull request, it does not need to be perfect the first go :)

You can even rework entirely your commit history on your local machine and force-push to github to modify everything.

Meaning you won't have to open and close PRs, you can always modify open ones until you are happy with the result.

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