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

refactor: harmonizes playing card typings #126

Closed
wants to merge 1 commit into from

Conversation

guilhermevrs
Copy link
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (yarn build) was run locally and any changes were pushed
  • Lint (yarn lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Typings from PlayingCard do not follow the same for UnoCard

Issue Number: Closes #122

What is the new behavior?

Typings normalized

Does this introduce a breaking change?

  • Yes
  • No

Other information

A picture tells a thousand words

@guilhermevrs guilhermevrs self-assigned this Dec 18, 2020
@guilhermevrs guilhermevrs added this to Needs review in Cards-ui Dec 18, 2020
@@ -1,16 +1,13 @@
import { PlayingCard, PlayingCardName, PlayingCardSuit } from '@models/PlayingCard';
import { allPlayingCardNames, allPlayingCardSuits, PlayingCard } from '@models/PlayingCard';
Copy link
Contributor

Choose a reason for hiding this comment

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

No big deal and super minor, but I don't think we need the prefix all => playingCardNames would be enough in my opinion 😄

Also, I like it better in camel case, so maybe you could also change it for AllUnoColors & values.

I will approve anyway 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

e.g. PlayingCardNames ?
I since it's a constant, wouldn't that break the linter in this case?

Anyhow, I am ok for doing it. Perhaps the only point that is a bit slugish is that we will have a type PlayingCardName and an array constant as PlayingCardNames.

Shall we move forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Cards-ui
  
Needs review
Development

Successfully merging this pull request may close these issues.

Refactor PlayingCard typings
2 participants