Skip to content

enforceExistence "overlooks" certain method definitions #21

@antoncl

Description

@antoncl

Not all functions are checked for missing jsdoc tag definitions.

I have created a minimum example:

MyNamespace = MyNamespace || {};

MyNamespace.Test = function () {
};

(function () {
    MyNamespace.Test.prototype.foo = function() {
        function bar() {
        }
    };
})();

Using a .jscsrc configuration like this:

{
    "additionalRules": [
        "node_modules/jscs-jsdoc/lib/rules/*.js"
    ],
    "requireSpaceAfterKeywords": ["function"],
    "jsDoc": {
        "enforceExistence": true
    }
}

Produces these errors:

js\\Test.js: line 3, col 27, Should be one space instead of 0, after "function" keyword
js\\Test.js: line 7, col 45, Should be one space instead of 0, after "function" keyword
js\\Test.js: line 8, col 8, jsdoc definition required

Clearly JSCS detects the function definitions in lines 3 and 7, but JSCS-JSDoc fails to report the missing JSDoc tags

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions