eslint-plugin-jsdoc
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -13,10 +13,12 @@ 'use strict'; | ||
exports.default = iterator => { | ||
return context => { | ||
let checkJsdoc, sourceCode; | ||
exports.default = function (iterator) { | ||
return function (context) { | ||
var checkJsdoc = undefined, | ||
sourceCode = undefined; | ||
sourceCode = context.getSourceCode(); | ||
checkJsdoc = functionNode => { | ||
let jsdocNode, jsdoc; | ||
checkJsdoc = function (functionNode) { | ||
var jsdocNode = undefined, | ||
jsdoc = undefined; | ||
@@ -26,3 +28,3 @@ jsdocNode = sourceCode.getJSDocComment(functionNode); | ||
iterator(functionNode, jsdocNode, jsdoc, message => { | ||
iterator(functionNode, jsdocNode, jsdoc, function (message) { | ||
context.report(jsdocNode, message); | ||
@@ -33,3 +35,3 @@ }, context); | ||
return { | ||
ArrowExpression: checkJsdoc, | ||
ArrowFunctionExpression: checkJsdoc, | ||
FunctionDeclaration: checkJsdoc, | ||
@@ -36,0 +38,0 @@ FunctionExpression: checkJsdoc |
@@ -17,6 +17,6 @@ 'use strict'; | ||
let getJsdocParameterNames; | ||
var getJsdocParameterNames = undefined; | ||
getJsdocParameterNames = jsdoc => { | ||
let jsdocParameterNames; | ||
getJsdocParameterNames = function (jsdoc) { | ||
var jsdocParameterNames = undefined; | ||
@@ -28,3 +28,3 @@ jsdocParameterNames = (0, _filter2.default)(jsdoc.tags, { | ||
jsdocParameterNames = (0, _filter2.default)(jsdocParameterNames, name => { | ||
jsdocParameterNames = (0, _filter2.default)(jsdocParameterNames, function (name) { | ||
return name.indexOf('.') === -1; | ||
@@ -37,5 +37,5 @@ }); | ||
exports.default = { | ||
getJsdocParameterNames | ||
getJsdocParameterNames: getJsdocParameterNames | ||
}; | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=jsdocUtils.js.map |
@@ -25,4 +25,5 @@ 'use strict'; | ||
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => { | ||
let functionParameterNames, jsdocParameterNames; | ||
exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) { | ||
var functionParameterNames = undefined, | ||
jsdocParameterNames = undefined; | ||
@@ -32,4 +33,4 @@ functionParameterNames = (0, _map2.default)(functionNode.params, 'name'); | ||
(0, _some2.default)(jsdocParameterNames, (jsdocParameterName, i) => { | ||
let functionParameterName; | ||
(0, _some2.default)(jsdocParameterNames, function (jsdocParameterName, i) { | ||
var functionParameterName = undefined; | ||
@@ -36,0 +37,0 @@ functionParameterName = functionParameterNames[i]; |
@@ -21,8 +21,8 @@ 'use strict'; | ||
let validTags; | ||
var validTags = undefined; | ||
validTags = ['abstract', 'access', 'alias', 'augments', 'author', 'borrows', 'callback', 'class', 'classdesc', 'constant', 'constructs', 'copyright', 'default', 'deprecated', 'description', 'enum', 'event', 'example', 'exports', 'external', 'file', 'fires', 'function', 'global', 'ignore', 'implements', 'inheritdoc', 'inner', 'instance', 'interface', 'kind', 'lends', 'license', 'listens', 'member', 'memberof', 'mixes', 'mixin', 'module', 'name', 'namespace', 'override', 'param', 'private', 'property', 'protected', 'public', 'readonly', 'requires', 'returns', 'see', 'since', 'static', 'summary', 'this', 'throws', 'todo', 'tutorial', 'type', 'typedef', 'variation', 'version']; | ||
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => { | ||
(0, _forEach2.default)(jsdoc.tags, jsdocTag => { | ||
exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) { | ||
(0, _forEach2.default)(jsdoc.tags, function (jsdocTag) { | ||
if (!(0, _includes2.default)(validTags, jsdocTag.tag)) { | ||
@@ -29,0 +29,0 @@ report('Invalid JSDoc tag name "' + jsdocTag.tag + '".'); |
@@ -29,3 +29,4 @@ 'use strict'; | ||
let targetTags, strictNativeTypes; | ||
var targetTags = undefined, | ||
strictNativeTypes = undefined; | ||
@@ -36,11 +37,11 @@ targetTags = ['class', 'constant', 'enum', 'member', 'module', 'namespace', 'param', 'property', 'returns', 'throws', 'type', 'typedef']; | ||
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => { | ||
let jsdocTags; | ||
exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) { | ||
var jsdocTags = undefined; | ||
jsdocTags = (0, _filter2.default)(jsdoc.tags, tag => { | ||
jsdocTags = (0, _filter2.default)(jsdoc.tags, function (tag) { | ||
return (0, _includes2.default)(targetTags, tag.tag); | ||
}); | ||
(0, _forEach2.default)(jsdocTags, jsdocTag => { | ||
(0, _some2.default)(strictNativeTypes, strictNativeType => { | ||
(0, _forEach2.default)(jsdocTags, function (jsdocTag) { | ||
(0, _some2.default)(strictNativeTypes, function (strictNativeType) { | ||
if (strictNativeType.toLowerCase() === jsdocTag.type.toLowerCase() && strictNativeType !== jsdocTag.type) { | ||
@@ -47,0 +48,0 @@ report('Invalid JSDoc @' + jsdocTag.tag + ' "' + jsdocTag.name + '" type "' + jsdocTag.type + '".'); |
@@ -25,4 +25,5 @@ 'use strict'; | ||
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report, context) => { | ||
let always, descriptionEndsWithANewline; | ||
exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report, context) { | ||
var always = undefined, | ||
descriptionEndsWithANewline = undefined; | ||
@@ -29,0 +30,0 @@ if (!jsdoc.description || !jsdoc.tags.length) { |
@@ -29,4 +29,4 @@ 'use strict'; | ||
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => { | ||
let jsdocTags; | ||
exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) { | ||
var jsdocTags = undefined; | ||
@@ -37,3 +37,3 @@ jsdocTags = (0, _filter2.default)(jsdoc.tags, { | ||
(0, _forEach2.default)(jsdocTags, jsdocTag => { | ||
(0, _forEach2.default)(jsdocTags, function (jsdocTag) { | ||
if (jsdocTag.description && !(0, _startsWith2.default)(jsdocTag.description, '-')) { | ||
@@ -40,0 +40,0 @@ report('There must be a hyphen before @param description.'); |
@@ -25,4 +25,5 @@ 'use strict'; | ||
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => { | ||
let functionParameterNames, jsdocParameterNames; | ||
exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) { | ||
var functionParameterNames = undefined, | ||
jsdocParameterNames = undefined; | ||
@@ -32,4 +33,4 @@ functionParameterNames = (0, _map2.default)(functionNode.params, 'name'); | ||
(0, _some2.default)(functionParameterNames, (functionParameterName, i) => { | ||
let jsdocParameterName; | ||
(0, _some2.default)(functionParameterNames, function (functionParameterName, i) { | ||
var jsdocParameterName = undefined; | ||
@@ -36,0 +37,0 @@ jsdocParameterName = jsdocParameterNames[i]; |
@@ -25,4 +25,4 @@ 'use strict'; | ||
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => { | ||
let jsdocParameters; | ||
exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) { | ||
var jsdocParameters = undefined; | ||
@@ -33,3 +33,3 @@ jsdocParameters = (0, _filter2.default)(jsdoc.tags, { | ||
(0, _forEach2.default)(jsdocParameters, jsdocParameter => { | ||
(0, _forEach2.default)(jsdocParameters, function (jsdocParameter) { | ||
if (!jsdocParameter.description) { | ||
@@ -36,0 +36,0 @@ report('Missing JSDoc @param "' + jsdocParameter.name + '" description.'); |
@@ -21,4 +21,4 @@ 'use strict'; | ||
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => { | ||
let jsdocParameters; | ||
exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) { | ||
var jsdocParameters = undefined; | ||
@@ -29,3 +29,3 @@ jsdocParameters = (0, _filter2.default)(jsdoc.tags, { | ||
(0, _forEach2.default)(jsdocParameters, jsdocParameter => { | ||
(0, _forEach2.default)(jsdocParameters, function (jsdocParameter) { | ||
if (!jsdocParameter.type) { | ||
@@ -32,0 +32,0 @@ report('Missing JSDoc @param "' + jsdocParameter.name + '" type.'); |
@@ -21,4 +21,4 @@ 'use strict'; | ||
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => { | ||
let jsdocTags; | ||
exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) { | ||
var jsdocTags = undefined; | ||
@@ -29,4 +29,4 @@ jsdocTags = (0, _filter2.default)(jsdoc.tags, { | ||
(0, _forEach2.default)(jsdocTags, jsdocTag => { | ||
let description; | ||
(0, _forEach2.default)(jsdocTags, function (jsdocTag) { | ||
var description = undefined; | ||
@@ -33,0 +33,0 @@ // @see https://github.com/yavorskiy/comment-parser/issues/21 |
@@ -21,4 +21,4 @@ 'use strict'; | ||
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => { | ||
let jsdocTags; | ||
exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) { | ||
var jsdocTags = undefined; | ||
@@ -29,3 +29,3 @@ jsdocTags = (0, _filter2.default)(jsdoc.tags, { | ||
(0, _forEach2.default)(jsdocTags, jsdocTag => { | ||
(0, _forEach2.default)(jsdocTags, function (jsdocTag) { | ||
if (!jsdocTag.type) { | ||
@@ -32,0 +32,0 @@ report('Missing JSDoc @returns type.'); |
{ | ||
"name": "eslint-plugin-jsdoc", | ||
"description": "JSDoc specific linting rules for ESLint.", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"main": "./dist/index.js", | ||
@@ -6,0 +6,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
54673
459