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

Add ES Lint, Typescript, Prettier and fix up all the files due to this change #2

Conversation

whanata
Copy link
Contributor

@whanata whanata commented Aug 3, 2019

Added ES Lint, Typescript and Prettier.

Fix up all the files with these rules.

@whanata
Copy link
Contributor Author

whanata commented Aug 3, 2019

I also ran yarn test and it works.

src/core/pokemon.model.ts Outdated Show resolved Hide resolved
src/objects/pokemon.object.ts Outdated Show resolved Hide resolved
@@ -78,6 +76,27 @@ export class PokemonObject extends Phaser.GameObjects.Sprite {
this.hpBar.setDepth(1);
}

getHPBarColor() {
Copy link
Owner

Choose a reason for hiding this comment

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

i feel like my ternary was perfectly understandable lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I still feels like its easier to read it if we have a separate function. Like at least we know what High HP, Low HP and Critical HP ranges are. The ternary made it a bit confusing IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also got lint issues with ternary inside a ternary hahaha.

src/objects/floating-text.object.ts Outdated Show resolved Hide resolved
@henry-alakazhang henry-alakazhang merged commit b65a04e into henry-alakazhang:master Aug 3, 2019
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