Skip to content

Commit 251b30b

Browse files
committed
Enable lint outside of src, fix other issues
1 parent 52c4cba commit 251b30b

File tree

8 files changed

+45
-43
lines changed

8 files changed

+45
-43
lines changed

.eslintignore

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

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: 1 addition & 1 deletion
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
},

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")}

themes/default/html.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
module.exports = function(data) {
1+
module.exports = function (data) {
22
return {
3-
'200.html': data.defaultTemplate(),
4-
'index.html': [
5-
'<!doctype html>',
6-
'<html>',
7-
'<head>',
8-
'<meta charset="utf-8"/>',
9-
'<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>',
10-
'<link href="http://fonts.googleapis.com/css?family=Lobster+Two:400,700" rel="stylesheet" type="text/css">',
11-
'<link href="http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700" rel="stylesheet" type="text/css">',
12-
'<link href="' + data.css + '" rel="stylesheet" type="text/css" />',
13-
'</head>',
14-
'<body>',
15-
'<div id="root"></div>',
16-
'<script src="' + data.main + '"></script>',
17-
'</body>',
18-
'</html>'
19-
].join('')
20-
}
21-
}
3+
"200.html": data.defaultTemplate(),
4+
"index.html": [
5+
"<!doctype html>",
6+
"<html>",
7+
"<head>",
8+
"<meta charset=\"utf-8\"/>",
9+
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\"/>",
10+
"<link href=\"http://fonts.googleapis.com/css?family=Lobster+Two:400,700\" rel=\"stylesheet\" type=\"text/css\">",
11+
"<link href=\"http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700\" rel=\"stylesheet\" type=\"text/css\">",
12+
"<link href=\"" + data.css + "\" rel=\"stylesheet\" type=\"text/css\" />",
13+
"</head>",
14+
"<body>",
15+
"<div id=\"root\"></div>",
16+
"<script src=\"" + data.main + "\"></script>",
17+
"</body>",
18+
"</html>"
19+
].join("")
20+
};
21+
};

themes/default/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ const fonts = {
1111
};
1212

1313
module.exports = {
14-
colors: colors,
15-
fonts: fonts,
14+
colors,
15+
fonts,
1616
global: {
1717
body: {
1818
background: colors.primary,
@@ -80,15 +80,15 @@ module.exports = {
8080
bar: {
8181
container: {
8282
position: "absolute",
83-
height: '10px',
84-
width: '100%',
83+
height: "10px",
84+
width: "100%",
8585
bottom: 0,
8686
left: 0,
8787
transition: "all 1s ease-in-out 0.2s",
8888
zIndex: 1000
8989
},
9090
bar: {
91-
height: '100%',
91+
height: "100%",
9292
background: colors.tertiary,
9393
transition: "all 0.3s ease-out"
9494
}

themes/default/print.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ const fonts = {
1111
};
1212

1313
module.exports = {
14-
colors: colors,
15-
fonts: fonts,
14+
colors,
15+
fonts,
1616
global: {
1717
body: {
1818
background: "white",

webpack.config.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
var getConfig = require('hjs-webpack')
2-
var config = require('./presentation/config');
1+
/*eslint-disable no-var*/
2+
var getConfig = require("hjs-webpack");
3+
var config = require("./presentation/config");
34

45
var webpackConfig = getConfig({
5-
in: './index.jsx',
6-
out: 'dist',
6+
in: "./index.jsx",
7+
out: "dist",
78
clearBeforeBuild: true,
89
html: config.html
910
});
@@ -12,12 +13,12 @@ webpackConfig.module.loaders[0] = {
1213
test: /(\.js$)|(\.jsx$)/,
1314
exclude: /node_modules/,
1415
loaders: [
15-
'babel-loader?stage=1'
16+
"babel-loader?stage=1"
1617
]
17-
}
18+
};
1819

19-
if (process.argv[1].indexOf('webpack-dev-server') !== -1) {
20-
webpackConfig.module.loaders[0].loaders.unshift('react-hot')
20+
if (process.argv[1].indexOf("webpack-dev-server") !== -1) {
21+
webpackConfig.module.loaders[0].loaders.unshift("react-hot");
2122
}
2223

23-
module.exports = webpackConfig;
24+
module.exports = webpackConfig;

0 commit comments

Comments
 (0)