Comply with new eslint rules

This commit is contained in:
QWp6t
2016-09-11 18:48:34 -07:00
parent c96905b075
commit b79f389170
4 changed files with 5 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ module.exports = (entry) => {
reload: false,
})}`;
Object.keys(entry).forEach(name => {
Object.keys(entry).forEach((name) => {
results[name] = Array.isArray(entry[name]) ? entry[name].slice(0) : [entry[name]];
results[name].push(hotMiddlewareScript);
});

View File

@@ -8,8 +8,8 @@ const path = require('path');
*/
module.exports = (assets) => {
const results = {};
Object.keys(assets).forEach(name => {
Object.keys(assets[name]).forEach(ext => {
Object.keys(assets).forEach((name) => {
Object.keys(assets[name]).forEach((ext) => {
const filename = `${path.dirname(assets[name][ext])}/${path.basename(`${name}.${ext}`)}`;
results[filename] = assets[name][ext];
});

View File

@@ -1,5 +1,5 @@
import $ from 'jquery';
wp.customize('blogname', (value) => {
value.bind((to) => $('.brand').text(to));
value.bind(to => $('.brand').text(to));
});

View File

@@ -1,5 +1,5 @@
// the most terrible camelizer on the internet, guaranteed!
export default (str) => `${str.charAt(0).toLowerCase()}${str.replace(/[\W_]/g, '|').split('|')
export default str => `${str.charAt(0).toLowerCase()}${str.replace(/[\W_]/g, '|').split('|')
.map(part => `${part.charAt(0).toUpperCase()}${part.slice(1)}`)
.join('')
.slice(1)}`;