Skip to content

Support Visual Studio Code #396

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

Closed
Shinigami92 opened this issue Aug 29, 2018 · 5 comments
Closed

Support Visual Studio Code #396

Shinigami92 opened this issue Aug 29, 2018 · 5 comments

Comments

@Shinigami92
Copy link

I would like to switch from TSLint to wotan, but as far as I can see, there is currently no possibility with wotan (without valtyr) in VSCode to show me problems.

Do we need a new VSCode extension for wotan?

Without linting files in VSCode this is currently a deal-breaker

@ajafff
Copy link
Member

ajafff commented Aug 29, 2018

Currently there is no integration with VSCode.
This requires a new VSCode extension. Code-wise it could be very similar to vscode-tslint.

Conceptually it has the same problem as TSLint when it comes to rules that require type information. Creating a Program, which is the prerequisite of type information, is very expensive. That's a problem when linting on every file change.
I'm in favour of always linting with type information. Ideally there's no need to create the Program from scratch on every change, but incrementally update it like it's already done by the CLI runner.

@AlCalzone
Copy link

@ajafff Your linter seems like a very powerful tool. As I've been annoyed with TSLint in the past I have been wanting to switch. But the missing VSCode plugin is a dealbreaker.

@ajafff
Copy link
Member

ajafff commented Dec 7, 2018

@AlCalzone I know the missing editor integration is a big pain point. I'm currently working on writing a LanguageService plugin for TypeScript (#408) which will provide in-editor linting for all major code editors. Afterwards I'll add a VSCode plugin that automatically adds the plugin so you don't have to manually edit your tsconfig.json

Turns out this is quite a bit of work. In addition to the complexity of the LanguageService it requires some bigger refactoring of the existing linter.
Depending on the amount of time my family claims during the upcoming holidays, I might be able to release the first working implementation this year.

@ajafff ajafff self-assigned this Dec 17, 2018
@ajafff
Copy link
Member

ajafff commented Dec 17, 2018

I just merged the LanguageService plugin. For those willing to test it: In about 3 hours there will be a new nightly release that includes the plugin. The documentation is located here: https://github.com/fimbullinter/wotan/blob/master/packages/mithotyn/README.md

Note: to install the nightly release you need to execute

npm install --save-dev @fimbul/wotan@next @fimbul/mithotyn@next
# or
yarn add -D @fimbul/wotan@next @fimbul/mithotyn@next

Any kind of feedback is very much appreciated.


Now I'll try to fix the remaining limitations and implement a plugin for VS Code.

@ajafff
Copy link
Member

ajafff commented Feb 11, 2019

Turns out this was pretty easy to implement. So there you have it: https://marketplace.visualstudio.com/items?itemName=fimbullinter.vscode-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants