Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
380c6f1
commit c1b2824
Showing
19 changed files
with
409 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,19 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"plugins": ["react"], | ||
"ecmaFeatures": { | ||
"jsx": true, | ||
"objectLiteralShorthandMethods": true | ||
}, | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es6": true | ||
"extends": "airbnb", | ||
"globals": { | ||
"chai": true, | ||
"describe": true, | ||
"it": true | ||
}, | ||
"rules": { | ||
"quotes": [0], | ||
"new-parens": [1], | ||
"no-alert": [1], | ||
"handle-callback-err": [1], | ||
"strict": [1], | ||
"no-script-url": [0], | ||
"space-unary-ops": [0], | ||
"consistent-return": [0], | ||
"comma-dangle": 1, | ||
"no-mixed-requires": [1], | ||
"no-underscore-dangle": [0], | ||
"no-multi-spaces": [1], | ||
"no-unused-vars": [1], | ||
"key-spacing": [0], | ||
"no-empty": [1], | ||
"no-shadow": [0], | ||
"no-use-before-define": [0], | ||
"no-unused-expressions": [1], | ||
"no-new-func": [0], | ||
"new-cap": [0], | ||
"eqeqeq": [0], | ||
"curly": [0], | ||
"strict": [0], | ||
"no-new": [1], | ||
"eol-last": [1], | ||
"space-infix-ops": [1], | ||
"no-return-assign": [1], | ||
"comma-spacing": [1], | ||
"no-extra-boolean-cast": [1], | ||
"no-constant-condition": [1], | ||
|
||
"react/display-name": 0, | ||
"react/jsx-boolean-value": 1, | ||
"react/jsx-no-duplicate-props": 1, | ||
"react/jsx-no-undef": 1, | ||
"react/jsx-quotes": 1, | ||
"react/jsx-sort-prop-types": 0, | ||
"react/jsx-sort-props": 0, | ||
"react/jsx-uses-react": 1, | ||
"react/jsx-uses-vars": 1, | ||
"react/no-danger": 1, | ||
"react/no-did-mount-set-state": 0, | ||
"react/no-did-update-set-state": 1, | ||
"react/no-multi-comp": 1, | ||
"react/no-unknown-property": 1, | ||
"react/prop-types": 0, | ||
"react/react-in-jsx-scope": 0, | ||
"react/require-extension": 1, | ||
"react/self-closing-comp": 1, | ||
"react/sort-comp": 1, | ||
"react/wrap-multilines": 1 | ||
}, | ||
"globals": { | ||
"describe": false, | ||
"chai": false, | ||
"beforeEach": false, | ||
"afterEach": false, | ||
"it": false | ||
"comma-dangle": 0, | ||
"no-console": 0, | ||
"react/prefer-stateless-function": 1, | ||
"react/jsx-no-bind": 0, | ||
"arrow-body-style": 1, | ||
"no-nested-ternary": 0, | ||
"no-param-reassign": 0, | ||
"prefer-rest-params": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Router, Route, IndexRoute, hashHistory, Link, Redirect } from 'react-router'; | ||
|
||
import Containment from './pages/containment'; | ||
import Dynamic from './pages/dynamic'; | ||
import HOC from './pages/hoc'; | ||
import Image from './pages/image'; | ||
|
||
const App = ({ children }) => ( | ||
<div className="wrapper"> | ||
<ul> | ||
<li><Link to="/normal" activeClassName="active">Normal</Link></li> | ||
<li><Link to="/image" activeClassName="active">Image</Link></li> | ||
<li><Link to="/dynamic" activeClassName="active">Dynamic</Link></li> | ||
<li><Link to="/containment" activeClassName="active">Containment</Link></li> | ||
</ul> | ||
{children} | ||
</div> | ||
); | ||
|
||
const routes = ( | ||
<Router history={hashHistory}> | ||
<Route path="/" component={App}> | ||
<Route path="/normal" component={HOC} /> | ||
<Route path="/image" component={Image} /> | ||
<Route path="/dynamic" component={Dynamic} /> | ||
<Route path="/containment" component={Containment} /> | ||
<Redirect to="/normal" /> | ||
</Route> | ||
</Router> | ||
); | ||
|
||
ReactDOM.render(routes, document.getElementById('app')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.