Skip to content
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

Vue files not linted using mithotyn #601

Closed
NicoAiko opened this issue Apr 25, 2019 · 2 comments
Closed

Vue files not linted using mithotyn #601

NicoAiko opened this issue Apr 25, 2019 · 2 comments

Comments

@NicoAiko
Copy link

I think the problem is obvious just by reading the title.

As Vetur fails to actually work, I switched to wotan.
But as it seems, Wotan is not able to actually lint Vue files in VSCode.

I checked the regular .ts (TypeScript) files and they work just fine.

I also use valtyr and ve.

As an example, here's my .fimbullinter.yaml

# Tell wotan to use the valtyr module for linting.
modules:
  - "@fimbul/valtyr"
# Valtýr configuration.
valtyr:
  overrides:
    # Use the Vé preprocessor for all *.vue files.
    # Valtýr will still run for *.ts files by default.
    - files: "*.vue"
      processor: "@fimbul/ve"
exclude:
  - "**/*.d.ts"

In my tsconfig.json file, I also added the mithotyn plugin like so:

"plugins": [
      { "name": "@fimbul/mithotyn", "displayErrorsAsWarnings": true }
    ]

Is the mithotyn plugin not capable to lint vue files?
If so, wotan is no solution for me...

@NicoAiko NicoAiko changed the title Vue files not linted using mythotyn Vue files not linted using mithotyn Apr 25, 2019
@ajafff
Copy link
Member

ajafff commented Apr 28, 2019

This is kinda expected. The docs mention the following:

There are some limitations of the current implementation.

  • doesn't use processors at all

Which means it doesn't use processor: "@fimbul/ve" to make .vue files available to TypeScript.

However, I would expect the plugin that powers VSCode's language service for Vue files to do that kind of preprocessing and also respect the plugins option in your tsconfig.json.
It seems Vetur doesn't load TypeScript LanguageService plugins at all. Otherwise @fimbul/mithotyn or typescript-tslint-plugin would work when configured as plugins in tsconfig.json.
Related issue: vuejs/vetur#170 (but you probably already know that one).

TL;DR there's not much this project can do about that (without duplicating a lot of code from Vetur).

@NicoAiko
Copy link
Author

I see. Thanks for clearing up!

@ajafff ajafff closed this as completed May 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants