deno_lint icon indicating copy to clipboard operation
deno_lint copied to clipboard

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

Open kyeotic opened this issue 2 years ago • 1 comments

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 avatar May 12 '22 00:05 kyeotic

CC @kitsonk

bartlomieju avatar May 12 '22 09:05 bartlomieju

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

magurotuna avatar Oct 09 '22 11:10 magurotuna