aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawson Botsford <dawsonbotsford@gmail.com>2018-02-13 14:31:55 -0800
committerGitHub <noreply@github.com>2018-02-13 14:31:55 -0800
commit3b8256194f0867685376d7b19329f6e00d0fa0c7 (patch)
tree0a0e59233fee1491ba086502e85bdea01214a2b5
parent2f9d968a9c8ae2bc7d002eda06cb515540629aef (diff)
downloadbest-practices-3b8256194f0867685376d7b19329f6e00d0fa0c7.tar.gz
best-practices-3b8256194f0867685376d7b19329f6e00d0fa0c7.tar.bz2
best-practices-3b8256194f0867685376d7b19329f6e00d0fa0c7.zip
Add more js best practices & gh & flow
-rw-r--r--readme.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/readme.md b/readme.md
index 156ca61..ba132c2 100644
--- a/readme.md
+++ b/readme.md
@@ -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.