Skip to content

Conversation

@alexander-akait
Copy link
Member

Summary

Refactor core:

  1. Using node: prefix for NodeJS modules (good practice, compatibility with deno/bun/other env)
  2. Adding js/jsx extensions for import (good practice, less time for resolving in any tools, nodejs/typescript/react/etc strongly recommend to use extensions in imports)
  3. Order import(s)/require(s) by alphabet for better readable
  4. Use for of instead forEach (for of is faster)
  5. Use hasOwn built-in ES6 feature
  6. Use template literal
  7. Use module.exports at the bottom of files for readable
  8. Use better names for one characters variables
  9. Use catch without _err where we don't need it
  10. Avoid else where it unnecessary
  11. Use { for multi-line if
  12. Simplify code in some places - use arrow functions, use ternary, use new logic operators

What kind of change does this PR introduce?

refactor

Did you add tests for your changes?

Existing

Does this PR introduce a breaking change?

No

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Nothing

@alexander-akait
Copy link
Member Author

@valscion Ready for review

It is a part of refactor tasks and many changes done to avoid big diff after migration to eslint-config-webpack

Copy link
Member

@valscion valscion left a comment

Choose a reason for hiding this comment

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

Phew that was a lot of code changes to read but I did read all of that.

Only found one nitpick. Let's fix it and then we can merge

src/utils.js Outdated
/**
* @desc get string of current time
* format: dd/MMM HH:mm
* */
Copy link
Member

Choose a reason for hiding this comment

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

JSdoc now in wrong location

@alexander-akait
Copy link
Member Author

@valscion Done 👍

@valscion valscion merged commit 1c23a2a into main Jan 30, 2026
5 checks passed
@valscion valscion deleted the refactor-more-es6-code branch January 30, 2026 10:58
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