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

VTI type checking doesn't match Vetur #3256

Open
3 of 4 tasks
rchl opened this issue Nov 27, 2021 · 3 comments
Open
3 of 4 tasks

VTI type checking doesn't match Vetur #3256

rchl opened this issue Nov 27, 2021 · 3 comments

Comments

@rchl
Copy link
Collaborator

rchl commented Nov 27, 2021

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: macOS
  • Vetur version: VTI 0.1.5
  • VS Code version: -

Problem

VTI has problems with type checking files that Vetur doesn't have issue with.

Reproducible Case

  1. Clone https://github.com/rchl/lsp-log-parser
  2. Run yarn to install dependencies
  3. Run vti diagnostics ./pages/

Getting diagnostics like:

File : /Users/rafal/workspace/lsp/lsp-log-parser/pages/index.vue:1:1
Error: Cannot find name '__vlsComponentData'.
> 1 | <template>
    | ^
  2 |   <v-app>
  3 |     <app-bar />
  4 |     <app-drawer />

whereas Vetur doesn't have any issue with type checking that file itself.

Here is the full configuration that my client is sending for Vetur:

{
  "settings": {
    "css": {
      "completion": {
        "completePropertyWithSemicolon": true,
        "triggerPropertyValueCompletion": true
      },
      "customData": [],
      "lint": {
        "argumentsInColorFunction": "error",
        "boxModel": "ignore",
        "compatibleVendorPrefixes": "ignore",
        "duplicateProperties": "ignore",
        "emptyRules": "warning",
        "float": "ignore",
        "fontFaceProperties": "warning",
        "hexColorLength": "error",
        "idSelector": "ignore",
        "ieHack": "ignore",
        "importStatement": "ignore",
        "important": "ignore",
        "propertyIgnoredDueToDisplay": "warning",
        "universalSelector": "ignore",
        "unknownAtRules": "warning",
        "unknownProperties": "warning",
        "unknownVendorSpecificProperties": "ignore",
        "validProperties": [],
        "vendorPrefix": "warning",
        "zeroUnits": "ignore"
      },
      "validate": true
    },
    "emmet": {},
    "html": {
      "suggest": {}
    },
    "javascript": {
      "format": {}
    },
    "stylusSupremacy": {},
    "typescript": {
      "format": {}
    },
    "vetur": {
      "completion": {
        "autoImport": true,
        "scaffoldSnippetSources": {
          "user": "🗒️",
          "vetur": "✌",
          "workspace": "💼"
        },
        "tagCasing": "kebab"
      },
      "experimental": {
        "templateInterpolationService": true
      },
      "format": {
        "defaultFormatter": {
          "css": "prettier",
          "html": "none",
          "js": "none",
          "less": "prettier",
          "postcss": "prettier",
          "pug": "prettier",
          "sass": "sass-formatter",
          "scss": "none",
          "stylus": "stylus-supremacy",
          "ts": "none"
        },
        "defaultFormatterOptions": {},
        "enable": true,
        "options": {
          "tabSize": 2,
          "useTabs": false
        },
        "scriptInitialIndent": false,
        "styleInitialIndent": false
      },
      "ignoreProjectWarning": false,
      "languageFeatures": {
        "codeActions": true,
        "updateImportOnFileMove": true
      },
      "useWorkspaceDependencies": true,
      "validation": {
        "interpolation": true,
        "script": true,
        "style": false,
        "template": false,
        "templateProps": true
      }
    }
  }
}

I understand that VTI doesn't receive the same options but I still don't see why would it report such serious issues with those Vue files.

@jmosawy
Copy link

jmosawy commented Nov 29, 2021

@rchl I have the exact issue. Did you manage to resolve it or is it still an open case for you?

@jmosawy
Copy link

jmosawy commented Dec 7, 2021

@rchl I managed to resolve the issue. Take a look at this page: https://vuejs.github.io/vetur/reference/#vetur-config-js
By placing a vetur.config.js file in my project's root, seems like the issue was resolved.

@rchl
Copy link
Collaborator Author

rchl commented Dec 7, 2021

It doesn't fix it here. Are you able to make it work with the repo I've provided?

In any case, it would still be a bug IMO, even if it worked, because I don't see why an explicit configuration should need to exist.

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