Skip to content

tsc does not detect errors in .vue files #5192

Open
@RobertOrthofer

Description

@RobertOrthofer

Version

4.1.1

Reproduction link

https://github.com/RobertOrthofer/typescript-vue

Environment info

  System:
    OS: macOS 10.15.2
    CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
  Binaries:
    Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
    Yarn: Not Found
    npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm
  Browsers:
    Chrome: 80.0.3987.106
    Firefox: 70.0.1
    Safari: 13.0.4
  npmPackages:
    @vue/cli-overlay:  4.2.2 
    @vue/cli-plugin-eslint: ^4.2.0 => 4.2.2 
    @vue/cli-plugin-router:  4.2.2 
    @vue/cli-plugin-typescript: ^4.2.0 => 4.2.2 
    @vue/cli-plugin-vuex:  4.2.2 
    @vue/cli-service: ^4.2.0 => 4.2.2 
    @vue/cli-shared-utils:  4.2.2 
    @vue/component-compiler-utils:  3.1.1 
    @vue/eslint-config-standard: ^5.1.0 => 5.1.2 
    @vue/eslint-config-typescript: ^5.0.1 => 5.0.1 
    @vue/preload-webpack-plugin:  1.1.1 
    @vue/web-component-wrapper:  1.2.0 
    eslint-plugin-vue: ^6.1.2 => 6.2.1 
    typescript: ~3.7.5 => 3.7.5 
    vue: ^2.6.11 => 2.6.11 
    vue-eslint-parser:  7.0.0 
    vue-hot-reload-api:  2.3.4 
    vue-loader:  15.9.0 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.6.11 => 2.6.11 
    vue-template-es2015-compiler:  1.9.1 
  npmGlobalPackages:
    @vue/cli: 4.1.1

Steps to reproduce

npm install
npm run typecheck

What is expected?

The computed property foo in HelloWorld.vue has an incorrect return type.
npm run typecheck should report that error like vetur does in VS Code

What is actually happening?

When running npm run typecheck no errors are shown.


Is there a way to configure the repository so typescript does not ignore .vue files?
Our goal is to run typechecking in a CI.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions