AalianKhan / mushroom-strategy

A strategy to automatically generate a dashboard using mushroom cards
MIT License
364 stars 36 forks source link

Refactor JavaScript to TypeScript #81

Closed DigiLive closed 8 months ago

DigiLive commented 9 months ago

I've refactored the JavaScript files to TypeScript.

TypeScript is JavaScript with syntax for types and also used by Home Assistant. It allows developers to precisely define the expected shape of objects and function parameters, resulting in code that's easier to understand and maintain.

Please test this code very carefully, so we're sure it matches the JavaScript version.

AalianKhan commented 9 months ago

All of the other options use snake case, ex card_options. I would prefer if homeView would be changed to home_view.

DigiLive commented 9 months ago

@AalianKhan Since merging this PR into main is too complex, I'll have to alter the branches locally. This will probably change the history of the main branch.

If so, I'll need to force push my local main branch to origin. Do you have any protection rules set which will prevent me from doing so?

[!WARNING] If I change the history of the main branch, all current PRs must refetch this branch and possibly rebase their feature branch onto main.

AalianKhan commented 9 months ago

I don't believe so. I have squashed and merged before without any issue. Maybe you are a collaborator so something might come up. If so I can go ahead and merge it.