diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 000000000..849ddff3b
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1 @@
+dist/
diff --git a/.eslintrc b/.eslintrc
index 941c0c818..ae6301748 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,3 +1,7 @@
---
"extends":
- - "defaults/configurations/walmart/es6-react"
\ No newline at end of file
+ - "eslint-config-defaults/configurations/walmart/es6-react"
+
+"rules":
+ "indent": [2, 2, {"SwitchCase": 1}]
+ "max-len": 0
diff --git a/index.jsx b/index.jsx
index 09ba36b6d..5e0870d67 100644
--- a/index.jsx
+++ b/index.jsx
@@ -29,11 +29,11 @@ Presentation.contextTypes = {
router: React.PropTypes.object
};
-Presentation = context(Presentation, {styles: config.theme, print: config.print, flux});
+const PresentationContext = context(Presentation, {styles: config.theme, print: config.print, flux});
React.render(
-
-
+
+
, document.body);
diff --git a/package.json b/package.json
index b4003ba3b..09e3a8e10 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"start": "webpack-dev-server",
- "lint": "eslint --ext .js,.jsx src",
+ "lint": "eslint --ext .js,.jsx .",
"build": "webpack",
"deploy": "npm run build && surge -p ./dist"
},
@@ -30,12 +30,13 @@
"autoprefixer-core": "^5.2.1",
"babel": "^5.6.14",
"babel-core": "^5.6.15",
- "babel-eslint": "^3.1.23",
+ "babel-eslint": "^4.1.3",
"babel-loader": "^5.2.2",
"css-loader": "^0.15.1",
- "eslint": "^0.24.0",
- "eslint-config-defaults": "^3.0.3",
- "eslint-plugin-react": "^2.6.4",
+ "eslint": "^1.5.1",
+ "eslint-config-defaults": "^6.0.0",
+ "eslint-plugin-filenames": "^0.1.2",
+ "eslint-plugin-react": "^3.4.2",
"file-loader": "^0.8.4",
"json-loader": "^0.5.2",
"node-libs-browser": "^0.5.2",
diff --git a/presentation/deck.jsx b/presentation/deck.jsx
index 6bc9bd709..b98b02c8f 100644
--- a/presentation/deck.jsx
+++ b/presentation/deck.jsx
@@ -36,13 +36,13 @@ export default class extends React.Component {
Hit Your Right Arrow To Begin!
-
-
+
+
Wait what?
-
+
: React.createElement(Tag, {
- style: [this.context.styles.components.heading["h" + this.props.size], this.getStyles(), this.props.style]
- }, this.props.children);
+ style: [this.context.styles.components.heading["h" + this.props.size], this.getStyles(), this.props.style]
+ }, this.props.children);
}
}
diff --git a/src/image.jsx b/src/image.jsx
index 990c658f1..b0a864075 100644
--- a/src/image.jsx
+++ b/src/image.jsx
@@ -32,7 +32,8 @@ Image.propTypes = {
React.PropTypes.number
]),
display: React.PropTypes.string,
- src: React.PropTypes.string
+ src: React.PropTypes.string,
+ style: React.PropTypes.object
};
Image.contextTypes = {
diff --git a/src/layout.jsx b/src/layout.jsx
index bc768e319..01fef8678 100644
--- a/src/layout.jsx
+++ b/src/layout.jsx
@@ -16,7 +16,8 @@ class Layout extends React.Component {
}
Layout.propTypes = {
- children: React.PropTypes.node
+ children: React.PropTypes.node,
+ style: React.PropTypes.object
};
export default Layout;
diff --git a/src/link.jsx b/src/link.jsx
index e5f24c9c3..fd8f15fd1 100644
--- a/src/link.jsx
+++ b/src/link.jsx
@@ -15,7 +15,8 @@ class Link extends Base {
Link.propTypes = {
children: React.PropTypes.node,
- href: React.PropTypes.string
+ href: React.PropTypes.string,
+ style: React.PropTypes.object
};
Link.contextTypes = {
diff --git a/src/list-item.jsx b/src/list-item.jsx
index 1282cdf57..205dd4955 100644
--- a/src/list-item.jsx
+++ b/src/list-item.jsx
@@ -14,7 +14,8 @@ class ListItem extends Base {
}
ListItem.propTypes = {
- children: React.PropTypes.node
+ children: React.PropTypes.node,
+ style: React.PropTypes.object
};
ListItem.contextTypes = {
diff --git a/src/list.jsx b/src/list.jsx
index d069cd01b..c9fa34fad 100644
--- a/src/list.jsx
+++ b/src/list.jsx
@@ -14,7 +14,8 @@ class List extends Base {
}
List.propTypes = {
- children: React.PropTypes.node
+ children: React.PropTypes.node,
+ style: React.PropTypes.object
};
List.contextTypes = {
diff --git a/src/overview.jsx b/src/overview.jsx
index a13272e08..f9aa2ec63 100644
--- a/src/overview.jsx
+++ b/src/overview.jsx
@@ -1,5 +1,3 @@
-/*global setInterval*/
-
import React from "react/addons";
import cloneWithProps from "react/lib/cloneWithProps";
import Base from "./base";
diff --git a/src/presenter.jsx b/src/presenter.jsx
index 29c84c5bd..3a46eb7e0 100644
--- a/src/presenter.jsx
+++ b/src/presenter.jsx
@@ -29,7 +29,7 @@ class Presenter extends Base {
_renderMainSlide() {
const child = this.props.slides[this.props.slide];
const presenterStyle = {
- position: "relative",
+ position: "relative"
};
return cloneWithProps(child, {
key: this.props.slide,
@@ -42,7 +42,7 @@ class Presenter extends Base {
});
}
componentDidMount() {
- this.time = setInterval(()=> {
+ this.time = setInterval(() => {
this.setState({
time: startTime(new Date())
});
@@ -61,7 +61,7 @@ class Presenter extends Base {
left: "50%",
transform: "translate(-50%, -50%)",
margin: 0,
- color: 'white'
+ color: "white"
};
const child = this.props.slides[parseInt(this.props.slide) + 1];
return child ? cloneWithProps(child, {
@@ -183,6 +183,7 @@ class Presenter extends Base {
Presenter.propTypes = {
lastSlide: React.PropTypes.number,
+ hash: React.PropTypes.number,
slides: React.PropTypes.array,
slide: React.PropTypes.number
};
diff --git a/src/quote.jsx b/src/quote.jsx
index 95eb167aa..0855dfdb2 100644
--- a/src/quote.jsx
+++ b/src/quote.jsx
@@ -14,7 +14,8 @@ class Quote extends Base {
}
Quote.propTypes = {
- children: React.PropTypes.node
+ children: React.PropTypes.node,
+ style: React.PropTypes.object
};
Quote.contextTypes = {
diff --git a/src/s.jsx b/src/s.jsx
index 2d1b5221c..992fb522d 100644
--- a/src/s.jsx
+++ b/src/s.jsx
@@ -28,6 +28,7 @@ class S extends React.Component {
S.propTypes = {
children: React.PropTypes.node,
+ style: React.PropTypes.object,
type: React.PropTypes.array
};
diff --git a/src/slide.jsx b/src/slide.jsx
index 7243b765c..3d7981de1 100644
--- a/src/slide.jsx
+++ b/src/slide.jsx
@@ -18,6 +18,7 @@ const Slide = React.createClass({
},
propTypes: {
align: React.PropTypes.string,
+ hash: React.PropTypes.number,
presenterStyle: React.PropTypes.object,
children: React.PropTypes.node,
notes: React.PropTypes.string,
@@ -76,12 +77,12 @@ const Slide = React.createClass({
} : {};
const overViewStyles = {
inner: {
- flexDirection: 'column'
+ flexDirection: "column"
},
content: {
width: "100%"
}
- }
+ };
const styles = {
outer: {
position: this.context.export ? "relative" : "absolute",
diff --git a/src/text.jsx b/src/text.jsx
index 927ca3f6a..678b77fb8 100644
--- a/src/text.jsx
+++ b/src/text.jsx
@@ -43,18 +43,18 @@ class Text extends Base {
render() {
const styles = {
container: {
- display: 'block',
- width: '100%',
+ display: "block",
+ width: "100%",
height: this.state.height
},
text: {
fontSize: 16,
- display: 'block',
+ display: "block",
margin: "0",
padding: "0",
lineHeight: this.props.lineHeight,
transform: "scale(" + this.state.scale + ")",
- transformOrigin: 'center top'
+ transformOrigin: "center top"
}
};
return this.props.fit
diff --git a/src/transitions.jsx b/src/transitions.jsx
index efab8ae0d..ce5b5624a 100644
--- a/src/transitions.jsx
+++ b/src/transitions.jsx
@@ -52,7 +52,7 @@ export default {
this.setState({
z: 1
- }, ()=> {
+ }, () => {
if (this.props.transition.indexOf("fade") !== -1) {
this.tweenState("opacity", {
diff --git a/src/utils/context.jsx b/src/utils/context.jsx
index 1a1da2c27..d05d80d9b 100644
--- a/src/utils/context.jsx
+++ b/src/utils/context.jsx
@@ -35,7 +35,7 @@ const context = function context(Component, params) {
overview: location.query && "overview" in location.query,
export: location.query && "export" in location.query,
print: location.query && "print" in location.query,
- slide: slide
+ slide
};
},
diff --git a/themes/default/html.js b/themes/default/html.js
index bc8075382..f7ca3d03d 100644
--- a/themes/default/html.js
+++ b/themes/default/html.js
@@ -1,21 +1,21 @@
-module.exports = function(data) {
+module.exports = function (data) {
return {
- '200.html': data.defaultTemplate(),
- 'index.html': [
- '',
- '',
- '',
- '',
- '',
- '',
- '',
- '',
- '',
- '',
- '',
- '',
- '',
- ''
- ].join('')
- }
-}
\ No newline at end of file
+ "200.html": data.defaultTemplate(),
+ "index.html": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ].join("")
+ };
+};
diff --git a/themes/default/index.js b/themes/default/index.js
index 0cfd1ce50..57cc45809 100644
--- a/themes/default/index.js
+++ b/themes/default/index.js
@@ -11,8 +11,8 @@ const fonts = {
};
module.exports = {
- colors: colors,
- fonts: fonts,
+ colors,
+ fonts,
global: {
body: {
background: colors.primary,
@@ -80,15 +80,15 @@ module.exports = {
bar: {
container: {
position: "absolute",
- height: '10px',
- width: '100%',
+ height: "10px",
+ width: "100%",
bottom: 0,
left: 0,
transition: "all 1s ease-in-out 0.2s",
zIndex: 1000
},
bar: {
- height: '100%',
+ height: "100%",
background: colors.tertiary,
transition: "all 0.3s ease-out"
}
diff --git a/themes/default/print.js b/themes/default/print.js
index 49dc97586..7304503c8 100644
--- a/themes/default/print.js
+++ b/themes/default/print.js
@@ -11,8 +11,8 @@ const fonts = {
};
module.exports = {
- colors: colors,
- fonts: fonts,
+ colors,
+ fonts,
global: {
body: {
background: "white",
diff --git a/webpack.config.js b/webpack.config.js
index f504675a7..f15155d8c 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,9 +1,10 @@
-var getConfig = require('hjs-webpack')
-var config = require('./presentation/config');
+/*eslint-disable no-var*/
+var getConfig = require("hjs-webpack");
+var config = require("./presentation/config");
var webpackConfig = getConfig({
- in: './index.jsx',
- out: 'dist',
+ in: "./index.jsx",
+ out: "dist",
clearBeforeBuild: true,
html: config.html
});
@@ -12,12 +13,12 @@ webpackConfig.module.loaders[0] = {
test: /(\.js$)|(\.jsx$)/,
exclude: /node_modules/,
loaders: [
- 'babel-loader?stage=1'
+ "babel-loader?stage=1"
]
-}
+};
-if (process.argv[1].indexOf('webpack-dev-server') !== -1) {
- webpackConfig.module.loaders[0].loaders.unshift('react-hot')
+if (process.argv[1].indexOf("webpack-dev-server") !== -1) {
+ webpackConfig.module.loaders[0].loaders.unshift("react-hot");
}
-module.exports = webpackConfig;
\ No newline at end of file
+module.exports = webpackConfig;