style(eslint): match operator-linebreak preferences

This commit is contained in:
Peter Jaszkowiak
2018-11-28 20:29:43 -07:00
committed by Julian Lam
parent 89c025d102
commit ba619c7ec8
40 changed files with 241 additions and 238 deletions

View File

@@ -106,16 +106,16 @@ function getStaticDirectories(pluginData, callback) {
async.each(dirs, function (route, next) {
if (!validMappedPath.test(route)) {
winston.warn('[plugins/' + pluginData.id + '] Invalid mapped path specified: '
+ route + '. Path must adhere to: ' + validMappedPath.toString());
winston.warn('[plugins/' + pluginData.id + '] Invalid mapped path specified: ' +
route + '. Path must adhere to: ' + validMappedPath.toString());
return next();
}
var dirPath = path.join(pluginData.path, pluginData.staticDirs[route]);
fs.stat(dirPath, function (err, stats) {
if (err && err.code === 'ENOENT') {
winston.warn('[plugins/' + pluginData.id + '] Mapped path \''
+ route + ' => ' + dirPath + '\' not found.');
winston.warn('[plugins/' + pluginData.id + '] Mapped path \'' +
route + ' => ' + dirPath + '\' not found.');
return next();
}
if (err) {
@@ -123,8 +123,8 @@ function getStaticDirectories(pluginData, callback) {
}
if (!stats.isDirectory()) {
winston.warn('[plugins/' + pluginData.id + '] Mapped path \''
+ route + ' => ' + dirPath + '\' is not a directory.');
winston.warn('[plugins/' + pluginData.id + '] Mapped path \'' +
route + ' => ' + dirPath + '\' is not a directory.');
return next();
}
@@ -135,8 +135,8 @@ function getStaticDirectories(pluginData, callback) {
if (err) {
return callback(err);
}
winston.verbose('[plugins] found ' + Object.keys(staticDirs).length
+ ' static directories for ' + pluginData.id);
winston.verbose('[plugins] found ' + Object.keys(staticDirs).length +
' static directories for ' + pluginData.id);
callback(null, staticDirs);
});
}

View File

@@ -34,10 +34,10 @@ module.exports = function (Plugins) {
var method;
if (Object.keys(Plugins.deprecatedHooks).includes(data.hook)) {
winston.warn('[plugins/' + id + '] Hook `' + data.hook + '` is deprecated, '
+ (Plugins.deprecatedHooks[data.hook]
? 'please use `' + Plugins.deprecatedHooks[data.hook] + '` instead.'
: 'there is no alternative.'
winston.warn('[plugins/' + id + '] Hook `' + data.hook + '` is deprecated, ' +
(Plugins.deprecatedHooks[data.hook] ?
'please use `' + Plugins.deprecatedHooks[data.hook] + '` instead.' :
'there is no alternative.'
));
}