View .eslintrc
"extends": "airbnb",
"env": {
"browser": true,
"node": true,
"es6": true
"plugins": [
View Navbar.js
import React, { Component } from "react";
import AppBar from "material-ui/AppBar";
import { Link } from "react-router-dom";
import FlatButton from "material-ui/FlatButton";
import UserStore from "../../stores/user_store";
import { Toolbar, ToolbarGroup } from "material-ui/Toolbar";
import history from "../../history";
import UserActions from "../../actions/user_actions";
import {
View yarn-error-log
/usr/local/Cellar/node/9.7.1/bin/node /usr/local/Cellar/yarn/1.5.1/libexec/bin/yarn.js run build
Yarn version:
Node version:
View console.js
const iframe = document.createElement('iframe');
const virgin = Object.keys(iframe.contentWindow);
const current = Object.keys(window);
const added = current.filter(key => !virgin.includes(key));
View FiniteMachine.js
import React, { Component } from "react"
import { Machine } from "xstate"
import * as PropTypes from "prop-types"
class FiniteMachine extends Component {
machine = Machine(this.props.chart)
state = {
data: this.props.reducer(undefined, { type: "@init" }),
machineState: this.machine.getInitialState()

Documentation-Driven Development

The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.

  • Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
  • Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
  • Once documentation has been written, development should commence, and test-driven development is preferred.
  • Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
  • When a feature is being modified, it should be modified documentation-first.
  • When documentation is modified, so should be the tests.
View controllers.application.js
import Ember from 'ember';
import Changeset from '../lib/changeset';
import validatePresence from '../validators/presence';
let model = { foo: 'bar' };
let validations = {
foo: validatePresence()
let changeset = new Changeset(model, { validations });
View App.jsx
/* Button class component */
class Button extends React.Component {
handleClick = () => {
render() {
return (
View Button.js
/* Using the stage 2 way */
class Button extends React.Component {
state = { counter: 0 };
** This might cause a race condition later on
** because setState is an asynchronous call and
** will be batched with other setState calls for performance.