1

I created vue cli project without eslint option.
But now I want to try to test it. How to add ESLint in existing vue cli project?

YakovL
  • 7,557
  • 12
  • 62
  • 102
Shaci
  • 316
  • 1
  • 4
  • 18
  • 1
    Stack exchange is not the place for `how to?` Please specify any issues or errors that you get while addressing your problem. – Bussller Oct 25 '18 at 09:57
  • please , write on business – Shaci Oct 25 '18 at 10:32
  • Pointing what's considered best practice and what should be avoided at SO *is* on business. Refer to https://stackoverflow.com/help/how-to-ask . Your question lacks research efforts, hence is not that well recieved. You also haven't shown your setup so it's harder not to wild-guess to answer. Perhaps this Q&A may be helpful: https://stackoverflow.com/q/38757069/3995261 but you haven't specified if you use webpack, what your config/index.js looks like etc. You haven't even shown the line you used to create the project to make your issue reproducible. Doing so will increase chanses of getting – YakovL Oct 25 '18 at 15:51
  • 1
    a proper answer. – YakovL Oct 25 '18 at 15:55
  • Добрый вечер. Ну, вопрос в принципе выглядит так - я взял последнюю версию vue cli, и не установил на неё опцию eslint при установке, что мне сделать, чтобы добавить эту опцию уже на существующий проект. На мой взгляд вопрос нормальный. Т.е. я не считаю, что обязательно должен примеры кода какого-то выкладывать, или что-то еще. В предыдущих вопросах всегда выкладывал примеры кода (или почти всегда). – Shaci Oct 25 '18 at 19:36
  • В принципе самый простой вариант - создать новый проект на vue cli с включенным eslint, и просто перекинуть туда код, но так делать не хочется. Хочется на существующую версию без eslint добавить линтер. (настройки webpack я не трогал, т.е. настройки заводские, те, что исходно установлены для vue cli) – Shaci Oct 25 '18 at 19:42

1 Answers1

2

Just execute npm i --save @vue/cli-plugin-eslint

Docs can be found here for more details.

l-portet
  • 636
  • 7
  • 14
  • 1
    Thank you, i found description here: https://cli.vuejs.org/guide/plugins-and-presets.html#installing-plugins-in-an-existing-project – Shaci Oct 27 '18 at 18:16