vuejs/vue-cli

linter crash on a respected rule (restrict-plus-operands) when launching vue-cli service lint, works fine with tslint

Open

#4,589 opened on Sep 18, 2019

View on GitHub
 (0 comments) (1 reaction) (0 assignees)JavaScript (6,328 forks)batch import
help wanted

Repository metrics

Stars
 (29,754 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Version

3.10.0

Reproduction link

https://github.com/JeremieANACHE/linter-crash-repro

Environment info

Environment Info:

  System:
    OS: macOS 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
  Binaries:
    Node: 10.7.0 - ~/.nvm/versions/node/v10.7.0/bin/node
    Yarn: Not Found
    npm: 6.1.0 - ~/.nvm/versions/node/v10.7.0/bin/npm
  Browsers:
    Chrome: 76.0.3809.132
    Firefox: Not Found
    Safari: 12.1.2
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0 
    @vue/babel-preset-app:  3.10.0 
    @vue/babel-preset-jsx:  1.1.0 
    @vue/babel-sugar-functional-vue:  1.0.0 
    @vue/babel-sugar-inject-h:  1.0.0 
    @vue/babel-sugar-v-model:  1.0.0 
    @vue/babel-sugar-v-on:  1.1.0 
    @vue/cli-overlay:  3.10.0 
    @vue/cli-plugin-babel: ^3.10.0 => 3.10.0 
    @vue/cli-plugin-typescript: ^3.10.0 => 3.10.0 
    @vue/cli-plugin-unit-jest: ^3.10.0 => 3.10.0 
    @vue/cli-service: ^3.10.0 => 3.10.0 
    @vue/cli-shared-utils:  3.10.0 
    @vue/component-compiler-utils:  2.6.0 (3.0.0)
    @vue/preload-webpack-plugin:  1.1.1 
    @vue/test-utils: 1.0.0-beta.29 => 1.0.0-beta.29 
    @vue/web-component-wrapper:  1.2.0 
    jest-serializer-vue:  2.0.2 
    typescript: ^3.4.3 => 3.5.3 
    vue: ^2.6.10 => 2.6.10 
    vue-class-component: ^7.1.0 => 7.1.0 
    vue-cli-plugin-i18n: ^0.6.0 => 0.6.0 
    vue-cli-plugin-vuetify: ^0.6.1 => 0.6.1 
    vue-hot-reload-api:  2.3.3 
    vue-i18n: ^8.0.0 => 8.12.0 
    vue-i18n-extract:  0.4.14 
    vue-i18n-ts:  0.1.0 
    vue-jest:  3.0.4 
    vue-loader:  15.7.1 
    vue-property-decorator: ^8.2.2 => 8.2.2 
    vue-router: ^3.0.3 => 3.1.3 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.6.10 => 2.6.10 
    vue-template-es2015-compiler:  1.9.1 
    vuetify: ^2.0.0 => 2.0.4 
    vuetify-loader: ^1.2.2 => 1.3.0 
    vuex: ^3.0.1 => 3.1.1 
  npmGlobalPackages:
    @vue/cli: 3.10.0

Steps to reproduce

  1. clone project

  2. install dependencies via npm i or npm install

  3. launch linter : npm run lint or via vue ui then going to tasks -> lint

  4. tslint rule restrict-plus-operands successfully fails : cannot read property 'flags' of undefined

  5. (optional) try running tslint --project tslint.json : works fine

What is expected?

tslint should not crash

What is actually happening?

tslint crashes on a respected rule


rule is respected, which is why it's even more strange

Contributor guide