deno_lint icon indicating copy to clipboard operation
deno_lint copied to clipboard

Use linter for Browser code. Have selector for Deno/Browser?

Open David-Else opened this issue 5 years ago • 3 comments

I would like to use the linter for all my Browser-based TypeScript and replace ESLint, but I need to use "deno.enable": true, to turn the linter on. This stops the use of some DOM API's and means you need to add .ts to imports.

Describe the solution you'd like

It seems that Deno is ready to replace ESLint inside Visual Studio Code, but is just missing something in this extension. Maybe having:

"deno.lint.mode": "Deno / Browser",

Would be a good solution? It could then load the correct types, and deal with the .ts extension issue (somehow) until MicroSoft finally adds it as an option.

Someone can probably think of a much nicer solution, but this could be a good start point for a discussion. Prettier is gone thanks to Deno, would be great to banish more bloat.

David-Else avatar Sep 07 '20 14:09 David-Else

This is not difficult, just remove the dependency of deno.enable

But deno_lint is still an implementation feature, I think it is not ready to be fully open, yet.

axetroy avatar Sep 07 '20 15:09 axetroy

Great news it is easy to do! I think deno lint itself is ready, but if you think the extension implementation needs more work, I really look forward to it in the future.

David-Else avatar Sep 07 '20 15:09 David-Else

I moved this from vscode_deno, because not only does this apply for linting in the editor, but elsewhere. Maybe we should consider having lint inspect the ConfigFile compiler options, and seeing what the "lib" value is for those and have that impact what global symbols it has?

kitsonk avatar Jul 19 '21 22:07 kitsonk