Migrate codebase to TypeScript

Closed Massimeddu Cireddu requested to merge typescript into main

Hi @fatihacet

I think this MR is ready to be reviewed. As you can see it is a major rewrite of the extension, so I'd like to have your feedback about it.

I want to outline that the structure of the extension is basically the same. This rewrite enable us to better check for types of variables and prevent us to use null or undefined variables. I think this will enable us (and new contributors) to add additional features to the extension with much more confidence.

The code is a little more verbose with more checks to ensure variables are not null etc. but I think it's totally worth to have a safer codebase and reduce runtime errors.

I've migrated both extension and webview Vue components to typescript, and that enabled me to share some code (like the type definitions) between those 2 parts.

Some additional notes:

  • I've moved console.logs debug message to VSCode OutputChannel (#145 (closed))
  • I've updated ESLint configuration so now we follow also @gitlab ESLint rules.
  • I've updated .vscodeignore to exclude unneeded files. The package size of the extension decreased by about 4MB.

Please let me know what do you think about.

Thank you

Closes #204 (closed)

Edited by Tomas Vik