Skip to content

Commit

Permalink
Emphasize named exports and function declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiuch committed Apr 7, 2018
1 parent 430bcfd commit 7eb5237
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ When naming a file:
* Use _CamelCase_ for components: `DragHandle.js` or `DragHandle/index.js`
* Use _kebab-case_ for any other path: `packages/react-cosmos-shared/src/resolve-user-path.js`

When creating a module:

* **Named exports** are preferred over default exports
* **Function declarations** are preferred over arrow functions at the module level (one reason is that the order doesn't matter when using the former)

Please follow these rules or challenge them if you think it's worth it.

#### Use Git conscientiously
Expand Down

0 comments on commit 7eb5237

Please sign in to comment.