Vscode_deno: Disable extension for a subdirectory

Created on 15 Jun 2020  路  3Comments  路  Source: denoland/vscode_deno

I know how to disable the extension in a project by using a .vscode/settings.json file but it does not seem to work for subdirectories of a project.

My problem is that I have a project in which there is deno code and browser javascript but because of the deno extension I have lint errors like "Could not find name 'alert'".

How can I prevent that?

enhancement

Most helpful comment

We're using Deno inside a monorepo, so I'm going to try and play around with building a config option for this. No guarantees or anything, first time doing a VS Code extension, so don't let me stop anyone else from taking this.

Proposal

Deno VS Code should support a deno.paths variable that lets you specify folders or files via blob syntax as deno enabled.

For example, a config like this:

{
  "deno.paths": ["packages/deno-project/**", "*.deno.ts"]
}

Would set anything in the packages/deno-project folder as well as any file like foo.deno.ts.

All 3 comments

What I've been doing as a workaround is having two VSCode windows open, one with my backend code folder opened and one with my frontend code folder opened. Then using the commands for enabling and disabling Deno from the command palette puts a .vscode folder in each so you can control them separately.

We're using Deno inside a monorepo, so I'm going to try and play around with building a config option for this. No guarantees or anything, first time doing a VS Code extension, so don't let me stop anyone else from taking this.

Proposal

Deno VS Code should support a deno.paths variable that lets you specify folders or files via blob syntax as deno enabled.

For example, a config like this:

{
  "deno.paths": ["packages/deno-project/**", "*.deno.ts"]
}

Would set anything in the packages/deno-project folder as well as any file like foo.deno.ts.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

1.0
justjavac picture justjavac  路  4Comments

promethyttrium picture promethyttrium  路  10Comments

justdayan picture justdayan  路  7Comments

Ragzouken picture Ragzouken  路  5Comments

Ciantic picture Ciantic  路  10Comments