a reputation protocol for open collaboration
Go to file
William Chargin 5744d3c860
Autogenerate PropTypes from Flow types (#20)
Summary:
Closes #17; see discussion there.

This commit uses the `babel-plugin-flow-react-proptypes` package to
automatically create PropType definitions from components that are typed
with Flow. It simultaneously updates all of our existing components to
be typed with Flow. As a result, we have both static and dynamic type
checking.

Test Plan:
Note that `yarn test` and `yarn flow` report no errors, and that there
are no prop validation errors at runtime with `yarn start`.

Then, apply the following patch:
```diff
diff --git a/explorer/src/UserExplorer.js b/explorer/src/UserExplorer.js
index bb574cd..636a10d 100644
--- a/explorer/src/UserExplorer.js
+++ b/explorer/src/UserExplorer.js
@@ -18,7 +18,7 @@ export class UserExplorer extends Component<{
         .sort((a,b) => b[1] - a[1]);
     const entries = sortedUserWeightTuples.map(authorWeight => {
       const [author, weight] = authorWeight;
-      return <UserEntry userId={author} weight={weight} key={author}/>
+      return <UserEntry userId={55} weight={weight} key={author}/>
     });
     return <div className="user-explorer">
       <h3> User Explorer </h3>
```
Note that `yarn test` fails (the `App.test.js` E2E rendering test),
`yarn flow` fails, and there is a runtime prop validation error.

wchargin-branch: autogenerate-proptypes
2018-02-17 13:30:16 -08:00
experiments Tweak commit_graph_dump & store sample data. (#12) 2018-02-15 22:16:37 -08:00
explorer Autogenerate PropTypes from Flow types (#20) 2018-02-17 13:30:16 -08:00
LICENSE Add LICENSE 2018-02-03 17:58:49 -08:00
README.md Simplify README, link to new docs 2018-02-05 00:09:14 -08:00
design.md Split out useful & ethical. (#7) 2018-02-07 15:04:23 -08:00
overview.md Add overview.md (#6) 2018-02-05 00:14:15 -08:00

README.md

SourceCred

The open-source community provides an enormous amount of value to the world. SourceCred aims to support that community by creating a sustainable model for funding open-source projects, and rewarding the contributors to those projects. We'll do that by enabling every open-source project to create its own digital token, called cred, which represents respect or "street cred" in the community. People will earn cred in a project by contributing to it.

For a high-level overview of how SourceCred works, check out overview.md.

For an in-depth discussion of SourceCred's design, check out design.md (under construction).

We aim to have design discussions on GitHub, so that people who contribute to the design will receive cred in SourceCred. For coordination and casual conversation, please join our slack.