commit 31bef84f12cf512ae27b02198f0f5782a3815402
parent ad3147cd9ec7e2a971394f4df7d7519aa9297043
Author: Konstantin Tarkus <hello@tarkus.me>
Date: Mon, 25 Jan 2016 15:45:34 +0300
Update npm modules; fix ESLint warnings
Diffstat:
8 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/package.json b/package.json
@@ -7,15 +7,15 @@
"dependencies": {
"babel-polyfill": "^6.3.14",
"babel-runtime": "^6.3.19",
- "bluebird": "3.1.1",
+ "bluebird": "3.1.4",
"classnames": "2.2.3",
"eventemitter3": "1.1.1",
- "express": "4.13.3",
+ "express": "4.13.4",
"fastclick": "1.0.6",
"fbjs": "0.6.1",
"front-matter": "2.0.5",
"history": "2.0.0-rc2",
- "isomorphic-style-loader": "0.0.6",
+ "isomorphic-style-loader": "0.0.7",
"jade": "1.11.0",
"node-fetch": "1.3.3",
"normalize.css": "3.0.3",
@@ -41,7 +41,7 @@
"csscomb": "^3.1.8",
"del": "^2.2.0",
"eslint": "^1.10.3",
- "eslint-config-airbnb": "^3.1.0",
+ "eslint-config-airbnb": "^4.0.0",
"eslint-loader": "^1.2.0",
"eslint-plugin-react": "^3.15.0",
"extend": "^3.0.0",
diff --git a/src/api/content.js b/src/api/content.js
@@ -40,9 +40,9 @@ router.get('/', async (req, res, next) => {
return;
}
- let fileName = join(CONTENT_DIR, (path === '/' ? '/index' : path) + '.jade');
+ let fileName = join(CONTENT_DIR, `${path === '/' ? '/index' : path}.jade`);
if (!(await fileExists(fileName))) {
- fileName = join(CONTENT_DIR, path + '/index.jade');
+ fileName = join(CONTENT_DIR, `${path}/index.jade`);
}
if (!(await fileExists(fileName))) {
diff --git a/src/core/DOMUtils.js b/src/core/DOMUtils.js
@@ -11,7 +11,7 @@ export function addEventListener(node, event, listener) {
if (node.addEventListener) {
node.addEventListener(event, listener, false);
} else {
- node.attachEvent('on' + event, listener);
+ node.attachEvent(`on${event}`, listener);
}
}
@@ -19,6 +19,6 @@ export function removeEventListener(node, event, listener) {
if (node.removeEventListener) {
node.removeEventListener(event, listener, false);
} else {
- node.detachEvent('on' + event, listener);
+ node.detachEvent(`on${event}`, listener);
}
}
diff --git a/src/core/fetch/fetch.server.js b/src/core/fetch/fetch.server.js
@@ -12,7 +12,7 @@ import { host } from '../../config';
function localUrl(url) {
if (url.startsWith('//')) {
- return 'https:' + url;
+ return `https:${url}`;
}
if (url.startsWith('http')) {
diff --git a/src/server.js b/src/server.js
@@ -50,7 +50,7 @@ server.get('*', async (req, res, next) => {
});
const html = ReactDOM.renderToStaticMarkup(<Html {...data} />);
- res.status(statusCode).send('<!doctype html>\n' + html);
+ res.status(statusCode).send(`<!doctype html>\n${html}`);
} catch (err) {
next(err);
}
diff --git a/tools/deploy.js b/tools/deploy.js
@@ -15,8 +15,8 @@ import fetch from './lib/fetch';
// For more information visit http://gitolite.com/deploy.html
const getRemote = (slot) => ({
name: slot ? slot : 'production',
- url: `https://example${slot ? '-' + slot : ''}.scm.azurewebsites.net:443/example.git`,
- website: `http://example${slot ? '-' + slot : ''}.azurewebsites.net`,
+ url: `https://example${slot ? `-${slot}` : ''}.scm.azurewebsites.net:443/example.git`,
+ website: `http://example${slot ? `-${slot}` : ''}.azurewebsites.net`,
});
/**
diff --git a/tools/run.js b/tools/run.js
@@ -24,7 +24,7 @@ function run(fn, options) {
if (process.mainModule.children.length === 0 && process.argv.length > 2) {
delete require.cache[__filename];
- const module = require('./' + process.argv[2] + '.js').default;
+ const module = require(`./${process.argv[2]}.js`).default;
run(module).catch(err => console.error(err.stack));
}
diff --git a/tools/webpack.config.js b/tools/webpack.config.js
@@ -76,8 +76,8 @@ const config = {
test: /\.scss$/,
loaders: [
'isomorphic-style-loader',
- 'css-loader?' + (DEBUG ? 'sourceMap&' : 'minimize&') +
- 'modules&localIdentName=[name]_[local]_[hash:base64:3]',
+ `css-loader?${DEBUG ? 'sourceMap&' : 'minimize&'}modules&localIdentName=` +
+ `${DEBUG ? '[name]_[local]_[hash:base64:3]' : '[hash:base64:4]'}`,
'postcss-loader',
],
}, {