Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enforceExistence rule not work properly for anonymous function. #189

Closed
annsk opened this issue Feb 3, 2016 · 3 comments
Closed

enforceExistence rule not work properly for anonymous function. #189

annsk opened this issue Feb 3, 2016 · 3 comments
Labels

Comments

@annsk
Copy link

annsk commented Feb 3, 2016

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 qfox added the question label Feb 3, 2016
@qfox
Copy link
Member

qfox commented Feb 3, 2016

What the config you have?

Did you tried "enforceExistence": {"allExcept": ["expressions", "paramless-procedures"]}?

See also: http://jscs.info/rule/jsDoc#enforceexistence

@annsk
Copy link
Author

annsk commented Feb 3, 2016

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
Copy link
Member

qfox commented Feb 3, 2016

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 ;-)

@qfox qfox closed this as completed Feb 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants