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

Features/migrate to ES6 syntax #943

Open
wants to merge 172 commits into
base: dev
Choose a base branch
from

Conversation

lukasz1mroz
Copy link
Contributor

Description

This PR contains the syntax changes for the codebase. For better efficiency it has been supported with Github Copilot with avoidance of changes in code logic or potentially dangerous changes (! vs undefined, for... of / forEach). Since this PR is rather vast, I've listed the changes below.

The changes include:

  • Changing module system to ES modules (import / export syntax with aliases and default export wherever possible).
  • Implementing default node subpath import system which required changes in package.json (paths starting with #) and jsconfig.json (for VS Code intelli-sense support, more here. The changes has been done as the module-alias doesn't seem to work well with ES modules - more here.
  • Changing existing functions to ES6 arrow functions syntax.
  • Introducing ES6 template literals syntax.
  • Shortening property assignments and dot properties.
  • Correct stylistic errors (letter cases, semicolons, spacing).

Related Issues

#427

Steps to Test

Since changes relate to syntax, the testing methodology was UAT (checking the functionality from user perspective), checking VSCode intelli-sense and functioning of changed modules.

Checklist

  • I have tested these changes
  • I have updated the relevant documentation
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the codebase
  • My changes generate no new warnings or errors
  • The title of my pull request is clear and descriptive

@erfuuan
Copy link

erfuuan commented Feb 4, 2024

i can help

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