Skip to content

Code cleanliness improvements#1192

Merged
tpetr merged 38 commits intodecaffrom
code_cleanliness_improvements
Aug 18, 2016
Merged

Code cleanliness improvements#1192
tpetr merged 38 commits intodecaffrom
code_cleanliness_improvements

Conversation

@Calvinp
Copy link
Contributor

@Calvinp Calvinp commented Aug 5, 2016

  • Renames most one and two letter variable names to things that are more descriptive.
  • Adds an eslint rule to disallow most one and two letter variable names. id, ui, and s3 are ok because they are useful and informative when they are used, unlike hc (for healthCheck)
  • Adds a block exception to this rule for the moment locale rules.
  • Fixes a spot where props were mutated.
  • Uses moment.updateLocale() instead of moment.locale() to get rid of the deprecated warning.
  • Makes several components functional.

Calvin Pomerantz added 2 commits August 5, 2016 13:35
…'ui', and 's3' are ok because they are useful and informative when they are used, unlike 'hc' (for healthchecks)
@Calvinp
Copy link
Contributor Author

Calvinp commented Aug 5, 2016

I always forget to do this... cc @tpetr @kwm4385 @wolfd

@Calvinp Calvinp mentioned this pull request Aug 9, 2016
@Calvinp Calvinp mentioned this pull request Aug 10, 2016
step={1}
value={this.props.value ? duration.hours() : ''}
onChange={(e) => this.handleChange(e)}
onChange={(event) => this.handleChange(event)}
Copy link
Contributor

Choose a reason for hiding this comment

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

These could probably be shortened just to onChange={this.handleChange}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When making this change, I found a bug (that is present in decaf too). I'm working on fixing that.

<UITable
data={pausedRequests}
keyGetter={(r) => r.request.id}
keyGetter={(request) => request.request.id}
Copy link
Contributor

Choose a reason for hiding this comment

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

these are actually requestParents, but we don't do a good job of labeling them...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'm realizing that. I'm willing to go through and change them all - it's probably worth doing.

@tpetr tpetr merged commit 1c7a8c3 into decaf Aug 18, 2016
@tpetr tpetr modified the milestone: 0.10.0 Aug 18, 2016
@ssalinas ssalinas deleted the code_cleanliness_improvements branch November 1, 2016 13:24
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.

4 participants