Remove additional lint from new tasks
This commit is contained in:
@@ -59,14 +59,14 @@ function generateExterns(typedefs, symbols, externs) {
|
|||||||
|
|
||||||
function nameToJS(name) {
|
function nameToJS(name) {
|
||||||
processedSymbols[name] = true;
|
processedSymbols[name] = true;
|
||||||
if (name.indexOf('.') == -1) {
|
if (name.indexOf('.') === -1) {
|
||||||
name = 'var ' + name;
|
name = 'var ' + name;
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
function noGoogTypes(typesWithGoog) {
|
function noGoogTypes(typesWithGoog) {
|
||||||
typesWithoutGoog = [];
|
var typesWithoutGoog = [];
|
||||||
typesWithGoog.forEach(function(type) {
|
typesWithGoog.forEach(function(type) {
|
||||||
typesWithoutGoog.push(type.replace(/^goog\..*$/, '*'));
|
typesWithoutGoog.push(type.replace(/^goog\..*$/, '*'));
|
||||||
});
|
});
|
||||||
@@ -91,7 +91,7 @@ function generateExterns(typedefs, symbols, externs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lines.push('/**');
|
lines.push('/**');
|
||||||
if (symbol.kind == 'class') {
|
if (symbol.kind === 'class') {
|
||||||
constructors[name] = true;
|
constructors[name] = true;
|
||||||
lines.push(' * @constructor');
|
lines.push(' * @constructor');
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ function generateExterns(typedefs, symbols, externs) {
|
|||||||
lines.push(' * @template ' + symbol.template);
|
lines.push(' * @template ' + symbol.template);
|
||||||
}
|
}
|
||||||
lines.push(' */');
|
lines.push(' */');
|
||||||
if (symbol.kind == 'function' || symbol.kind == 'class') {
|
if (symbol.kind === 'function' || symbol.kind === 'class') {
|
||||||
lines.push(nameToJS(name) + ' = function(' + args.join(', ') + ') {};');
|
lines.push(nameToJS(name) + ' = function(' + args.join(', ') + ') {};');
|
||||||
} else {
|
} else {
|
||||||
lines.push(nameToJS(name) + ';');
|
lines.push(nameToJS(name) + ';');
|
||||||
@@ -181,7 +181,7 @@ if (require.main === module) {
|
|||||||
fse.outputFile.bind(fse, options.output)
|
fse.outputFile.bind(fse, options.output)
|
||||||
], function(err) {
|
], function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err.message);
|
process.stderr.write(err.message + '\n');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
} else {
|
} else {
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ function getNewerExterns(date, callback) {
|
|||||||
walker.on('file', function(root, stats, next) {
|
walker.on('file', function(root, stats, next) {
|
||||||
var sourcePath = path.join(root, stats.name);
|
var sourcePath = path.join(root, stats.name);
|
||||||
externsPaths.forEach(function(path) {
|
externsPaths.forEach(function(path) {
|
||||||
if (sourcePath == path && stats.mtime > date) {
|
if (sourcePath === path && stats.mtime > date) {
|
||||||
newer = true;
|
newer = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user