Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-jsdoc

Package Overview
Dependencies
Maintainers
1
Versions
662
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-jsdoc - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

19

dist/iterateJsdoc.js

@@ -13,12 +13,10 @@ 'use strict';

exports.default = function (iterator) {
return function (context) {
var checkJsdoc = undefined,
sourceCode = undefined;
exports.default = iterator => {
return context => {
let checkJsdoc, sourceCode;
sourceCode = context.getSourceCode();
checkJsdoc = function (functionNode) {
var jsdocNode = undefined,
jsdoc = undefined;
checkJsdoc = functionNode => {
let jsdocNode, jsdoc;

@@ -28,3 +26,3 @@ jsdocNode = sourceCode.getJSDocComment(functionNode);

iterator(functionNode, jsdocNode, jsdoc, function (message) {
iterator(functionNode, jsdocNode, jsdoc, message => {
context.report(jsdocNode, message);

@@ -35,4 +33,5 @@ }, context);

return {
'FunctionDeclaration': checkJsdoc,
'FunctionExpression': checkJsdoc
ArrowExpression: checkJsdoc,
FunctionDeclaration: checkJsdoc,
FunctionExpression: checkJsdoc
};

@@ -39,0 +38,0 @@ };

@@ -17,6 +17,6 @@ 'use strict';

var getJsdocParameterNames = undefined;
let getJsdocParameterNames;
getJsdocParameterNames = function (jsdoc) {
var jsdocParameterNames = undefined;
getJsdocParameterNames = jsdoc => {
let jsdocParameterNames;

@@ -28,3 +28,3 @@ jsdocParameterNames = (0, _filter2.default)(jsdoc.tags, {

jsdocParameterNames = (0, _filter2.default)(jsdocParameterNames, function (name) {
jsdocParameterNames = (0, _filter2.default)(jsdocParameterNames, name => {
return name.indexOf('.') === -1;

@@ -37,5 +37,5 @@ });

exports.default = {
getJsdocParameterNames: getJsdocParameterNames
getJsdocParameterNames
};
module.exports = exports['default'];
//# sourceMappingURL=jsdocUtils.js.map

@@ -25,5 +25,4 @@ 'use strict';

exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) {
var functionParameterNames = undefined,
jsdocParameterNames = undefined;
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => {
let functionParameterNames, jsdocParameterNames;

@@ -33,4 +32,4 @@ functionParameterNames = (0, _map2.default)(functionNode.params, 'name');

(0, _some2.default)(jsdocParameterNames, function (jsdocParameterName, i) {
var functionParameterName = undefined;
(0, _some2.default)(jsdocParameterNames, (jsdocParameterName, i) => {
let functionParameterName;

@@ -37,0 +36,0 @@ functionParameterName = functionParameterNames[i];

@@ -21,8 +21,8 @@ 'use strict';

var validTags = undefined;
let validTags;
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)(function (functionNode, jsdocNode, jsdoc, report) {
(0, _forEach2.default)(jsdoc.tags, function (jsdocTag) {
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => {
(0, _forEach2.default)(jsdoc.tags, jsdocTag => {
if (!(0, _includes2.default)(validTags, jsdocTag.tag)) {

@@ -29,0 +29,0 @@ report('Invalid JSDoc tag name "' + jsdocTag.tag + '".');

@@ -29,4 +29,3 @@ 'use strict';

var targetTags = undefined,
strictNativeTypes = undefined;
let targetTags, strictNativeTypes;

@@ -37,11 +36,11 @@ targetTags = ['class', 'constant', 'enum', 'member', 'module', 'namespace', 'param', 'property', 'returns', 'throws', 'type', 'typedef'];

exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) {
var jsdocTags = undefined;
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => {
let jsdocTags;
jsdocTags = (0, _filter2.default)(jsdoc.tags, function (tag) {
jsdocTags = (0, _filter2.default)(jsdoc.tags, tag => {
return (0, _includes2.default)(targetTags, tag.tag);
});
(0, _forEach2.default)(jsdocTags, function (jsdocTag) {
(0, _some2.default)(strictNativeTypes, function (strictNativeType) {
(0, _forEach2.default)(jsdocTags, jsdocTag => {
(0, _some2.default)(strictNativeTypes, strictNativeType => {
if (strictNativeType.toLowerCase() === jsdocTag.type.toLowerCase() && strictNativeType !== jsdocTag.type) {

@@ -48,0 +47,0 @@ report('Invalid JSDoc @' + jsdocTag.tag + ' "' + jsdocTag.name + '" type "' + jsdocTag.type + '".');

@@ -25,5 +25,4 @@ 'use strict';

exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report, context) {
var always = undefined,
descriptionEndsWithANewline = undefined;
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report, context) => {
let always, descriptionEndsWithANewline;

@@ -30,0 +29,0 @@ if (!jsdoc.description || !jsdoc.tags.length) {

@@ -29,4 +29,4 @@ 'use strict';

exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) {
var jsdocTags = undefined;
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => {
let jsdocTags;

@@ -37,3 +37,3 @@ jsdocTags = (0, _filter2.default)(jsdoc.tags, {

(0, _forEach2.default)(jsdocTags, function (jsdocTag) {
(0, _forEach2.default)(jsdocTags, jsdocTag => {
if (jsdocTag.description && !(0, _startsWith2.default)(jsdocTag.description, '-')) {

@@ -40,0 +40,0 @@ report('There must be a hyphen before @param description.');

@@ -25,5 +25,4 @@ 'use strict';

exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) {
var functionParameterNames = undefined,
jsdocParameterNames = undefined;
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => {
let functionParameterNames, jsdocParameterNames;

@@ -33,4 +32,4 @@ functionParameterNames = (0, _map2.default)(functionNode.params, 'name');

(0, _some2.default)(functionParameterNames, function (functionParameterName, i) {
var jsdocParameterName = undefined;
(0, _some2.default)(functionParameterNames, (functionParameterName, i) => {
let jsdocParameterName;

@@ -37,0 +36,0 @@ jsdocParameterName = jsdocParameterNames[i];

@@ -25,4 +25,4 @@ 'use strict';

exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) {
var jsdocParameters = undefined;
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => {
let jsdocParameters;

@@ -33,3 +33,3 @@ jsdocParameters = (0, _filter2.default)(jsdoc.tags, {

(0, _forEach2.default)(jsdocParameters, function (jsdocParameter) {
(0, _forEach2.default)(jsdocParameters, 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)(function (functionNode, jsdocNode, jsdoc, report) {
var jsdocParameters = undefined;
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => {
let jsdocParameters;

@@ -29,3 +29,3 @@ jsdocParameters = (0, _filter2.default)(jsdoc.tags, {

(0, _forEach2.default)(jsdocParameters, function (jsdocParameter) {
(0, _forEach2.default)(jsdocParameters, 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)(function (functionNode, jsdocNode, jsdoc, report) {
var jsdocTags = undefined;
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => {
let jsdocTags;

@@ -29,4 +29,4 @@ jsdocTags = (0, _filter2.default)(jsdoc.tags, {

(0, _forEach2.default)(jsdocTags, function (jsdocTag) {
var description = undefined;
(0, _forEach2.default)(jsdocTags, jsdocTag => {
let description;

@@ -33,0 +33,0 @@ // @see https://github.com/yavorskiy/comment-parser/issues/21

@@ -21,4 +21,4 @@ 'use strict';

exports.default = (0, _iterateJsdoc2.default)(function (functionNode, jsdocNode, jsdoc, report) {
var jsdocTags = undefined;
exports.default = (0, _iterateJsdoc2.default)((functionNode, jsdocNode, jsdoc, report) => {
let jsdocTags;

@@ -29,3 +29,3 @@ jsdocTags = (0, _filter2.default)(jsdoc.tags, {

(0, _forEach2.default)(jsdocTags, function (jsdocTag) {
(0, _forEach2.default)(jsdocTags, 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.2",
"version": "2.0.3",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc