Skip to content

Conversation

@johnsimons
Copy link
Member

@johnsimons johnsimons commented Feb 5, 2024

This is the first PR to enable TypeScript.

This PR pretty much just adds all the TypeScript packages, reconfigures vite and adds a few extra rules to eslint as warnings.

@johnsimons johnsimons self-assigned this Feb 5, 2024
Copy link
Member Author

Choose a reason for hiding this comment

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

File renamed to cjs, so it can work as a module

Copy link
Member Author

Choose a reason for hiding this comment

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

required by new version of vite

Copy link
Member Author

Choose a reason for hiding this comment

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

This is so that when we access windows.defaultConfig.* in TypeScript files, TypeScript does not complain about not knowing what are you talking about 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

prettier doing its work here

Copy link
Member Author

Choose a reason for hiding this comment

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

I though it was a good idea to at least enable this vue to make sure it is all working

Copy link
Member Author

Choose a reason for hiding this comment

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

TypeScript was not super happy about this file so I converted it to ts

return;
}

var me = this;
Copy link
Member Author

Choose a reason for hiding this comment

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

This is what TS was complaining about.

@@ -1,5 +1,5 @@
import { reactive, onMounted, watch, computed } from "vue";
import { useIsSupported, useIsUpgradeAvailable } from "./serviceSemVer.js";
import { useIsSupported, useIsUpgradeAvailable } from "./serviceSemVer";
Copy link
Member Author

Choose a reason for hiding this comment

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

Next PR, I'll remove all the extensions from imports, they are not required

Copy link
Member Author

Choose a reason for hiding this comment

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

Another file migrated to ts, very simple one, mostly done because the extra definitions, to ensure they are working

@johnsimons johnsimons marked this pull request as ready for review February 5, 2024 06:15
@johnsimons johnsimons force-pushed the john/starship branch 2 times, most recently from 82ebb41 to 70073e0 Compare February 5, 2024 06:25
Copy link
Contributor

@PhilBastian PhilBastian left a comment

Choose a reason for hiding this comment

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

some questions but otherwise approved

@johnsimons johnsimons merged commit 7c15e89 into master Feb 6, 2024
@johnsimons johnsimons deleted the john/starship branch February 6, 2024 01:25
@mikeminutillo mikeminutillo added the Type: Refactoring Type: Refactoring label Feb 7, 2024
@mikeminutillo mikeminutillo added this to the vNext milestone Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Refactoring Type: Refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants