vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.76k stars 6.33k forks source link

command "lint" does not exist #7252

Open ademyalcin27 opened 2 years ago

ademyalcin27 commented 2 years ago

Version

5.0.6

Environment info

 System:
    OS: macOS 12.4
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: Not Found
    npm: 8.5.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 103.0.5060.134
    Edge: Not Found
    Firefox: 102.0.1
    Safari: 15.5
  npmPackages:
    @types/vuelidate: ^0.7.9 => 0.7.15 
    @vue/babel-helper-vue-jsx-merge-props:  1.2.1 
    @vue/babel-helper-vue-transform-on:  1.0.2 
    @vue/babel-plugin-jsx:  1.1.1 
    @vue/babel-plugin-transform-vue-jsx:  1.2.1 
    @vue/babel-preset-app:  5.0.8 
    @vue/babel-preset-jsx:  1.3.1 
    @vue/babel-sugar-composition-api-inject-h:  1.3.0 
    @vue/babel-sugar-composition-api-render-instance:  1.3.0 
    @vue/babel-sugar-functional-vue:  1.2.2 
    @vue/babel-sugar-inject-h:  1.2.2 
    @vue/babel-sugar-v-model:  1.3.0 
    @vue/babel-sugar-v-on:  1.3.0 
    @vue/cli-overlay:  5.0.8 
    @vue/cli-plugin-babel: ~5.0.6 => 5.0.8 
    @vue/cli-plugin-e2e-cypress: ~5.0.6 => 5.0.8 
    @vue/cli-plugin-router:  5.0.8 
    @vue/cli-plugin-typescript: ~5.0.6 => 5.0.8 
    @vue/cli-plugin-unit-mocha: ~5.0.6 => 5.0.8 
    @vue/cli-plugin-vuex:  5.0.8 
    @vue/cli-service: ~5.0.6 => 5.0.8 
    @vue/cli-shared-utils:  5.0.8 
    @vue/compiler-sfc:  2.7.8 
    @vue/component-compiler-utils:  3.3.0 
    @vue/test-utils: ^1.3.0 => 1.3.0 
    @vue/web-component-wrapper:  1.3.0 
    emoji-mart-vue-fast: ^6.1.2 => 6.1.2 
    typescript: 3.8.3 => 3.8.3 
    vue: ^2.7.8 => 2.7.8 
    vue-class-component: 7.1.0 => 7.1.0 
    vue-demi:  0.13.6 
    vue-flagpack: ^1.0.1 => 1.0.1 
    vue-hot-reload-api:  2.3.4 
    vue-hotjar: ~1.2.0 => 1.2.0 
    vue-infinite-loading: ^2.4.5 => 2.4.5 
    vue-loader: ^15.10.0 => 15.10.0 (17.0.0)
    vue-observe-visibility:  0.4.6 
    vue-property-decorator: 8.2.2 => 8.2.2 
    vue-resize:  0.4.5 
    vue-router: 3.1.3 => 3.1.3 
    vue-select: ^3.11.2 => 3.20.0 
    vue-style-loader:  4.1.3 
    vue-template-es2015-compiler:  1.9.1 
    vue-virtual-scroller:  1.0.10 
    vuejs-datepicker: ^1.6.2 => 1.6.2 
    vuelidate: ^0.7.7 => 0.7.7 
    vuelidate-property-decorators: ^1.0.28 => 1.0.28 
    vuex: 3.1.1 => 3.1.1 
    vuex-module-decorators: ^2.0.0 => 2.0.0 
  npmGlobalPackages:
    @vue/cli: 5.0.4

Steps to reproduce

when I npm run lint script, I get this error

vue-cli-service lint

ERROR command "lint" does not exist.

What is expected?

to run lint command

What is actually happening?

vue-cli-service lint

ERROR command "lint" does not exist.

bigsee commented 2 years ago

Same here in version 5.0.8

gilles-crealp commented 2 years ago

Add the following packages:

KnaanBrazCanditech commented 2 years ago

eslint

It helps, but should we do that? Having @vue/cli-service should be enough no?

tobius commented 1 year ago

Vue CLI

npm i -D @vue/cli-service

Commands:
  serve     start development server
  build     build for production
  inspect   inspect internal webpack config

Vue CLI + Vue ESlint Plugin

npm i -D @vue/cli-service @vue/cli-plugin-eslint

Commands:
  serve     start development server
  build     build for production
  inspect   inspect internal webpack config
  lint      lint and fix source files

Maybe an error message something like this would be better?

The "lint" command requires the "@vue/cli-plugin-eslint" module to be installed.

Note: All other lint-related packages are implementation specific.