eslint-plugin-jsdoc
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -7,2 +7,10 @@ 'use strict'; | ||
var _filter = require('lodash/collection/filter'); | ||
var _filter2 = _interopRequireDefault(_filter); | ||
var _has = require('lodash/object/has'); | ||
var _has2 = _interopRequireDefault(_has); | ||
var _map = require('lodash/collection/map'); | ||
@@ -12,11 +20,22 @@ | ||
var _filter = require('lodash/collection/filter'); | ||
var _filter2 = _interopRequireDefault(_filter); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var getJsdocParameterNames = undefined, | ||
var getFunctionParameterNames = undefined, | ||
getJsdocParameterNames = undefined, | ||
getJsdocParameterNamesDeep = undefined; | ||
getFunctionParameterNames = function (functionNode) { | ||
return (0, _map2.default)(functionNode.params, function (param) { | ||
if ((0, _has2.default)(param, 'name')) { | ||
return param.name; | ||
} | ||
if ((0, _has2.default)(param, 'left.name')) { | ||
return param.left.name; | ||
} | ||
throw new Error('Unsupported function signature format.'); | ||
}); | ||
}; | ||
getJsdocParameterNamesDeep = function (jsdoc) { | ||
@@ -47,2 +66,3 @@ var jsdocParameterNames = undefined; | ||
exports.default = { | ||
getFunctionParameterNames: getFunctionParameterNames, | ||
getJsdocParameterNames: getJsdocParameterNames, | ||
@@ -49,0 +69,0 @@ getJsdocParameterNamesDeep: getJsdocParameterNamesDeep |
@@ -7,6 +7,2 @@ 'use strict'; | ||
var _map = require('lodash/collection/map'); | ||
var _map2 = _interopRequireDefault(_map); | ||
var _includes = require('lodash/collection/includes'); | ||
@@ -94,3 +90,3 @@ | ||
functionParameterNames = (0, _map2.default)(functionNode.params, 'name'); | ||
functionParameterNames = _jsdocUtils2.default.getFunctionParameterNames(functionNode); | ||
@@ -97,0 +93,0 @@ isError = validateParameterNames(functionParameterNames, jsdoc, report); |
{ | ||
"name": "eslint-plugin-jsdoc", | ||
"description": "JSDoc linting rules for ESLint.", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"main": "./dist/index.js", | ||
@@ -47,4 +47,4 @@ "repository": { | ||
"mocha": "^2.3.4", | ||
"pragmatist": "^2.3.6" | ||
"pragmatist": "^2.3.9" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
71097
591