Skip to content

@vue/cli-plugin-typescript lint failed when tslint.json has extends configuration (with linterOptions.exclude in extended file) #3558

Closed
@luhantao

Description

@luhantao

Version

3.4.1

Reproduction link

https://github.com/luhantao/cli-plugin-typescript-example

Environment info

Environment Info:

  System:
    OS: macOS High Sierra 10.13.4
    CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
  Binaries:
    Node: 8.9.0 - /usr/local/bin/node
    Yarn: 1.12.3 - /usr/local/bin/yarn
    npm: 5.5.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 72.0.3626.119
    Firefox: Not Found
    Safari: 11.1
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0-beta.2
    @vue/babel-plugin-transform-vue-jsx:  1.0.0-beta.2
    @vue/babel-preset-app:  3.4.1
    @vue/babel-preset-jsx:  1.0.0-beta.2
    @vue/babel-sugar-functional-vue:  1.0.0-beta.2
    @vue/babel-sugar-inject-h:  1.0.0-beta.2
    @vue/babel-sugar-v-model:  1.0.0-beta.2
    @vue/babel-sugar-v-on:  1.0.0-beta.2
    @vue/cli-overlay:  3.4.1
    @vue/cli-plugin-babel: ^3.4.1 => 3.4.1
    @vue/cli-plugin-typescript: ^3.4.1 => 3.4.1
    @vue/cli-service: ^3.4.1 => 3.4.1
    @vue/cli-shared-utils:  3.4.1
    @vue/component-compiler-utils:  2.6.0
    @vue/preload-webpack-plugin:  1.1.0
    @vue/web-component-wrapper:  1.2.0
    typescript: ^3.3.3333 => 3.3.3333
    vue: ^2.5.17 => 2.6.8
    vue-hot-reload-api:  2.3.3
    vue-loader:  15.7.0
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.8 => 2.6.8
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

  1. clone the example project
  2. run yarn to install packages
  3. run yarn tslint, it works well (use tslint directly)
  4. run yarn cli-lint, and it fails (use vue-cli-service lint)

What is expected?

work same as using tslint directly

What is actually happening?

throw error, 'TypeError: Cannot read property 'exclude' of undefined'

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