Update gulp-eslint and minor style fixes to adapt to new eslint version

This commit is contained in:
Björn Harrtell 2016-03-31 21:17:41 +02:00
parent 1d8ecb705a
commit 34c6eb9ffd
14 changed files with 16 additions and 10 deletions

View File

@ -48,7 +48,6 @@
"no-caller": 2,
"no-div-regex": 2,
"no-else-return": 0,
"no-empty-label": 2,
"no-eq-null": 2,
"no-eval": 2,
"no-extra-bind": 2,
@ -156,12 +155,11 @@
"semi": [2, "always"],
"semi-spacing": 2,
"sort-vars": 0,
"space-after-keywords": [2, "always"],
"keyword-spacing": 2,
"space-before-blocks": [2, "always"],
"space-in-brackets": 0, // TODO: enable?
"space-in-parens": 0, // TODO: enable?
"space-infix-ops": 2,
"space-return-throw-case": 2,
"space-unary-ops": 2,
"spaced-comment": [2, "always"],
"wrap-regex": 0,

View File

@ -48,7 +48,7 @@ gulp.task('coverage', function(cb) {
});
gulp.task('lint', function() {
var pipeline = gulp.src(options.lintPaths)
return gulp.src(options.lintPaths)
.pipe(eslint())
.pipe(eslint.formatEach())
.pipe(eslint.failOnError());

View File

@ -86,4 +86,5 @@ exports.get = function(name) {
else if ( hasOwnProp.call(ourOptions, name) ) {
return ourOptions[name];
}
return undefined;
};

View File

@ -363,6 +363,7 @@ var getInfo = exports.getInfo = function(node) {
info.paramnames = getParamNames(definition.value);
return true;
}
return false;
});
break;

View File

@ -299,6 +299,8 @@ function newSymbolDoclet(parser, docletSrc, e) {
addDoclet(parser, newDoclet);
e.doclet = newDoclet;
return true;
}
/**

View File

@ -319,6 +319,7 @@ Parser.prototype.getBasename = function(name) {
if (name !== undefined) {
return name.replace(/^([$a-z_][$a-z_0-9]*).*?$/i, '$1');
}
return undefined;
};
// TODO: docs

View File

@ -132,6 +132,7 @@ function findRestParam(params) {
restParam = param;
return true;
}
return false;
});
return restParam;

View File

@ -175,6 +175,7 @@ function parseBorrows(doclet, tag) {
else if (m[1]) {
return { target: m[1] };
}
return {};
} else {
return {};
}

View File

@ -153,6 +153,7 @@ function getParseFunction(parserName, conf) {
else {
logger.error('Unrecognized Markdown parser "%s". Markdown support is disabled.',
parserName);
return undefined;
}
}

View File

@ -21,14 +21,14 @@
"js2xmlparser": "~1.0.0",
"marked": "~0.3.5",
"requizzle": "~0.2.1",
"strip-json-comments": "~1.0.4",
"strip-json-comments": "~2.0.1",
"taffydb": "https://github.com/hegemonic/taffydb/tarball/7d100bcee0e997ee4977e273cdce60bd8933050e",
"underscore": "~1.8.3",
"wrench": "~1.5.9"
},
"devDependencies": {
"gulp": "~3.9.1",
"gulp-eslint": "~1.1.1",
"gulp-eslint": "~2.0.0",
"gulp-json-editor": "~2.2.1",
"istanbul": "~0.4.2",
"tv4": "https://github.com/hegemonic/tv4/tarball/own-properties"

View File

@ -37,7 +37,7 @@ exports.handlers = {
try {
value = JSON.parse(tag.value);
}
catch (e) {
catch (ex) {
logger.error('@source tag expects a valid JSON value, like { "filename": "myfile.js", "lineno": 123 }.');
return;
}

View File

@ -239,7 +239,7 @@ function generateSourceFiles(sourceFiles, encoding) {
code: helper.htmlsafe( fs.readFileSync(sourceFiles[file].resolved, encoding) )
};
}
catch(e) {
catch (e) {
logger.error('Error while generating source file %s: %s', file, e.message);
}

View File

@ -1,4 +1,4 @@
/*eslint no-nested-ternary:0, space-infix-ops: 0 */
/* eslint no-nested-ternary:0, space-infix-ops: 0 */
/**
@overview Builds a tree-like JSON string from the doclet data.
@version 0.0.3

View File

@ -1,4 +1,4 @@
/*eslint quotes:0 */
/* eslint quotes:0 */
'use strict';
var hasOwnProp = Object.prototype.hasOwnProperty;