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

latedef:true erroneously flags named exports as used before define #2658

Closed
mikesherov opened this issue Sep 3, 2015 · 4 comments
Closed

Comments

@mikesherov
Copy link
Contributor

Version: 2.9.0, regressed from ~2.8.0

/*jshint latedef: true, esnext: true*/
export function hi() {
 return 1;
}

results in:

2   'hi' was used before it was defined.
@craigatk
Copy link

craigatk commented Sep 3, 2015

I'm also seeing latedef enforced in 2.9.0 when I'm using a function before it's defined and I have "latedef": true in my .jshintrc file.

@exavatar
Copy link

exavatar commented Sep 3, 2015

I am seeing jshint, with latedef:true, flag variables as they are being defined:

    837 |    var _instance;
                 ^ '_instance' was used before it was defined.

@lukeapage
Copy link
Member

@exavatar and @craigatk please can you post seperate issues with code samples? the export function is fixed in a pr, but your comments suggest different issues.
They may be regressions or they may be code that should have given a warning previously but didn't (e. g. jshint fixed a bug with a warning). No one else has reported those problems and we have tests covering what you describe so we need more info. Thanks.

@craigatk
Copy link

craigatk commented Sep 4, 2015

@lukeapage you're right, my case was likely caused by a code that should have given a warning before but didn't. Sorry for the confusion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants