-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from Granze/airbnb-lint
Airbnb lint
- Loading branch information
Showing
10 changed files
with
94 additions
and
113 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,28 +1,6 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"plugins": [ | ||
"react" | ||
], | ||
"ecmaFeatures": { | ||
"modules": true, | ||
"jsx": true | ||
}, | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"extends": "airbnb", | ||
"rules": { | ||
"quotes": [ | ||
2, | ||
"single" | ||
], | ||
"eqeqeq": [ | ||
2, | ||
"smart" | ||
], | ||
"keyword-spacing": 2, | ||
"no-console": 1 | ||
"comma-dangle": [2, "never"] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import React from 'react'; | ||
|
||
export default React.createClass({ | ||
render() { | ||
return ( | ||
<div> | ||
<h2>About</h2> | ||
<p>React Starterify aims to give you a good starting point for your projects.</p> | ||
<p>If you're looking for a minimal ES6 (ES2015) React JS starter with nice shallow rendering test examples, this is probably for you.</p> | ||
</div> | ||
); | ||
} | ||
}); | ||
const About = () => ( | ||
<div> | ||
<h2>About</h2> | ||
<p>React Starterify aims to give you a good starting point for your projects.</p> | ||
<p>If you're looking for a minimal ES6 (ES2015) React JS starter | ||
with nice shallow rendering test examples, this is probably for you.</p> | ||
</div> | ||
); | ||
|
||
export default About; | ||
|
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,26 +1,20 @@ | ||
import React from 'react'; | ||
import {Link} from 'react-router'; | ||
import packageJSON from '../../package.json'; | ||
import { Link } from 'react-router'; | ||
import { version } from '../../package.json'; | ||
|
||
export default React.createClass({ | ||
returnSomething(something) { | ||
//this is only for testing purposes. Check /test/components/App-test.js | ||
return something; | ||
}, | ||
render() { | ||
const version = packageJSON.version; | ||
const App = ({ children }) => ( | ||
<div> | ||
<header> | ||
<h1>React Starterify {version}</h1> | ||
<Link to="/about">About</Link> | ||
<Link to="/poweredby">Powered by</Link> | ||
</header> | ||
<section> | ||
{children || 'Welcome to React Starterify'} | ||
</section> | ||
</div> | ||
); | ||
|
||
return ( | ||
<div> | ||
<header> | ||
<h1>React Starterify {version}</h1> | ||
<Link to="/about">About</Link> | ||
<Link to="/poweredby">Powered by</Link> | ||
</header> | ||
<section> | ||
{this.props.children || 'Welcome to React Starterify'} | ||
</section> | ||
</div> | ||
) | ||
} | ||
}); | ||
App.propTypes = { children: React.PropTypes.object }; | ||
|
||
export default 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
import React from 'react'; | ||
import packageJSON from '../../package.json'; | ||
import { dependencies, devDependencies } from '../../package.json'; | ||
|
||
export default React.createClass({ | ||
render() { | ||
let deps = Object.keys(packageJSON.dependencies).map((dep, i) => <li key={i}>{dep}</li>); | ||
let devDeps = Object.keys(packageJSON.devDependencies).map((dep, i) => <li key={i + 10}>{dep}</li>); | ||
const PoweredBy = () => { | ||
const deps = Object.keys(dependencies) | ||
.map((dep, i) => <li key={i}>{dep}</li>); | ||
const devDeps = Object.keys(devDependencies) | ||
.map((dep, i) => <li key={i + 10}>{dep}</li>); | ||
|
||
return ( | ||
<div> | ||
<h2>Powered by</h2> | ||
<a href="https://david-dm.org/granze/react-starterify"><img src="https://david-dm.org/granze/react-starterify/status.svg" alt="deps status"/></a> | ||
<a href="https://david-dm.org/granze/react-starterify#info=devDependencies"><img src="https://david-dm.org/granze/react-starterify/dev-status.svg" alt="dev deps status"/></a> | ||
<ul> | ||
{[...deps, ...devDeps]} | ||
</ul> | ||
</div> | ||
); | ||
} | ||
}); | ||
return ( | ||
<div> | ||
<h2>Powered by</h2> | ||
<a href="https://david-dm.org/granze/react-starterify"> | ||
<img src="https://david-dm.org/granze/react-starterify/status.svg" alt="deps status" /> | ||
</a> | ||
| ||
<a href="https://david-dm.org/granze/react-starterify#info=devDependencies"> | ||
<img src="https://david-dm.org/granze/react-starterify/dev-status.svg" alt="dev deps status" /> | ||
</a> | ||
<ul> | ||
{[...deps, ...devDeps]} | ||
</ul> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PoweredBy; |
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