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

error when using function hoisting #161

Closed
scottburch opened this issue May 16, 2011 · 1 comment
Closed

error when using function hoisting #161

scottburch opened this issue May 16, 2011 · 1 comment

Comments

@scottburch
Copy link

The following will give the error "Inner functions should be listed at the top of the outer function."

Can we have an option to turn off this check? It looks pretty straight forward in the code. I noticed that another ticket was put in for something similar (using functions before they are defined) and that became the default behavior. Shouldn't This should probably fall under the same principal?

function foo() {
return {
bar: function() {return bar();}
};
function bar() {
return 10;
}
}

console.log(foo().bar());

goatslacker added a commit to goatslacker/jshint that referenced this issue Jan 8, 2012
goatslacker added a commit to goatslacker/jshint that referenced this issue Jan 9, 2012
@goatslacker
Copy link
Member

Fixed in d17ce8d.

jugglinmike pushed a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014
jugglinmike pushed a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014
jugglinmike pushed a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants