我尝试了几个小时来设置eslint-plugin-vue,但是lint输出始终是空的(没有stdout和stderr),我一定错过了一些非常基本的东西?
命令
$ node --version # v9.4.0
$ npm install
$ $(npm bin)/eslint . # Empty output文件结构
Foo
├── .eslintrc.js
├── main.vue
└── package.json.eslintrc.js
module.exports = {
"extends": [
"plugin:vue/recommended"
]
}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>发布于 2018-02-14 13:13:31
做$(npm bin)/eslint . --ext .vue
默认情况下,eslint命令只检查.js文件。您必须通过--ext选项指定其他扩展。
https://stackoverflow.com/questions/48785876
复制相似问题