denoland / deno_lint

Blazing fast linter for JavaScript and TypeScript written in Rust
https://lint.deno.land/
MIT License
1.52k stars 172 forks source link

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

Open David-Else opened 4 years ago

David-Else commented 4 years ago

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.

axetroy commented 4 years ago

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.

David-Else commented 4 years ago

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.

kitsonk commented 3 years ago

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?