fix eslint errors
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/*jshint curly: false */
|
||||
/* jshint curly: false */
|
||||
var async = require('async');
|
||||
var fs = require('fs');
|
||||
var spawn = require('../_spawn');
|
||||
@ -206,7 +206,7 @@ function createArchive(branch) {
|
||||
spawnStep('mkdir', [dir], paths.root),
|
||||
spawnStep('git', ['archive', '--format', 'tar', '--output', tarball, branch, specPathInRepo], paths.esSrc),
|
||||
spawnStep('tar', ['-x', '-f', tarball, '-C', dir, '--strip-components', subDirCount]),
|
||||
spawnStep('rm', [tarball])
|
||||
spawnStep('rm', [tarball])
|
||||
], done);
|
||||
};
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ module.exports = function (branch, done) {
|
||||
);
|
||||
}
|
||||
|
||||
function __puke__transformSpec(spec) {
|
||||
function __puke__transformSpec(spec) { // eslint-disable-line
|
||||
var actions = [];
|
||||
|
||||
// itterate all of the specs within the file, should only be one
|
||||
|
||||
@ -187,6 +187,7 @@ module.exports = [
|
||||
version: '>=1.6.0',
|
||||
|
||||
// strange indentation makes pretty api files
|
||||
/* eslint-disable */
|
||||
clientActionModifier:
|
||||
function (spec) {
|
||||
return require('../utils').merge(spec, {
|
||||
@ -198,6 +199,7 @@ function (spec) {
|
||||
}
|
||||
});
|
||||
}
|
||||
/* eslint-enable */
|
||||
|
||||
},
|
||||
{
|
||||
|
||||
@ -15,7 +15,7 @@ var path = require('path');
|
||||
*/
|
||||
function stringify(thing, pretty) {
|
||||
return (pretty ? JSON.stringify(thing, null, ' ') : JSON.stringify(thing))
|
||||
.replace(/\'/g, '\\\'')
|
||||
.replace(/'/g, '\\\'')
|
||||
.replace(/\\?"/g, function (quote) {
|
||||
// replace external (unescaped) double quotes with single quotes
|
||||
return quote === '\\"' ? '"' : '\'';
|
||||
@ -70,16 +70,16 @@ var templateGlobals = {
|
||||
|
||||
paramType: function (type) {
|
||||
switch (type && type.toLowerCase ? type.toLowerCase() : 'any') {
|
||||
case 'time':
|
||||
return 'Date, Number';
|
||||
case 'any':
|
||||
return 'Anything';
|
||||
case 'enum':
|
||||
return 'String';
|
||||
case 'list':
|
||||
return 'String, String[], Boolean';
|
||||
default:
|
||||
return _.ucfirst(type);
|
||||
case 'time':
|
||||
return 'Date, Number';
|
||||
case 'any':
|
||||
return 'Anything';
|
||||
case 'enum':
|
||||
return 'String';
|
||||
case 'list':
|
||||
return 'String, String[], Boolean';
|
||||
default:
|
||||
return _.ucfirst(type);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -55,4 +55,4 @@ module.exports = function (branch, done) {
|
||||
console.log(chalk.white.bold('wrote') + ' YAML index to', file);
|
||||
done();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user