enforceExistence rule not work properly for anonymous function.
annsk opened this issue · 3 comments
annsk commented
For function in this code jscs throw error. It should be param for suppress it.
var modalInstance = $modal.open({
templateUrl: 'modalColor.html',
controller: 'ModalColorCtrl as mColor',
resolve : {
colors: function() {
return 1;
}
}
});
qfox commented
What the config you have?
Did you tried "enforceExistence": {"allExcept": ["expressions", "paramless-procedures"]}
?
annsk commented
Ok, it works. I'd old version. But now I have next problem.
In my config I has:
"disallowSpaceAfterObjectKeys": { "allExcept": ["aligned", "singleline"] },
"requireAlignedObjectValues": "all",
But here:
White: {
outer: 'NONE',
inner: 'NONE',
core : 'WHITE'
}
I got an error: Illegal space after key (in line with key "core").
qfox commented
Thanks for report, that's a known bug: jscs-dev/node-jscs#2080, but it doesn't belongs to jscs-jsdoc.
If you have any other question, feel free to ask ;-)