teamcodeyard/moleculer-i18n

Implement typescript support

Closed this issue · 2 comments

Add typescript alternative with builder tsup and replace jest with vitest.

Another additions:

  • add Devcontainer support with preconfigured VS Code settings and extensions,
  • add GitHub workflows, one for releasing and on for checking every commits on pushing to main and pull request branches,
  • add pnpm support,
  • add eslint and preconfigured settings.

If you are not using Devcontainer please copy settings and install extension from. Otherwise just open folder in Devcontainer and enjoy. 🤫 you can use GitHub Codespace with it.

How to use workflows?

The CI workflow runs after each commit on main and pull request branches.
The Release workflow runs only if tag is coming with the last commit.

How to use release script?

Use npm release - nr release or pnpm release -, select next version and confirm. After push has done, the release workflow will start and write into the release notes - check bumpp for more.

Is Vitest better than Jest?

"yes, or I don't know"

Do we need Typescript for this particular module?

TL;DR: NO

But it is more strict and you can see the difficulties behind or with using action names - you need to memorize them, maybe. We can check types, strictly; we can build javascript code easily from it and beside that we made type definitions too.

Is ESLint necessary or this configuration is the best one?

Of course not. But we are human and we make mistakes.