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

Chore/hooks - eslint & tests #5

Merged
merged 2 commits into from
May 26, 2018
Merged

Chore/hooks - eslint & tests #5

merged 2 commits into from
May 26, 2018

Conversation

kgajowy
Copy link
Contributor

@kgajowy kgajowy commented May 21, 2018

  • added github hooks
  • force running tests before push
  • run eslint on gh-staged files
  • add proper presets for react
  • try to "copy" the .editorconfig files into .eslintrc.js
  • added prop-types to TopBar :)

fixes #6

Copy link
Member

@Tuhaj Tuhaj left a comment

Choose a reason for hiding this comment

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

Minor questions!

'rules': {
'indent': [
'error',
4
Copy link
Member

Choose a reason for hiding this comment

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

I prefer 2! But let it be ;-)

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 prefer 4 :) but we can agree on any setting!


class TopBar extends Component {
class TopBar extends React.Component {
Copy link
Member

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Tuhaj it does not matter - both effect is the same (i.e. either importing React, {Component} or just React). The only reason why I picked React.Component is that Component is a generic name that any library may export. By using React.Component we strictly say "hey, this will be React.Component!" - as Component is a common name and may be used by other libraries.

@@ -22,16 +23,20 @@ class TopBar extends Component {
<Text type="basic" color={ Colors.white } display={ 'inline' }>
Zaloguj się przez GitHub
</Text>
<Button marginLeft='10px' onClick={this.onClick}
type="primary">
<Button marginLeft='10px' onClick={this.onClick} type="primary">
Copy link
Member

Choose a reason for hiding this comment

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

here primary in double quotes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be honest I haven't even noticed, as my changes only re-formatted this part. Will check this within next PR. Good catch!

@kgajowy kgajowy merged commit cb87e7d into master May 26, 2018
@kgajowy kgajowy deleted the chore/hooks branch June 12, 2018 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Add gh hooks (linter, prettier, tests)
2 participants