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

vars-on-top conflicts with 'use strict' #1235

Closed
lo1tuma opened this issue Sep 9, 2014 · 2 comments · Fixed by #1236
Closed

vars-on-top conflicts with 'use strict' #1235

lo1tuma opened this issue Sep 9, 2014 · 2 comments · Fixed by #1236
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules

Comments

@lo1tuma
Copy link
Member

lo1tuma commented Sep 9, 2014

There is a failing test-case for vars-on-top which I think should be valid:

"use strict";
var first = 0;
function foo() {
    first = 2;
}
@lo1tuma lo1tuma changed the title vars-on-top conflicts with a global 'use strict' vars-on-top conflicts with 'use strict' Sep 9, 2014
@lo1tuma
Copy link
Member Author

lo1tuma commented Sep 9, 2014

Also the following test-case fails:

function foo() {
    "use strict";
    var first = 0;
}

@michaelficarra
Copy link
Member

Working on this.

michaelficarra added a commit to michaelficarra/eslint that referenced this issue Sep 9, 2014
@nzakas nzakas added bug ESLint is working incorrectly rule Relates to ESLint's core rules labels Sep 9, 2014
nzakas added a commit that referenced this issue Sep 9, 2014
Fix: vars-on-top directive support (fixes #1235)
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants