vuejs-templates / webpack

A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
MIT License
9.7k stars 4.39k forks source link

Give vue as an option for the eslint choices in cli. #611

Open prograhammer opened 7 years ago

prograhammer commented 7 years ago

When I'm using vue-cli and the webpack template, the options I get for:

Use ESLint to lint your code?

Are standard, airbnb, and none. So I choose none and then manually add vue:

npm install eslint-config-vue eslint-plugin-vue --save-dev

Why is vue not an option in the cli?

LinusBorg commented 7 years ago

Makes sense! :D

iAlexanderMoon commented 7 years ago

FYI: eslint-config-vue was deprecated use eslint-plugin-vue-libs

chrisvfritz commented 7 years ago

@iAlexanderMoon That's half right. 😄 More details in the comment here.

LinusBorg commented 6 years ago

@chrisvfritz eslint-plugin-vue will soon be ready, so I'm thinking about this.

Since that plugin only comes with vue-related stuff, should we really add it as a choice like "standard" and "airbnb"? It can exist with both.

I'm currently in favour of simply adding it whenever eslint is chosen, period.

chrisvfritz commented 6 years ago

I definitely wouldn't add it yet, but when it's released, I think the default ESLint config should be vue/essential (currently only available in a PR), which only catches errors. That would also be good to include along with Standard/Airbnb, if the user chooses those options. In Vue CLI 3, vue/essential will probably be the out-of-the-box linting, since it's very non-offensive. It only halts the build if you'd actually get an error or unexpected behavior anyway - there are no style preferences.