Skip to content

Commit 79e4388

Browse files
committed
Merge pull request #76 from zpao/lint
Update linting dependencies, fix errors
2 parents 3c03abf + 251b30b commit 79e4388

31 files changed

+101
-81
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
---
22
"extends":
3-
- "defaults/configurations/walmart/es6-react"
3+
- "eslint-config-defaults/configurations/walmart/es6-react"
4+
5+
"rules":
6+
"indent": [2, 2, {"SwitchCase": 1}]
7+
"max-len": 0

index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Presentation.contextTypes = {
2929
router: React.PropTypes.object
3030
};
3131

32-
Presentation = context(Presentation, {styles: config.theme, print: config.print, flux});
32+
const PresentationContext = context(Presentation, {styles: config.theme, print: config.print, flux});
3333

3434
React.render(
3535
<Router history={new HashHistory()}>
36-
<Route path="/" component={Presentation} />
37-
<Route path="/:slide" component={Presentation} />
36+
<Route path="/" component={PresentationContext} />
37+
<Route path="/:slide" component={PresentationContext} />
3838
</Router>
3939
, document.body);

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"start": "webpack-dev-server",
8-
"lint": "eslint --ext .js,.jsx src",
8+
"lint": "eslint --ext .js,.jsx .",
99
"build": "webpack",
1010
"deploy": "npm run build && surge -p ./dist"
1111
},
@@ -30,12 +30,13 @@
3030
"autoprefixer-core": "^5.2.1",
3131
"babel": "^5.6.14",
3232
"babel-core": "^5.6.15",
33-
"babel-eslint": "^3.1.23",
33+
"babel-eslint": "^4.1.3",
3434
"babel-loader": "^5.2.2",
3535
"css-loader": "^0.15.1",
36-
"eslint": "^0.24.0",
37-
"eslint-config-defaults": "^3.0.3",
38-
"eslint-plugin-react": "^2.6.4",
36+
"eslint": "^1.5.1",
37+
"eslint-config-defaults": "^6.0.0",
38+
"eslint-plugin-filenames": "^0.1.2",
39+
"eslint-plugin-react": "^3.4.2",
3940
"file-loader": "^0.8.4",
4041
"json-loader": "^0.5.2",
4142
"node-libs-browser": "^0.5.2",

presentation/deck.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ export default class extends React.Component {
3636
</Link>
3737
<Text textSize="1.5em" margin="20px 0px 0px" bold>Hit Your Right Arrow To Begin!</Text>
3838
</Slide>
39-
<Slide transition={['slide']} bgColor="black" notes="You can even put notes on your slide. How awesome is that?">
40-
<Image src={images.kat.replace('/','')} margin="0px auto 40px" height="293px"/>
39+
<Slide transition={["slide"]} bgColor="black" notes="You can even put notes on your slide. How awesome is that?">
40+
<Image src={images.kat.replace("/", "")} margin="0px auto 40px" height="293px"/>
4141
<Heading size={1} fit textColor="primary" textFont="secondary">
4242
Wait what?
4343
</Heading>
4444
</Slide>
45-
<Slide transition={['zoom', 'fade']} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>">
45+
<Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>">
4646
<CodePane
4747
lang="javascript"
4848
source={require("raw!./deck.example")}

src/appear.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import assign from "object-assign";
66
const Appear = React.createClass({
77
mixins: [tweenState.Mixin],
88
propTypes: {
9-
children: React.PropTypes.node
9+
children: React.PropTypes.node,
10+
style: React.PropTypes.object
1011
},
1112
contextTypes: {
1213
flux: React.PropTypes.object,

src/base.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*eslint max-statements:0,complexity:0*/
1+
/*eslint max-statements:0,complexity:0,no-invalid-this:0*/
22
import React from "react/addons";
33

44
const getStyles = function getStyles() {

src/block-quote.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class BlockQuote extends Base {
1414
}
1515

1616
BlockQuote.propTypes = {
17-
children: React.PropTypes.node
17+
children: React.PropTypes.node,
18+
style: React.PropTypes.object
1819
};
1920

2021
BlockQuote.contextTypes = {

src/code-pane.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ CodePane.contextTypes = {
2929

3030
CodePane.propTypes = {
3131
lang: React.PropTypes.string,
32-
source: React.PropTypes.string
32+
source: React.PropTypes.string,
33+
style: React.PropTypes.object
3334
};
3435

3536
CodePane.defaultProps = {

src/code.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class Code extends Base {
1414
}
1515

1616
Code.propTypes = {
17-
children: React.PropTypes.node
17+
children: React.PropTypes.node,
18+
style: React.PropTypes.object
1819
};
1920

2021
Code.contextTypes = {

0 commit comments

Comments
 (0)