-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
ecmaFeatures.modules conflicts with block-scoped-var #2967
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
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
@eslint/eslint-team input please. |
@gmathieu what about if modules is false? Is the behavior different? |
I confirmed this issue, and #3126 fixes this. (If modules flag is false, both are no errors as expected.) test.js(function () {
fnDeclaredBelow(); // error: fnDeclaredBelow used outside of binding context
})();
function fnDeclaredBelow () {
return true;
} .eslintrc
Command & Actual
No errors. ExpectedNo errors. |
@mysticatea can you add a test case for this in #3126? |
@nzakas Sure. |
mysticatea
added a commit
to mysticatea/eslint
that referenced
this issue
Jul 27, 2015
mysticatea
added a commit
to mysticatea/eslint
that referenced
this issue
Jul 27, 2015
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
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
When
ecmaFeatures.module=true
, functions calls before declaration throws ablock-scoped-var
error. This test is using the default parserv0.24.1
but I believe I've seen something similar usingbabel-eslint
.Here's the associated
.eslintrc
. If you switch module tofalse
the above code validates properly.The text was updated successfully, but these errors were encountered: