Comparing version 1.0.11 to 1.0.12
@@ -0,1 +1,4 @@ | ||
Version 1.0.12: | ||
* Fixes for jsdoc params. | ||
Version 1.0.11: | ||
@@ -2,0 +5,0 @@ * Prefix unary rules: `disallowSpaceAfterPrefixUnaryOperators`, `requireSpaceAfterPrefixUnaryOperators`. |
@@ -31,3 +31,3 @@ var assert = require('assert'); | ||
if (line.indexOf('@param') === 0) { | ||
var match = line.match(/^@param\s+(?:{([^}]+)})?\s*(?:\[)?([a-zA-Z0-9_\.\$]+)/); | ||
var match = line.match(/^@param\s+(?:{(.+?)})?\s*(?:\[)?([a-zA-Z0-9_\.\$]+)/); | ||
if (match) { | ||
@@ -34,0 +34,0 @@ var jsDocParamType = match[1]; |
@@ -5,3 +5,3 @@ { | ||
"name" : "jscs", | ||
"version" : "1.0.11", | ||
"version" : "1.0.12", | ||
"repository" : "https://github.com/mdevils/node-jscs", | ||
@@ -8,0 +8,0 @@ "contributors" : [ |
@@ -200,3 +200,31 @@ var Checker = require('../lib/checker'); | ||
}); | ||
it('should not report valid jsdoc with object type for method', function() { | ||
checker.configure({ validateJSDoc: { requireParamTypes: true } }); | ||
assert( | ||
checker.checkString( | ||
'var x = 1;\n' + | ||
'/**\n' + | ||
' * @param {{foo: string}} xxx\n' + | ||
' */\n' + | ||
'function funcName(xxx) {\n' + | ||
'\n' + | ||
'}' | ||
).isEmpty() | ||
); | ||
}); | ||
it('should not report valid jsdoc with object type for function', function() { | ||
checker.configure({ validateJSDoc: { requireParamTypes: true } }); | ||
assert( | ||
checker.checkString( | ||
'Cls.prototype = {\n' + | ||
' /**\n' + | ||
' * @param {{foo: string}} xxx\n' + | ||
' */\n' + | ||
' run: function(xxx) {\n' + | ||
' \n' + | ||
' }\n' + | ||
'};' | ||
).isEmpty() | ||
); | ||
}); | ||
}); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
404971
10079