Skip to content

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

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
luhantao opened this issue Mar 3, 2019 · 2 comments

Comments

@luhantao
Copy link

luhantao commented Mar 3, 2019

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'

@LinusBorg
Copy link
Member

It seems tslint.Configuration.readConfigurationFile(tslintConfigPath) doesn't expand theextends option:

https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-typescript/lib/tslint.js#L124-L129

@haoqunjiang
Copy link
Member

Now that TSLint is officially deprecated, TSLint support will be fully dropped in the next major version; as for the current major version, no more bug fixes or features will be implemented except for security reasons. So I'm closing this issue now.

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