Skip to content

Chore/hooks - eslint & tests#5

Merged
kgajowy merged 2 commits intomasterfrom
chore/hooks
May 26, 2018
Merged

Chore/hooks - eslint & tests#5
kgajowy merged 2 commits intomasterfrom
chore/hooks

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!

import PropTypes from 'prop-types';

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.

</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

Comments