如何修复'eslint --init失败'?

时间:2019-07-08 16:37:58

标签: eslint

这是为Mac, node v10.10.0,npm 6.4.1

eslint --init

? How would you like to use ESLint? To check syntax, find problems, and enforce code style
? What type of modules does your project use? JavaScript modules (import/export)
? Which framework does your project use? Vue.js
? Where does your code run? (Press <space> to select, <a> to toggle all, <i> to invert selection)Browser
? How would you like to define a style for your project? Use a popular style guide
? Which style guide do you want to follow? Standard (https://github.com/standard/standard)
? What format do you want your config file to be in? JSON
Checking peerDependencies of eslint-config-plugin:vue/essential,standard@latest
Local ESLint installation not found.
The config that you've selected requires the following dependencies:

eslint-plugin-vue@latest eslint-config-plugin:vue/essential,standard@latest error@[object Object] eslint@latest
? Would you like to install them now with npm? Yes
Installing eslint-plugin-vue@latest, eslint-config-plugin:vue/essential,standard@latest, error@[object Object], eslint@latest
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "[object Object]": Tags may not have any characters that encodeURIComponent encodes.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/raindwu/.npm/_logs/2019-07-08T16_15_09_665Z-debug.log

我期望'eslint --init' to be successful,但总是会遇到上述错误

0 个答案:

没有答案