diff options
author | Dawson Botsford <dawsonbotsford@gmail.com> | 2018-02-13 14:31:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 14:31:55 -0800 |
commit | 3b8256194f0867685376d7b19329f6e00d0fa0c7 (patch) | |
tree | 0a0e59233fee1491ba086502e85bdea01214a2b5 | |
parent | 2f9d968a9c8ae2bc7d002eda06cb515540629aef (diff) | |
download | best-practices-3b8256194f0867685376d7b19329f6e00d0fa0c7.tar.gz best-practices-3b8256194f0867685376d7b19329f6e00d0fa0c7.tar.bz2 best-practices-3b8256194f0867685376d7b19329f6e00d0fa0c7.zip |
Add more js best practices & gh & flow
-rw-r--r-- | readme.md | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -2,6 +2,11 @@ Make your code π― - A collection of best practices for software +## π GitHub π + +* Branch off `master` and complete your feature. +* Pull request `master` and tag relevant people for review. + ## βοΈ JavaScript βοΈ * 2 spaces (instead of tabs) @@ -9,6 +14,9 @@ Make your code π― - A collection of best practices for software * Promises (not callbacks) * No [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) * No [mobx](https://mobx.js.org/) +* Test with [jest](https://facebook.github.io/jest/) + * Place jest tests alongside the file(s) it tests (not in a separate directory) + * End test files with `.test.js` ### βοΈ React/Redux βοΈ @@ -21,6 +29,12 @@ Make your code π― - A collection of best practices for software * Components should not wait for promises to resolve, instead listen on props via reduxβ `mapStateToProps()`. * Declare and export components in separate places (otherwise the web inspector cannot name components properly) +### Flowtype + +* Any types used in more than one file should be placed in `src/types.js` +* Add flow linting via [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) +* Disallow `any` with [eslint no-weak-types](https://github.com/gajus/eslint-plugin-flowtype#no-weak-types) + ### π£π’ TypeScript π£π’ * Lint with [`tslint:recommended`](https://github.com/palantir/tslint) at a minimum. |