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 flow-coverage script, add aphrodite flow types #249

Merged
merged 9 commits into from
Jul 30, 2018

Conversation

kevinbarabash
Copy link
Contributor

@kevinbarabash kevinbarabash commented Jul 28, 2018

Adding aphrodite.flow.js bumped our flow coverage from 85% to 91%. This was computed using the flow-coverage-report npm package. It doesn't support lcov yet so we can't upload the reports to codecov. See rpl/flow-coverage-report#67. In the meantime you can run it manually with yarn run flow-coverage.

TODO:

  • add flowtype/no-types-missing-file-annotation eslint rule
  • add // @flow to files missing it
  • fix new flow errors.

@kevinbarabash kevinbarabash requested a review from jeresig as a code owner July 28, 2018 02:24
@jeresig
Copy link
Member

jeresig commented Jul 28, 2018

Deploy preview for wonder-blocks ready!

Built with commit 8065a63

https://deploy-preview-249--wonder-blocks.netlify.com

@codecov
Copy link

codecov bot commented Jul 28, 2018

Codecov Report

Merging #249 into master will decrease coverage by 0.73%.
The diff coverage is 20%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #249      +/-   ##
==========================================
- Coverage   85.91%   85.17%   -0.74%     
==========================================
  Files         103      103              
  Lines        1363     1376      +13     
  Branches      277      277              
==========================================
+ Hits         1171     1172       +1     
- Misses        163      175      +12     
  Partials       29       29
Impacted Files Coverage Δ
...wonder-blocks-dropdown/components/select-opener.js 100% <ø> (ø) ⬆️
...ckages/wonder-blocks-form/components/radio-core.js 96.29% <100%> (ø) ⬆️
...ges/wonder-blocks-form/components/checkbox-core.js 96.29% <100%> (ø) ⬆️
...s/wonder-blocks-form/components/choice-internal.js 51.85% <7.69%> (-41.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 353aacd...8065a63. Read the comment docs.

Copy link
Member

@jeresig jeresig left a comment

Choose a reason for hiding this comment

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

Awesome - really glad our coverage is improving and we have a way of tracking it! Once we have LCOV support that'll be ideal. One or two potential small issues, would be good to fix before landing.

@@ -15,9 +15,6 @@ const styles = StyleSheet.create({
row: {
flexDirection: "row",
},
strutLike: {
Copy link
Member

Choose a reason for hiding this comment

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

Yay for dead code removal!

/**
* This is a labeled 🔘 or ☑️ item. This is an internal component that's wrapped
* by ChoiceField or Choice. Choice should be used in a CheckboxGroup or in a
* RadioGroup. ChoiceField is the variant used outside of such a group. The two
* are different to allow for more explicit flow typing. Choice has many of its
* props auto-populated, but ChoiceField does not.
*/
export default class ChoiceInternal extends React.Component<Props> {
*/ export default class ChoiceInternal extends React.Component<Props> {
Copy link
Member

Choose a reason for hiding this comment

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

This is the weird spacing issue that @wishdasher was seeing with Prettier, would be good to fix this! Maybe we need to upgrade Prettier?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updating prettier does not resolve this issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems like this would be pretty easy to fix, just add a rule that states code should not appear on a line after a block comment.

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'm going to leave this as is otherwise we'll end up with this change the next time someone edits this file.

package.json Outdated
@@ -29,6 +30,10 @@
"author": "",
"license": "MIT",
"devDependencies": {
"//": [
Copy link
Member

Choose a reason for hiding this comment

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

🛑 Hmm - this got moved. Maybe you could move it out of devDependencies and update to specifically reference enzyme-adapter-react-16?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for noticing this. I guess I'll avoid running yarn add in the future.

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 guess if we follow the same pattern as the package.json in webapp this shouldn't be an issue.

@jeresig jeresig assigned kevinbarabash and unassigned jeresig and wishdasher Jul 30, 2018
@kevinbarabash
Copy link
Contributor Author

85.13% (-0.74%)

😭

@kevinbarabash kevinbarabash merged commit c91dbcc into master Jul 30, 2018
@kevinbarabash kevinbarabash deleted the flow-coverage branch July 30, 2018 22:15
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