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

lint shows "redeclare" error when using the same name in another file #1043

Closed
kyeotic opened this issue May 12, 2022 · 2 comments
Closed

lint shows "redeclare" error when using the same name in another file #1043

kyeotic opened this issue May 12, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@kyeotic
Copy link

kyeotic commented May 12, 2022

Lint Name

Cannot redeclare block-scoped variable '_a'.deno-ts(2451)

Code Snippet

Place this in two files.

const _a = '1'

Expected Result

No error

Actual Result

Cannot redeclare block-scoped variable '_a'.deno-ts(2451)

Additional Info

This is happening in VS Code with the latest Deno extension.
Any two files sharing a variable produce the error. They don't even need to be in the same folder, just open at the same time.

Kapture 2022-05-11 at 17 19 57

I understand that this might be related to this issue, but since deno only supports modules this issue should not apply. All files should be in an isolated scope when using deno_lint because thats how they will be handled by deno.

Version

❯ deno --version
deno 1.21.2 (release, aarch64-apple-darwin)
v8 10.0.139.17
typescript 4.6.2
@kyeotic kyeotic added the bug Something isn't working label May 12, 2022
@bartlomieju
Copy link
Member

CC @kitsonk

@magurotuna
Copy link
Member

image

Confirmed this issue was resolved already at some point, so closing now. Let us know if there's still an issue.

extension v3.13.1
deno 1.26.1 (release, aarch64-apple-darwin)
v8 10.7.193.3
typescript 4.8.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants