[英]Cannot setup eslint-plugin-vue
I had tried hours to setup eslint-plugin-vue
, but the lint output is always empty (no stdout and stderr), I must have missed something very basic? 我已经尝试了几个小时来设置
eslint-plugin-vue
,但是lint输出始终为空(没有stdout和stderr),我一定错过了一些非常基本的东西吗?
Commands 指令
$ node --version # v9.4.0
$ npm install
$ $(npm bin)/eslint . # Empty output
File structure 档案结构
Foo
├── .eslintrc.js
├── main.vue
└── package.json
.eslintrc.js .eslintrc.js
module.exports = {
"extends": [
"plugin:vue/recommended"
]
}
package.json package.json
{
"name": "Foo",
"version": "0.1.0",
"devDependencies": {
"eslint": "^4.17.0",
"eslint-plugin-vue": "^4.2.2"
}
}
main.vue 主目录
<template>
</template>
<script>
!@#$%^UIYTHRE
</script>
Do $(npm bin)/eslint . --ext .vue
做
$(npm bin)/eslint . --ext .vue
$(npm bin)/eslint . --ext .vue
The eslint
command checks only .js
files by default. eslint
命令默认情况下仅检查.js
文件。 You have to specify additional extensions by --ext
option. 您必须通过
--ext
选项指定其他扩展名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.